Skip to main content
POST
/
1
/
transformations
/
{transformationID}
/
try
curl
curl --request POST \
  --url https://data.us.algolia.com/1/transformations/6c02aeb1-775e-418e-870b-1faccd4b2c0f/try \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
  --data '{"code":"lorem","type":"code","input":{"code":"lorem"},"sampleRecord":{},"authentications":[{"type":"googleServiceAccount","name":"lorem","platform":"bigcommerce","input":{"clientEmail":"service-account-name@project-id.iam.gserviceaccount.com","privateKey":"lorem"}}]}'
{
  "payloads": [
    "<string>"
  ],
  "error": {
    "code": 123,
    "message": "<string>"
  }
}
Required ACL: addObject, deleteIndex, editSettings

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Path Parameters

transformationID
string
required

Unique identifier of a transformation.

Example:

"6c02aeb1-775e-418e-870b-1faccd4b2c0f"

Body

application/json
sampleRecord
object
required

The record to apply the given code to.

code
string
deprecated

It is deprecated. Use the input field with proper type instead to specify the transformation code.

type
enum<string>

The type of transformation, which can be either 'code' or 'noCode'.

Available options:
code,
noCode
input
object

The input for the transformation, which can be either code or a no-code configuration. Input for a transformation that contains the source code of the transformation.

  • Option 1
  • Option 2
authentications
object[]

Response

OK

payloads
string[]
required

The array of stringified records returned by the transformation service.

error
object

The error if the transformation failed.

I