The DQ+ API Call node enables you to access the API from an analysis.
- In an analysis, select the DQ+ API Call node.
The Properties panel has three tabs:
- Request - Configure the Request tab properties to define your request using the GraphiQL API Console, see Request tab.
- Response - Configure the Response tab properties to define the fields that will accept the contents of the response to the GraphiQL query, see Response tab.
- Output - Configure the Output tab to choose input fields to include in the output, see Output tab.
- When you have finished configuring the node properties, click Accept Changes.
Properties
Request tab
Select the Request tab to define your request using the GraphiQL API Console.
Username
Specify a username to use to connect to the API.
Password
Specify a password to use to connect to the API. Click Show Password to show the password. If you do not select Show Password, the password will be obfuscated.
Build Query
- Click Build Query to open the GraphiQL API Console.
- Configure the query, then click OK.
Any variables that you have defined are added to the Variables Mapping grid.
To add or delete variables, use the GraphiQL API Console.
To edit a variable, click the Edit button (pencil) to the right of the variable in the Variables Mapping grid. In the Edit Variable dialog, you can change the Property or Field Name selection. You can pick a value from the list or you can type an environment property or execution parameter name. See Value substitution for details on supported environment properties and execution parameters.
Note that you cannot edit the Property or Field Name value if the variable is a paging cursor variable.
Response tab
Select the Response tab to define the fields that will accept the contents of the response to the GraphiQL query.
Status Field Name
Optionally, specify the name of the output field to contain the HTTP status code (an integer), for example Status
. If left empty, the status code is not output. The name of the field must follow all field name restrictions and must not clash with any input field names or a field name generated by the transformation builder.
Body Field Name
Optionally, specify the name of the output field to contain the HTTP response body (a string), for example Body
. If left empty, the body is not output. The name of the field must follow all field name restrictions and must not clash with any input field names or a field name generated by the transformation builder.
Content Type Field Name
Optionally, specify the name of the output field to contain the HTTP response content type (a string), for example Type
. If left empty, the content type is not output. The name of the field must follow all field name restrictions and must not clash with any input field names or a field name generated by the transformation builder.
Path to endCursor in Response for Paging
This property is enabled if you specify a paging variable in the Request tab.
Transform Response before Output
Select Transform Response before Output if you want to use the JSON transformation builder to transform the results of the GraphiQL query and produce the output fields. The Edit Transformations button is enabled when the Transform Response before Output option is selected.
The DQ+ API Call node performs similar processing to that done by the JSON Parser node. For more information, see Using the Transformation Builder.
Output tab
Select the Output tab to choose input fields to pass through to the output. In addition to any fields specified in this tab, the output will include any output fields specified in the Response tab.
Value substitution
You can use the ${}
syntax to substitute values in the URL and request body.
For example, if you have a field in your incoming data set called uid
, you can specify the following URL:
https://example.data3sixty.com/api/v2/assets/${uid}
For each incoming record, the value found in the uid
field is used for the REST API call for the record.
You can use this syntax to substitute environment properties, execution parameters, and field values. If there is a conflict caused by more than one parameter or value sharing the same name, the following order of precedence determines which value is substituted:
- Execution parameters
- Environment properties
- Fields
For example, if an execution parameter and an environment property have the same name, the value of the execution parameter is used. This means that if you have defined an environment property or field name that is the same as a Data360 DQ+ system execution parameter, the system execution parameter is used. Data360 DQ+ uses the following system execution parameters:
-
workId
,processId
-
refStartTime
,refStartTimeYear
,refStartTimeMonth
,refStartTimeDate
-
refEndTime
,refEndTimeYear
,refEndTimeMonth
,refEndTimeDate
-
now
,year
,month
,date
-
trigger
-
resultCode
,resultDetail
,resultType