Creating a REST Method
- 30 Nov 2023
- 2 Minutes to read
- Print
- DarkLight
Creating a REST Method
- Updated on 30 Nov 2023
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
REST Methods are specific HTTP calls (e.g. GET, POST, and PUT) that can be made to the URL defined in the REST Service.
Prerequisite
- Preexisting REST Service. To learn how to create a REST Service, see REST Service Integration Overview.
Example
- Navigate to System > Integrations > External Services > [REST SERVICE FOLDER].
- Inside the REST Service Folder, click All and select Add Method to Service.
- On the New REST Service Method window, enter a Name for the new method. For the URL (Relative to Base) field, any URL defined here will be appended to the Service Base URL defined in the REST Service. For example, a base URL of "http://example.com/api/" might be paired with a relative URL of "fetch/users" to navigate to example.com/api/fetch/users.
- Under the HTTP Method option, select the appropriate method. Selecting one of the options will display additional settings to configure. After all the desired configuration options are set, click OK.
Option Description Content Type Specifies the content type for the method Request Body Format Get String from Flow Allows the user to send a string built in a Flow dynamically Get Binary Data from Flow Allows the user to send raw bytes that are built in a Flow dynamically Serialize from Data Type Choose a data type that'll be serialized to JSON or XML to create the request body Specify Below (Use {} for variables) Allows custom request body and custom variables Step Output Type Specify how to handle the response returned from the request Raw Value Returns the entire response as a raw string Select Data Type Choose a data type. The response string (JSON or XML) will be deserialized into the chosen type. Binary Returns the raw bytes of the response None Return is ignored Show Advanced Options Allows a user to set optional configuration options for the service method being created Override Base URL Allows users to ignore the base URL from the REST Service and instead get the base URL either from a Flow, a static base URL or from an OAuth token. If this option is selected, the relative URL will be appended to this new base URL. Accept Accept Header; overrides the default Accept header Additional HTTP Headers Allows users to specify other HTTP Header Keys and Values required for the new method Expect: 100-continue Response code for method request for servers that either expect code or use code. Can be left as True (default). Preserve All Headers On Redirect Enables the Authorization Header to be present on method redirects Override Authentication Allows users to specify an authentication that differs from the REST Service. If this option is selected, the authentication will only apply to the created method. If selecting an OAuth authentication, the token can be added using the Use Static OAuth Token option.
For further information on Integrations, visit the Decisions Forum.
Was this article helpful?