Post-Migration Notes

This topic provides recommendations, limitations, troubleshooting information, and header property mappings applicable after migrating REST Snaps and Accounts to HTTP Client Snaps.

Recommendations

Note: We recommend that you use the Create Action type when migrating your accounts or pipelines. The Update action has a limitation: when you use the Update action, the account type still displays as REST type in the Manager despite being migrated to HTTP Client, because the Manager doesn’t fetch the account type information from the account metadata.

Limitations

The following fields are not available in the HTTP Client Snap:

  • Batch Size: To work with input documents in a batch using the HTTP Client, refer to the example provided.
  • Process array
  • Normalize URL: The HTTP Client normalizes the URL by default in the backend.
  • There is no property available to specify the upload file name for both single-file and multi-file uploads. The HTTP Client Snap uses the uploaded file name internally.
  • There is no property available for the Upload transfer request type; the HTTP Client Snap calculates content length internally.

Accounts:

As part of the migration, the active REST account token is copied to the HTTP Client token for all token-based accounts. As long as the token is valid and the target endpoint contains the valid redirect URI (https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/apisuite), the accounts will work as expected.

  • REST In-memory OAuth2 accounts will be migrated to HTTP Client OAuth2 accounts by considering Header authenticated=true and Auth endpoint=token endpoint URL to avoid validation errors.
  • The script migrates Dynamic OAuth2 accounts to Secure Header accounts in HTTP Client.
Important: For all OAuth2 accounts, the OAuth2 app in the endpoint (for example, Microsoft) must be configured with the HTTP Client’s Redirect URI: https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/apisuite.

Limitations addressed as part of the migration pipeline:

  • The HTTP Client Snap writes an output document after evaluating Pagination Properties. Therefore, when snap.out.totalCount is used, it is not evaluated correctly. This limitation is addressed in the script by updating snap.out.totalCount to snap.out.totalCount+1 for pagination properties.
  • For multipart-related file uploads, in the REST Post Snap, when an entity is not provided, the Snap constructs the JSON body based on the filename of the selected file. This behavior is automated in the HTTP Client Snap, where the script automatically generates a new row with entity fileName in case of multipart uploads.
  • The REST Snap outputs the response as part of the response object, but the structure of the response differs for the HTTP Client. This conversion is handled in the upstream Snap.
  • View names between REST and HTTP Client have changed. As part of the script, we ensure that output and error views are connected properly.
  • In REST Snaps, query parameters are encoded using +, but in HTTP Client, %20 is used by default. The script enables the Use form encoding for spaces checkbox in HTTP Client to ensure behavior consistency with REST Snaps.
Note:
  • When the pagination URL is provided, the Page size is set to 0 in the HTTP Client GET request.
  • When single and multi-file uploads are selected and the Upload body type is multipart form-data, two upload requests occur in REST POST Snap; after migration, only one combined request is sent.
  • Header names differ between REST and HTTP Client Snaps. In REST Snaps, headers are lowercase; in HTTP Client Snap, they are title case. Consequently, any downstream Snaps referencing headers may fail until references are updated.

Troubleshooting

Error Resolution
If you encounter a script error (for example: Script failed with TypeError: Cannot read property "size" from undefined, label=Update Metadata, resolution=Fix the errors in the script file) Contact customer support at support@snaplogic.com for assistance.
Metadata error: Errors while reading the pipeline metadata. Ensure the source pipeline is working as expected.
Pipeline error: Error while creating the Migration pipeline. Verify that a pipeline with the same name does not already exist, and ensure that you have sufficient permissions to create pipelines in that space.
If a source pipeline or account contains an asterisk (*) The pipeline might skip migrating that pipeline, as the Metadata Read Snap fails to read such paths. Remove the asterisk (*) from the pipeline name and retry.

Header Properties

If the upstream Snaps in your REST pipelines use the following headers, use the corresponding HTTP Client Snap header in title case as shown in the following table:

REST Get Snap Headers HTTP Client Snap Headers
"access-control-allow-methods""Access-Control-Allow-Methods"
"access-control-allow-credentials""Access-Control-Allow-Credentials"
"access-control-expose-headers""Access-Control-Expose-Headers"
"access-control-allow-headers""Access-Control-Allow-Headers"
"access-control-max-age""Access-Control-Max-Age"
"cache-control""Cache-Control"
"connection""Connection"
"content-security-policy""Content-Security-Policy"
"content-type""Content-Type"
"content-length""Content-Length"
"date""Date"
"expires""Expires"
"pragma""Pragma"
"server""Server"
"strict-transport-security""Strict-Transport-Security"
"x-sl-userid""X-SL-UserID"
"x-sl-statuscode""X-SL-StatusCode"
"x-xss-protection""X-XSS-Protection"
"x-frame-options""X-Frame-Options"
"x-content-type-options""X-Content-Type-Options"