Snap type: | Write | |||||||
---|---|---|---|---|---|---|---|---|
Description: | This Snap provides the functionality to execute the HTTP Delete method to a REST API service endpoint to delete business object resources. | |||||||
Prerequisites: | None | |||||||
Support and limitations: |
| |||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See REST Account for information on setting up this type of account. The Snap supports an optional REST Basic Auth Account or REST Oauth2 Account. In the case of using an REST OAuth2 Account instance, one can access the token of the account through $account.access_token explicitly. The property then needs to be marked as an expression. An example URL for LinkedIn is: | |||||||
Views: |
| |||||||
Settings | ||||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||
Service URL | Required. The service endpoint URL of REST API The Snap will look for the value at the JSON path "$.widget.id" in the input data and replace "%s" in the Service URL with the value. You may connect a File Reader and JSON Parser Snaps in front of REST Delete Snap and prepare the following JSON file to File Reader Snap: [ { "widget": { "id": "111", "name": "foo" } } { "widget": { "id": "555", "name": "bar" } } ] "https://www.example.com/slm/webservice/v2.0/defect/555"
Default value: [None] | |||||||
HTTP entity | The JSON path to the HTTP entity data in the input Map data, or leave this property empty if there is no entity data to send to the service URL. | |||||||
Batch size | Defines the batch size of the request. The incoming documents will be accumulated in a list up to the defined batch size before it is submitted to the endpoint. Make sure to only set this if your REST endpoint expects a list. Default value: None | |||||||
Show all headers | REST endpoint may return HTTP response with multiple headers with same header name. If this property is not selected, only one response header will be shown in the output document. If selected, the response header values are a list of objects. If any of these objects is a string in format "key1=value1; key2=value2; ...", it is parsed into a map data. Default value: Not selected | |||||||
Trust all certificates | Required. Trust all certificates, such as self-signed certificates. Default value: Not selected | |||||||
Follow redirects | Required. When selected, HTTP redirects will be followed. | |||||||
Query parameters | Lets you define query parameters. This is optional and can either be defined directly in the service URL, as separate parameters or both.
| |||||||
HTTP header | HTTP header key-value pairs
Default value: [None] | |||||||
Response entity type | This property allows you to select the response entity type in the output document. The available options include:
If TEXT or BINARY is selected, the Snap will not attempt to parse the entity content. If DEFAULT is selected, the Snap produces the expected result in most cases, but when failed to do so, users may set the Response entity type to TEXT or BINARY. Default value: DEFAULT | |||||||
Read timeout | The time in seconds to wait before aborting the request due to a failure to read from the target service. This option lets you specify a timeout value in seconds after which the request gets aborted. Default value: 900 seconds.
| |||||||
Connection timeout | The time in seconds to wait before aborting the request due to a failure to establish a connection to the target service. Default value: 30 | |||||||
Maximum request attempts | Specifies the maximum number of attempts to be made to receive a response. The request is terminated if the attempts do not result in a response. Example: 3 Default value: 5 | |||||||
Retry request interval | Specifies the interval (in seconds) between two successive requests. A retry happens only when the previous attempt resulted in an exception. Example: 10 Default value: 3 | |||||||
Snap execution | Select one of the three modes in which the Snap executes. Available options are:
|
Examples
The REST Delete Snap in the above example pipeline deletes the JIRA issue created and updated in the preceding Snaps in the pipeline.
The following JSON data is the input document to the Snap:
The following JSON data is the output provided by the Snap:
{
"response": { "headers": { "strict-transport-security": "max-age=315360000;includeSubdomains", "x-content-type-options": "nosniff", "x-seraph-loginreason": "OK", "connection": "keep-alive", "set-cookie": "atlassian.xsrf.token=BWCK-SR48-JN93-ESFC|c127207e6dcb6f113eb45ec4d1dc463829af8dc2|lin; Path=/; Secure", "content-type": "application/json;charset=UTF-8", "date": "Thu, 15 Jan 2015 18:49:00 GMT", "x-arequestid": "648x1343x1", "x-asen": "SEN-2848532", "content-length": "0", "x-asessionid": "1g8lldp", "cache-control": "no-cache, no-store, no-transform", "x-ausername": "admin", "server": "nginx" }, "statusLine": { "reasonPhrase": "No Content", "statusCode": 204, "protoVersion": "HTTP/1.1" }, "entity": null },
"original": { "id": "17392", "update": { "comment": [ { "add": { "body": "Bug has been fixed." } } ] } } }
Pipeline Downloads