Advanced REST Client
Description
Advanced REST Client is a step in the Utility Plugin for Process Studio Workflows. The REST Client workflow step enables you to consume RESTful services by making REST calls. It is an extension of the step 'REST Client' with more features such as:
- Authenticated Proxy Support
- Option to ignore SSL certificate validation
- Request Timeout
- Form-data request body along with file upload by providing file path
- Ability to read HTTP Response headers
- Ability to test REST API
-
Process Studio variables, parameters, and field names must never be same as the Parameter Key, irrespective of case (upper case or lower case).
-
Apache HttpClient URL Validation Rule for Invalid Percent Sequences: Apache HttpClient strictly validates URLs according to RFC 3986 (Uniform Resource Identifier) specification.
Rule: A percent-encoded character must follow the pattern %XX where XX are exactly two hexadecimal digits (0-9, A-F, a-f).
Valid hex digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
URL: https://dev354764.service-now.com/api/now/table/incident?sysparm_query=short_descriptionLIKEReport%Success@2025 #Final$In above URL, there a sequence “%Su”
Problem with %Success:
- The sequence %Su is parsed as an attempted percent-encoding.
- S and u are NOT valid hexadecimal digits.
- Apache HttpClient throws URISyntaxException: Illegal character or validation error
Example:
Input Valid? Reason %20 Yes 2 and 0 are hex digits (represents space) %2F Yes 2 and F are hex digits (represents /) %Success No S is not a hex digit %25Success Yes %25 decodes to %, result is %Success Reference: RFC 3986, Section 2.1 - Percent-Encoding A percent-encoded octet is encoded as a character triplet, consisting of the percent character "%" followed by the two hexadecimal digits representing that octet's numeric value.
Configurations
HTTP Request:
| Field Name | Description |
|---|---|
| Step name | Specify the name of the step as it appears in the workflow workspace. This name must be unique in a single workflow. |
| HTTP Method | Select how the step interacts with a resource: GET, PUT, DELETE, POST, HEAD, OPTIONS (Read Only) or PATCH. The field accepts variable, static values or previous step field. |
| URL | Specify the path to a REST client resource (HTTP URL). The field accepts variable, static values or previous step field. |
| AutomationEdge Server Rest API | Select the checkbox when the request targets the AutomationEdge Server REST API. The step rejects requests to any other address. The step calls the AutomationEdge Server REST APIs without storing user credentials in the workflow. The call runs under the identity of the user that the workflow executes on behalf of: • Agent execution: the call succeeds only if the owner of the workflow request has access to the called API. • Process Studio execution: the call succeeds only if the signed-in Process Studio user has access to the called API. The step uses the existing Process Studio session. Compatibility: Requires AutomationEdge Server 5.1.x or later, and Process Studio 8.5.1 or later with the matching agent. On older versions the option stays disabled. Notes: • Don't add the user session header (X-session-token) on the Headers tab. If you add the header, the step uses the token in the header, and the call runs under the corresponding user session instead • Rate limits apply. Agent calls count against the request owner user and tenant limits; Process Studio calls count against the PS user limits. Exceeding a limit returns HTTP 429. • If the identity has no access, the call returns a generic HTTP 403. The detailed reason appears only in the server log and the audit. • During server maintenance the call fails with HTTP 503, as other users and agent API traffic do. • The server records the source, the agent name, and the owner of every call in the audit log. |
Settings Tab:
Enter basic connection information for accessing a resource.
| Field Name | Description |
|---|---|
| General: | |
| Request timeout in seconds (default 60) | Specify how long the step waits to establish the connection with the remote host. Default Value: 60 |
| Retry configuration: | Configure automatic retries for failed API calls. Temporary network instability or server capacity constraints often cause intermittent errors, such as Request Timeout, Bad Gateway, or Connection Refused. A retry mechanism helps the step recover from temporary failures automatically and reduces manual intervention. |
| Retry on Status Codes | Specify the HTTP error codes that trigger an automatic retry. Specify multiple status codes separated by commas, for example: 408, 502, 503, 504. The feature resolves temporary network instability or server capacity issues automatically. Click the info icon next to the field to view the list of codes that you cannot use in the field. Note: Use only error codes and note success code (for example 200), else step shows an error. |
| Max Retries | Specify the maximum number of times the step attempts to resend the failed API request. Allowed Range Value: 0 to 10 Default Value: 3 |
| Retry Delay (ms) | Specify the wait time in milliseconds between each retry attempt. Allowed Range Value: 100 to 300000 Default Value: 1000 |
| SSL Configuration: | Provide authentication details for accessing a resource that requires SSL certificate authentication. |
| Ignore SSL certificate verification | Enable this checkbox to ignore SSL certificate verification while making HTTPS connection. (This strategy entirely ignores trust store certificate checking which makes it insecure and only to be used where it makes sense!!) |
| Trust store file | Specify trust store file path in case of HTTPS connection. |
| Browse | Click Browse button to select trust store file from local machine. |
| Trust store password | Specify trust store password in case of HTTPS connection |
| Key store file | Specify the key store file path (in PKCS#12 format after you've combined your certificate and private key) It contains your client's certificate and private key. Key store file is used for mutual TLS authentication to prove the client's identity to the server. Please note that this is an optional field. |
| Browse | Click Browse to select key store file from local machine. |
| Key store password | Specify key store password. Please note that this is an optional field. |
| Proxy Configuration: | |
| Use System Proxy | Enable checkbox to allow REST client to use the Process Studio's default proxy configurations. In case of AE agent, it will use agent's proxy configurations. |
| Proxy Type | Select Proxy server type (HTTP/HTTPS) |
| Proxy Host | Specify the name/IP of a proxy host, if proxy authentication is required |
| Proxy Port | Specify the port number of a proxy host, if proxy authentication is required |
| Proxy Username | In case of authenticated proxy server, provide username |
| Proxy Password | In case of authenticated proxy server, provide password |
| Proxy Exceptions (Non-Proxy Hosts) | Specify the Proxy Exceptions, that is, non-proxy hosts. The Proxy Exceptions (Non-Proxy Hosts) can hold semicolon-separated hostnames, IP addresses, and domain names that must not be accessed through the proxy server. When a client requests access to a resource, the proxy server checks the hostname or IP address against the semicolon separated non-proxy hosts. If there is a match, the proxy server forwards the request directly to the target server without going through the proxy. For example, if the Proxy Exceptions (Non-Proxy Hosts) set to "localhost;127.0.0.1;*.mydomain.com", then requests to the localhost, 127.0.0.1 and any server under the mydomain.com domain will be accessed directly without going through the proxy server. It will be considered when the "Use System Proxy" checkbox is unchecked and proxy details (at least Proxy Host and Proxy Port) are provided into the plugin. |
Parameters Tab: This tab contains table with three columns to provide request (URL) parameters
| Field Name | Description |
|---|---|
| Parameter Key | Specify the Request parameter keys to set value. |
| Parameter Value | Specify the Request parameter keys values. |
| Description | Specify a description for the parameter. |
Authorization Tab: Enter authorization details for a resource in the Authorization tab.
| Field Name | Description |
|---|---|
| HTTP Authorization: | |
| Type | Select Request Authentication. • No Auth • Basic Auth • Bearer Token • OAuth 2.0 • NTLM Auth Note: Field options vary depending on the selection made. |
| Type: Basic Auth option fields | |
| Username | In case of Basic Authentication provide username. The field accepts static or variable value. |
| Password | In case of Basic Authentication provide password. The field accepts static or variable value. |
| Type: Bearer Token option fields: | |
| Token | Specify the bearer token to send in the Authorization header. Enter only the token value; the step adds the Bearer prefix automatically. The field accepts static or variable value. |
| Type: OAuth 2.0 option fields | Select the OAuth 2.0 type to configure new token. The fields in the Configuration Options and Advanced Options tab vary based on the selected grant type. |
| Configure New Token: | |
| Configuration Tab: | |
| Grant Type | Select the option to obtain the access token. • Client Credentials • Password Credentials |
| Access Token URL | Specify the token endpoint URL from which the access token is requested. The field accepts static or variable value. |
| Client ID | Specify the client identifier issued by the authorization server. The field accepts static or variable value. |
| Client Secret | Specify the client secret issued by the authorization server. The field accepts static or variable value. |
| Username | Specify the username of the resource owner. The value is sent to the token endpoint as the username parameter. The field is available only when you select Grant Type as Password Credentials. The field accepts static or variable value and the field is mandatory. |
| Password | Specify the password of the resource owner. The value is sent to the token endpoint as the password parameter. The field is available only when you select Grant Type as Password Credentials. The field accepts static or variable value and the field is mandatory |
| Scope | Specify the scope(s) of access requested for the token. When left blank, no scope parameter is sent. To request more than one scope, enter them with the separator your authorization server expects (usually a space) The field accepts static or variable value. |
| Client Authentication | Select how the client credentials are sent to the token endpoint. For example, as a Basic Auth header or client credentials in the request body. • Send as Basic Auth header • Send client credentials in body |
| Advanced Options Tab: | |
| Resource | Specify the target resource for which the token is requested, if required by the authorization server. The field accepts static or variable value. |
| Audience | Specify the target resource for which the token is requested, if required by the authorization server. The field accepts static or variable value. Note: The field is available only if you select Grant Type as Password Credentials in Configuration Options tab. |
| Type: NTLM Auth option fields | Notes: • The step sends NTLM credentials only to the host and port that you specify in URL. If the server redirects the request to a different host, the step doesn't send the credentials to that host. • In the Test API window, NTLM appears as domain\username rather than as an Authorization header. NTLM exchanges credentials while it establishes the connection, so the step doesn't send a fixed header. |
| Username | Specify the username to authentication with NTLM. For NTLM Auth, specify only the account name, for example jsmith, and not the domain-qualified form DOMAIN\jsmith. The domain is specified separately in the Domain field. The field accepts static or variable value and the field is mandatory. |
| Password | Specify the password to authentication with NTLM. The field accepts static or variable value. |
| Domain | Specify the Windows domain that the account belongs to, for example CORP. If the account is a local account on the target server rather than a domain account, specify the target computer name instead. This field is mandatory when NTLM Auth is selected. The field accepts static or variable value. |
| Workstation (optional) | This is an optional field. Specify the client computer name reported to the server. Most servers ignore this value, so leave it blank unless the target server requires it. The field accepts static or variable value. |
Headers(0) Tab: This tab contains table with four columns to provide request headers
| Field Name | Description |
|---|---|
| Header Key | Specify request header key |
| Header Value | Specify request header value |
| Header Value Field | Define the content of any HTTP headers using an existing field. Populate the list of fields by clicking the Get fields button. |
| Description | Specify a description for header |
Request Body Tab: Request Body tab has a group of radio buttons as follows:
| Field Name | Description |
|---|---|
| Request Body: | |
| none | Select in case where request does not have a request body |
| raw: | Specify raw Request Body as: • Text (text/plain) • HTML (text/html) • XML (application/xml) • JSON (application/json) • XML (text/xml) • Other |
| Get Fields | Click the button to get fields in the raw body. Or, Use template support in request body to substitute fields and environment variables/parameters in appropriate placeholders (?{fieldname}, ${environment variable}). |
| form-data: | Enter Request body in tabular format in a form. Use form-data to send non-ASCII text or large binary data. |
| Key Type | Select form-data parameter key type from the dropdown list: • Text • File |
| Key | Specify form-data parameter key. The field accepts static values or previous step field. |
| Value | Specify form-data parameter key value. Click The field accepts static or variable value. |
| Value Field | Select a field from the list of fields coming from previous steps. |
| Description | Specify a description for form-data parameter String. |
| x-www-form-urlencoded: | Enter Request body in tabular format in a form. Use x-www-form-urlencoded to send simple text/ASCII data. |
| Key | Specify form-data parameter key. The field accepts static values or previous step field. |
| Value | Specify form-data parameter key value. |
| Description | Specify a description for form-data parameter String. |
| read from file: | In case where request body to be read from a file. |
| Filepath | Select the file type from the list and specify the file path in adjacent box. Or, Click Browse to locate and select the required file. Available file types are: • Text (text/plain) • HTML (text/html) • XML (application/xml) • JSON (application/json) • XML (text/xml) • Other The field accepts static, variable and previous field value. |
| View Request Body Contents | Click the button to see the contents available in provided file to verify the input file details. |
| read from field: | In case where request body text to be read from a field. |
| Field Name | Select the file type from the list and select the field that holds the file in adjacent box. Available file types are: • Text (text/plain) • HTML (text/html) • XML (application/xml) • JSON (application/json) • XML (text/xml) • Other |
| binary: | In case where request body is to be read from a file. |
| Filepath | Select or specify the file path. Or, Click Browse to locate and select the required file. The field accepts static, variable and previous field value. |
| GraphQL (Beta): | Specify GraphQL to execute the GraphQL query schema. Limitation: Subscription query is not supported by ARC GraphQL. |
| Query | Specify a GraphQL query to read or fetch values or a mutation to write or post values. Example: { students { id fullName } } |
| GraphQL Variabes | GraphQL variables help to factor dynamic values out of the query and pass them as a separate dictionary. |
| Get Fields | Click the button to get fields Query and GraphQL Variables. Or, Use template support in request body to substitute fields and environment variables/parameters in appropriate placeholders (?{fieldname}, ${environment variable}). Note: Please make sure, when substituting (field or environment variable) a string value we must explicitly enclose that value in double quotes (""). |
HTTP Response Tab:
This tab has Output fields.
| Field Name | Description |
|---|---|
| Response Status | Specify the output field to hold the HTTP Response status (e.g 200 OK). Default Value: ArcRespStatus. |
| Response code | Specify the field name to store the HTTP response code returned by the API call. The output field stores only the numeric status code, for example: 200, 500 separate from the response message. Default Value: ArcRespCode |
| Response Time (milliseconds) | Specify the output field to hold the HTTP Response time in milliseconds. Default Value: ArcRespTime |
| Response Headers (JSON) | Specify the output field to hold the HTTP Response headers in the JSON format. Default Value: ArcResponseHeaders. |
| Response Cookies (JSON) | Specify field name to set HTTP Response Cookies in JSON format. Default Value: ArcRespCookies. |
| Response Body | Specify the output field to hold the HTTP Response body text if any. Default Value: ArcRespBody. |
| Output File Options: | |
| Output File | Specify the output field to hold the file path for file received in the HTTP Response. Default Value: ArcRespOutputFile. |
| Sanitize Output File Name? | Enable this option to clean the file name taken from the response's Content-Disposition header before the output file is saved. Each of \ / : * ? " < > | % and any non-printable control character is replaced with an underscore. |
| Add File to Result | Check this option to add HTTP Response output file to workflow result |