REST Post [Not Recommended]
In this article
- 1
- 2 Overview
- 3 Snap Settings
- 3.1 Troubleshooting
- 4 Examples
Overview
You can use the REST Post Snap to to execute the HTTP Post method on a REST API service endpoint to create business object resources. The Snap also assigns a new URI to every business object that it creates. and returns this URI in the output view.
Prerequisites
None.
Supported Features
Works in Ultra Pipelines. We recommend you to set the batch size to 1.
Limitations and Known Issues
None.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
|---|---|---|---|---|
Input | Document |
|
| Each input document offers details associated with the data that must be posted to the target RESTful server. |
Output | Document |
|
| Each output document contains details associated with the outcome of the Post request.
|
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:
Learn more about Error handling in Pipelines. | |||
Snap Settings
Field Name | Field Type | Description |
|---|---|---|
Label*
| String | |
Service URL* | String/Expression | Specify the service endpoint URL of REST API. You can provide the URL in one of the following ways:
For example:
For example: For Snaps using AWS Signature V4 accounts, you can use the canonical name (CNAME) for the URI so it's not necessary for the URL to end with amazonaws.com or have the region and service provided in it. However, if you are using the CNAME you must provide it in the AWS Region and Service Name fields in the AWS Signature V4 account. The hostname in the CNAME must be equal to the bucket name. For example: New URI with CNAME: Here, the bucket name is The Snap finds the value at the JSON path $.widget.id in the input data and replaces "%s" in the Service URL with the value. You can connect File Reader and JSON Parser Snaps upstream of a REST Put Snap and prepare the following JSON file for the File Reader Snap: |
HTTP Entity
| String/Expression | |
Batch size
| String | |
Show all headers
| Checkbox | |
Single file upload: File
DefaultValue: N/A | String/Expression | |
Single file upload: File key
DefaultValue:file | String/Expression | |
Single file upload: Filename to be used
| String/Expression | |
Upload transfer request type
DefaultValue: Chunked transfer encoding | Dropdown list | The type of encoding that you want to use to safely transfer the entity to the user. The available options are:
If Chunked transfer encoding is selected, the header "Transfer-Encoding:chunked" will be added to the POST request, and the Snap uploads the given file in chunked transfer encoding. If Calculate content length is selected, the file size will be calculated and passed with header "Content-Length" in the POST request. Chunked transfer encoding can be used if the size of the given file cannot be calculated. |
Upload body type
DefaultValue: Multipart from-data | Dropdown list | Select the content-type processing for the entity body from the options available:
|
Single file Upload: Multipart Content-Type
DefaultValue: application/octet-stream | String/Suggestion | |
Form Upload | ||
Multipart Type
Default Value: FILE | Dropdown list | Choose the type of multipart upload that you want to initiate. The available options are:
|
Multipart Key DefaultValue: file | String/Expression | Specify the key required for the multi-part to upload a file or text as required. HTTP POST uses multi-part entity to achieve the form upload. The form data of its multi-part entity contains key-value pairs. Multipart Key can be anything and it depends on the service endpoint.
|
Multipart Value
Default Value: N/A Example:
| String/Expression | Specify the the file or text to be uploaded. If Multipart Type is FILE, the following are applicable:
If Multipart Type is a TEXT, then
For Text part upload using Form Upload, the Http Entity and Filename to be used are ignored. |
HTTP Entity
DefaultValue: N/A | String/Expression | Specify the HTTP entity of the file that you want to upload.
|
Filename to be used
DefaultValue: N/A | String/Expression |
|
Multipart Content-Type
DefaultValue: N/A | String/Suggestion | Select the content type headers for the data in the body of the multipart HTTP request. The available options are:
If the Multipart Type is TEXT, it is generally not required to specify any value in this field. When you do not specify any value, the API uses the default value
|
Trust all certificates
DefaultValue: Deselected | N/A | |
Follow redirects
DefaultValue: Selected | N/A | |
Query parameters | ||
Query parameter
DefaultValue: N/A | N/A | Specify the name (or key) of the query parameter.
|
Query parameter value
DefaultValue: N/A | N/A | Specify the value associated with the query parameter.
|
HTTP Header | Configuring HTTP headers helps avoid problems in reading or opening files uploaded using the REST Post Snap. Refer to the Troubleshooting section, below, for more information. | |
Key
Default Value: N/A | String/Expression | Specify the name of the HTTP header.
|
Value
DefaultValue: N/A | String/Expression | Specify the value of the HTTP header.
|
Response entity type
DefaultValue: DEFAULT | Dropdown list | Select one of the following response entity types you want the Snap to display in the output document.:
|
Cookie Policy
Default Value:Ignore Cookies | Dropdown list | Select a Cookie Policy from the following options:
When using a cookie policy, you must select Show All Headers checkbox to view the parsed cookies from the cookie policy specification. |
Read timeout
DefaultValue: 900 | Integer | |
Connection timeout
DefaultValue: 30 | Integer | |
Maximum request attempts
| Integer | |
Retry request interval
| Integer | Select one of the following response entity types you want the Snap to display in the output document.:
|
Retry Policy
| Dropdown list | |
Normalize URL | Checkbox | |
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2025 SnapLogic, Inc.