When configuring an AFX connector such as the RESTful Web Service AFX connector, a JSON response can be configured to return one or multiple values. This RSA Knowledge Base Article describes the syntax to be used when parsing both single and multi-valued responses.
Example of a single-value response:
{
"requestNumber":"316",
"tickets": [
"INC0001234"],
"message":"Operation has completed successfully"
}
Example of a multi-valued response:
{
"requestNumber":"316",
"tickets": [
"INC0001234", "INC0001234", "INC0001235"],
"message":"Operation has completed successfully"
}
Go to
AFX >
Connectors > {
connector name} >
Edit >
Capabilities tab > {
capability name} and scroll down to
Brief Response.
Given the examples above, where
tickets is the key name:
- To parse the response use the key name only as shown in the example below:
Image description
- To fetch a specific value from the array use the key name [#] as in the example below:
Image description
- To fetch a single value use the syntax in the above examples or use the key name [*]. The important point here is that key name [*] will not work on a multi-valued array.
Image description