Get Credentials

Get credentials

After signing in, you can create credentials that can be used to call the Platform APIs.

Query Service API (1.0)

Download OpenAPI specification:Download

Use the Adobe Experience Platform Query Service API to query Platform data with standard SQL. With this serverless tool, you can join any datasets in the Experience Platform Data Lake and capture the query results as a new dataset for use in reporting, Data Science Workspace, or for ingestion into Real-time Customer Profile.

Related Documentation:

Visualize API calls with Postman (a free, third-party software):

API paths:

  • PLATFORM Gateway URL: https://platform.adobe.io/
  • Base path for this API: /data/foundation/query
  • Example of a complete path: https://platform.adobe.io/data/foundation/query/queries

Required headers:

  • All calls require the headers Authorization, x-gw-ims-org-id, and x-api-key. For more information on how to obtain these values, see the authentication tutorial.
  • All resources in Experience Platform are isolated to specific virtual sandboxes. All requests to Platform APIs require the header x-sandbox-name whose value is the all-lowercase name of the sandbox the operation will take place in (for example, "prod"). See the sandboxes overview for more information.
  • All requests with a payload in the request body (such as POST, PUT, and PATCH calls) must include the header Content-Type with a value of application/json.

API error handling:

(NEW) Interactive API documentation

You can now interact with the Experience Platform API endpoints directly from this API reference page. Get your authentication credentials and use the Try it functionality in the right rail. Note that by using this functionality, you are making real API calls. Keep this in mind when you interact with production sandboxes.

Queries

The queries endpoint uses standard SQL to query data held in Adobe Experience Platform. For example, you can join any number of datasets in the data lake and capture the results as a new dataset.

List queries

This request provides a list of queries for your organization.

Request
query Parameters
orderby
string

The field that specifies the order of results. The supported fields are created and updated. Prepend the property name with + for ascending and - for descending order. The default is -created. Note that the plus sign (+) has to be escaped with %2B. For example %2Bcreated is the value for an ascending created order.

limit
integer

Restrict the maximum number of records that should be returned for a given request.

start
string

The timestamp used with orderby to order the returned results.

property
string

Comma-separated filters. Multiple filters separated by commas can be passed. The examples below are given with unsafe HTML characters for clarity, but all content MUST be HTML escaped.

The following list of properties allow filtering with all operators: created, updated, state, id.

The following is a list of supported operators: > (greater than) < (less than), >= (greater than or equal to), <= (less than or equal to) == (equal to), != (not equal to), ~ (contains)

Examples with filters that support all operators:

  • Get query with a match on id: id==6ebd9c2d-494d-425a-aa91-24033f3abeec
  • Get queries created after a given timestamp, and with a specific state: created>=2017-04-05T13:30:00Z,state==IN_PROGRESS Filtering is also allowed with limited operators on the following properties:
  • The referenced_datasets and userId property. This filter only allows the == equal to operator, and up to 10 dataset IDs can be included by using the || logical OR operator. Example: referenced_datasets==aabbcc||ddeeff
  • The SQL property. This filter only allows the contains operator (~), and only one SQL string WITHOUT a comma (,) can be included. Example: sql~SELECT c1
  • the templateId property: This filter only allows the equal to operator (==), and only one template ID can be included. Example: templateId=3e61c592-05de-422e-99be-24712c07fc29
  • the templateName property: This filter only allows the contains operator (~), and only one templateName can be included. Example: templateName~sample-template-name
  • The client property. This filter only allows the == equal to operator, and only one SQL string WITHOUT a comma (,) can be included. Example: client==API
  • The scheduleId and scheduleRunId properties. These filters only allow the == equal to operator. Example: scheduleId==bWFudWFsX18yMDE4LTEwLTEyVDA0OjM2OjE5LjkzNzI2Nw==,scheduleRunId==manual__2018-10-12T05:11:40.816520 Example of a complex search with multiple filters:
  • Get me queries that utilize two specific datasets, submitted by a particular user, and that include the string SELECT c1 in the SQL body: referenced_datasets==aabbcc||ddeeff,userId=1234@AdobeId,sql~SELECTc1
excludeSoftDeleted
boolean

Whether to include any queries that have been soft deleted. Defaults to true. Soft-deleting stops the query from being returned on GET requests to the /queries endpoint but does not delete it from the system.

excludeHidden
boolean

Whether to include any low-level queries issued as part of the Postgres protocol that were not user driven. Examples include CURSOR definitions, FETCH, and Metadata queries. true is the default value.

isPrevLink
boolean

isPrevLink is used in pagination. Results are sorted using the created timestamp and the orderby property. When navigating pages of results, isPrevLink is set to true when paging backwards. It reverses the order of the query. See "next" and "prev" links as examples.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/queries
Response samples
application/json
{}

Create a query

This request creates a new query configured by the values provided in the payload. The query required in the request body can be either an SQL statement or a template ID.

Request
header Parameters
x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Content-Type
required
string

The type of content being sent in the body of the request. The value should be 'application/json'.

Request Body schema: application/json
required

The request body for creating a query.

dbName
string

The name of the database you are making the query to. The value for dbName should take the format of {SANDBOX}:{DATABASE}.{SCHEMA}.

sql
string

The SQL query statement. You can either use standard SQL (such as SELECT * FROM t1;) or include parameter replacements. To use a parameter replacement in the SQL you must prepend the parameter key with a $. For example, $key, and provide the parameters used in the SQL as JSON key value pairs in the queryParameters field. The values passed here will be the default parameters used in the template. If you want to override these parameters, you must override them in the POST request.

object

A key value pairing to replace values in the SQL statement. These are required if you are using parameter replacements. No value type checking will be done on these key value pairs.

templateId
string

The unique identifier for the query created and saved using a POST request to the /query-templates endpoint.

name
string

An optional human friendly name for the query.

description
string

An optional comment on the intended purpose of the query.

object

If this property is defined, then this query will be converted into an INSERT INTO query. Optional.

object

If this property is defined, this query will be converted into a CTAS query. Optional.

Responses
202

Query status

400

Bad request

401

Unauthorized

500

Internal server error

post/queries
Request samples
application/json
{
  • "dbName": "acmesbox1:acmeacceldb:accmeaggschema",
  • "sql": "SELECT $key FROM $key1 WHERE $key > $key2;",
  • "queryParameters": {
    },
  • "templateId": "0094d000-9062-4e6a-8fdb-05606805f08f",
  • "name": "Sample Query Template for ACME Data",
  • "description": "This query returns all account details.",
  • "insertIntoParameters": "sampling_test_geometrix_sitesection_copy",
  • "ctasParameters": {
    }
}
Response samples
application/json
{}

Retrieve a query

This endpoint provides the query information that relates to the query ID provided in the request.

Request
path Parameters
queryid
required
string

The query ID for the resource that you want to retrieve.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/queries/{queryid}
Response samples
application/json
{}

Request cancellation or query soft delete

This request cancels the execution of the query that relates to the query ID provided in the request.

Request
path Parameters
queryid
required
string

Query ID

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Content-Type
required
string

The type of content being sent in the body of the request. The value should be 'application/json'.

Request Body schema: application/json
required

Use JSON Patch formatting to cancel or soft delete a query.

op
string

The type of operation to perform on the resource.

Enum: "cancel" "soft_delete"
Responses
202

Success

401

Unauthorized

404

Not found

409

Failed

500

Internal server error

patch/queries/{queryid}
Request samples
application/json
{
  • "op": "cancel"
}

Connections

The connections endpoint retrieves connection parameters for the interactive interface.

List connection parameters

This request lists the connection parameters used for the interactive interface.

Request
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

500

Internal server error

get/connection_parameters
Response samples
application/json
{
  • "host": "acme-prod.platform-query.adobe.io",
  • "port": 80,
  • "username": "{USER_NAME}",
  • "token": "NCSDFBRlhQRTdJWFVLR01RRjI3WUJRND09PT09PSIsInNpZCI6IjE2NfkwNTg3ODc4MDVfMzI2YWE0NfQtODFlYy00MWI4LWFlMjctNjU3MThhYjIxOGE5X3VlMSIsIm1vaSI6ImYwYjJjYjkxIiwicGJhIjoiTWVkU2VjTm9FVixMb3dTZWMiLCJleHBpcmVzX2luIjoiODY0MDAwMDAiLCJzY29wZSI6ImFiLm1hbmFnZSxhZGRpdGlvbmFsX2luZm8sYWRkaXRpb25hbhMS5hZG9iZWxvZ2luLmNvbS9pbXMvc2Vzc2lvbi92MS9ORGt6TkRZMU5HTXRaVEUxTVMwMFl6SXdMVGd6T0RBdFlURTBNVGhsTVRkbFlqRXpMUzFHUmpsQk1FTkVNell3T1VGRk56RXdNRUUwT1RWRFJETkFRV1J2WW1WSlJBXCJ9IiwiYXMiOiJpbXMtbmExIiwiYWFfaWQiOiJGRjlBMENEMzYwOUFFNzEwMEE0OTVDRDNAQWRvYmVJRCIsImN0cCI6MCwiZmciOiJXNjF9pbmZvLmpvYl9mdW5jdGlvbixhZGRpdGlvbmFsX2luZm8ucHJvamVjdGVkUHJvZHVjdENvbnRleHQsYWRkaXRpb25hbF9pbmZvLnJvbGVzLEFkb2JlSUQsYWRvYmVpby5hcHByZWdpc3RyeS5yZWFkLGFkb2JlaW9fYXBpLGF1ZGllbmNlbWFuYWdlcl9hcGksY3JlYXRpdmVfY2xvdWQsbXBzLG9wZW5pZCxyZWFkX29yZ2FuaXphdGlvbnMscmVhZF9wYyxyZWFkX3BjLmFjcCxyZWFkX3BjLmRtYV90YXJ0YW4sc2Vzc2lvbiIsImNyZWF0ZWRfYXQiOiIxNjY5MDY2NzY2MzY0In0.ZPNyd7JHKFRfrPFtGh8SqoGK7em0AT7WN_LK_DHGzPZr5WqGCcdUE-qEifOa-DqdiAUM2OCNHCXjzN1U9TZu7xs-AZYkz8dEjMQmDfxTcdCSJDHTPYVqWCxxARvw9hS62QhJsAsJ2b08reo0Q6qoTeRlXt1xyl4pVruf2rHmC_Dz8EkujrZsdmxTLgsIkCfYOXnKISVLrqAtQbmNwcSmhBmpmYCDVvU8v1qjrSb3Qd11nw56a5CLHJZQ2y8adm6TUsqtXyGZGSDvdYPbwCEMNHs_Uk9F1PaT51NH1AKKr6a4lA1E3SOUE6ithAytqcA4wyoLqz86PCPMmmbPG7_jEQeyJhbGciOiJSUzI1NiIsIng1dSI6Imltc19uYTEta2V5LWF0LTEuY2VyIiwia2lkIjoiaW1zX25hMS1rZXktYXQtMSIsIml0dCI6ImF0In0.eyJpZCI6IjE2NjkwNjY3NjYzNjRfNGFhN2NjZDMtYTdiNi00NGJkLWFjMzAtYjIyNGFkNDk3NDk4X3VlMSIsInR5cGUiOiJhY2Nlc3NfdG9rZW4iLCJjbGllbnRfaWQiOiJleGNfYXBwIiwidXNlcl9pZCI6IkMzNUI3OEJFNjJERDVERDcwQTQ5NUU3NEBjMGZjNzc0NjYyZGQzODlkNDk1YzBjLmUiLCJzdGF0ZSI6IntcInNlc3Npb25cIjpcImh0dHBzOi8vaW1zLW5",
  • "compressedToken": "Nkgt8JNlbpg32ldmZrPOK1lo1oc1kZQkgw6lingKlj_wt3DRUshQ2cS22qDaUhL9RX212pIl9sKtZh35x1o1aCacFvGsU3TJ-rSotX_Y3XqFK09qlw9qHlUrlmyhqxlK1u3txGAP90mPGTNmy4mUkmjjKbA8YMS8utyFmpNtxe161trlNJbnfhuWqWUMk9dJnbI1Szz68LrP6352vINTQaKvs0bF03u9MFz0F__cGsj79_9RxV.eNoBAAH__mTzcneyRyhUX6zxbRofEqqBiu3ptAE-1jfyyvwxxsz2a-VqhgnHVBPqhInzmvg6nYgFDNjgjRwl48zdVPU2bu8bPgGWJM_HRIzEJg38U3HQkiQx0z2FalgscQEb8PYUutkISbALCdm9PK3qNEOqqE3kZV7dccpeKVa7n9qx5gew8_BJLo62bHZsUy4LCJAn2Dl5yiElS66gLUG5jcHEpoQZqZmAg1b1PL9ao60m90HddZ8OemuQixyWUNsvGnZuk1LKrV8hmRkg73WD28AhDDR7P1JPRdT2k-dTR9QCiq-muFQNRN0jlBOorYQMranAOMMqC6s_OjwjzJpmzxu_4xE5BXzTeNqrVkrMSVeyUgoKNjI1U9JRqjAtBfIyc4vj8xINdbNTK3UTS3QN9ZJTi4CS2ZkpWCSBEpklJUCJxBKlWgC4CRff.eNplU39vmzAQ_S78DcSAY0OkSSWFdN1K2qbpj0yR0GE7qVOCEThJm6rjjSZJN6k1EvjevfM93x3vluTWwPIIiRAhlJCA4BwDUMZ44AAtiINxwR1gAXIK38fAcURxFOYb4Vm2pd9qYeKBMdG2uVYvojIoK6WodH44WryyHOraoJtWNEfsPOgPaThMiZ8k_SShKMZRP6X4jKEFoxQT4nMehJHJ1WeIucJEtxp0l-p9brUml1TV3BrMrWet63bQ68l161TgucBVIUq1lJXL1LqDeyd6b-v1xsnLfpzMvPFFpv9MUy-7Q2i2v9xdTZf76yTWs2mKsulzmU15OVul-6s772KyKodZOk6z_Wx3fT8ajffpLktTdD19SCbJOL59nGxn64dfk3hufRih0BqVJzmdCcc7j0ZRfM6TgKAoTqmHDnc29lneKb5MurLp2hog21osDf-RBMOffjx6uknp5dP974vsduTTWXyLfyxWV5L_veuH1Dyonwc-AcAEO6EnmIO9InRA-NQhfeqFUPjmFZ16t1bShC9Q4bMi6oC6AA",
  • "version": 1,
  • "dbName": "prod:all",
  • "websoketHost": "query-service-interactive-ws-prod-va7.cloud.adobe.io"
}

Schedules

Schedules let you perform SQL functions on a regular cadence from a start date to an end date or set a maximum number of runs.

List schedules

This request provides a list of all query schedules for your organization.

Request
query Parameters
orderby
string

The field that specifies the order of results. The supported fields are created and updated. Prepend the property name with + for ascending and - for descending order. The default is -created. Note that the plus sign (+) has to be escaped with %2B. For example %2Bcreated is the value for an ascending created order.

limit
integer

Restrict the maximum number of records that should be returned for a given request.

start
string

The timestamp used with orderby to order the returned results.

property
string

Comma-separated filters. Multiple filters separated by commas can be passed.

Properties that allow filtering with all operators: created

The list of supported operators:

> (greater than) < (less than)

Examples with filters that support all operators:

  • Get me schedules created after a timestamp: created>2017-04-05T13:30:00Z

Filtering is also allowed with limited operators on the following properties:

  • The templateId property. This filter only allows the == equal to operator. Example: templateId==123412354
  • The userId property. This filter only allows the == equal to operator. Example: userId==123412354
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/schedules
Response samples
application/json
{}

Create a scheduled query

This request creates a new schedule for the query provided in the request payload.

Request
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Request Body schema: application/json
required

The request body for creating a schedule.

required
object (query_def)

The POST request payload sent to the /queries endpoint.

required
object (schedules_request)

Information on the cadence of the query schedule.

Responses
202

Success

400

Bad request

401

Unauthorized

500

Internal server error

post/schedules
Request samples
application/json
{
  • "query": {
    },
  • "schedule": {
    }
}
Response samples
application/json
{}

Retrieve a schedule

This request lists the details for the schedule ID provided in the request path. It returns schedule information that includes the state, creation date, and updated date of the scheduled query, as well as the cadence and user ID who created the schedule.

Request
path Parameters
schedulesId
required
string

The ID of the schedule you want to retrieve run information for.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/schedules/{schedulesId}
Response samples
application/json
{}

Delete a schedule

This request deletes the query schedule for the schedule ID provided in the request path.

Request
path Parameters
schedulesId
required
string

The ID for the schedule you want to delete.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
202

Success

400

Request failed

401

Unauthorized

404

Not found

500

Internal server error

delete/schedules/{schedulesId}

Update a schedule

This request updates the details of the schedule for the schedule ID provided in the request path.

Request
path Parameters
schedulesId
required
string

The ID for the schedule you want to update.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Request Body schema: application/json
required

Use JSON Patch formatting to update the schedule.

Array of objects (schedule_patch_operation)

The payload necessary to update the query schedule.

Responses
202

Success

400

Request failed

401

Unauthorized

404

Not found

500

Internal server error

patch/schedules/{schedulesId}
Request samples
application/json
{
  • "body": [
    ]
}

List all runs for a schedule

This request lists the run details for the schedule ID provided in the request path.

Request
path Parameters
schedulesId
required
string

The ID for the schedule who's run you want to list.

query Parameters
orderby
string

The field that specifies the order of results. The supported fields are created and updated. Prepend the property name with + for ascending and - for descending order. The default is -created. Note that the plus sign (+) has to be escaped with %2B. For example %2Bcreated is the value for an ascending created order.

limit
integer

Restrict the maximum number of records that should be returned for a given request.

start
string

The timestamp used with orderby to order the returned results.

property
string

Comma-separated filters. Multiple filters separated by commas can be passed. Examples below are given with unsafe HTML characters for clarity, but all content MUST be HTML escaped.

Properties that allow filtering : created Supported operators: '>' (greater than) '<' (less than) state Supported operators: '==' (equal to) '!=' (not equal to) externalTrigger List of supported operators: '==' (equal to)

Examples with filters that support all operators:

  • Get me runs created after a timestamp: created>2017-04-05T13:30:00Z
  • Get me runs that have failed: state==FAILED * Get me runs that were manually triggered, and that succeeded: externalTrigger==true,state==SUCCESS
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/schedules/{schedulesId}/runs
Response samples
application/json
{}

Trigger an immediate run of a scheduled query

This request triggers an immediate run for the schedule ID provided in the request path.

Request
path Parameters
schedulesId
required
string

Schedule ID

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
202

Success

400

Schedule is disabled. Immediate run cannot be triggered

401

Unauthorized

404

Not found

500

Internal server error

post/schedules/{schedulesId}/runs

Retrieve details of a query schedule run

This request provides details about a specific run for a specific scheduled query. Both the schedule ID and the run ID must be provided in the request path.

Request
path Parameters
schedulesId
required
string

Schedule ID

runId
required
string

Run ID

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/schedules/{schedulesId}/runs/{runId}
Response samples
application/json
{}

Cancel a run of a scheduled query

This request cancels a specific run for a specific scheduled query. Both the schedule ID and the run ID must be provided in the request path.

Request
path Parameters
schedulesId
required
string

Schedule ID

runId
required
string

Run ID

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Request Body schema: application/json
required

Use JSON PATCH formatting to cancel a scheduled query run.

op
string

The payload to cancel a scheduled query run.

Value: "cancel"
Responses
202

Success

401

Unauthorized

404

Not found

500

Internal server error

patch/schedules/{schedulesId}/runs/{runId}
Request samples
application/json
{
  • "op": "cancel"
}

Alert Subscriptions

Alert subscriptions allow you to receive notifications on the different statuses of both ad hoc and scheduled queries. Alerts can be received by email, within the Platform UI, or both.

List alerts

This request provides a list of alerts.

Request
query Parameters
orderby
string

The field that specifies the order of results. The supported fields are created and updated. Prepend the property name with + for ascending and - for descending order. The default is -created. Note that the plus sign (+) has to be escaped with %2B. For example %2Bcreated is the value for an ascending created order.

pagesize
integer

Control the number of records you want to fetch from the API call per page. The default limit is set to the maximum amount of 50 records per page.

page
string

Indicate the page number of the returned results that you want to see the records for.

property
string

Comma-separated filters. Multiple filters separated by commas can be passed. The examples below are given with unsafe HTML characters for clarity, but all content MUST be HTML escaped.

The properties that allow filtering:

  • id
  • assetId
  • status
  • alertType

The list of supported operators:

== (equal to)

Examples with filters that support the (==)operator:

  • Get me the alert with a match on the id: id==query_flow_run_start-599442e0-433a-4708-85fc-e226e8092096
  • Get me alerts with a match on the assetId: assetId==700d43d9-3b99-4d4c-8dbb-29c911c0e0df
  • Get me alerts with a match on the status: status==enabled
  • Get me alerts with a match on the alertType: alertType==success An example of a complex search with multiple filters:
  • Get me alerts that utilize multiple filters: body: status==enabled,alertType==failure
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

500

Internal server error

get/alert-subscriptions
Response samples
application/json
{}

Create an alert and subscribe users

This request associates a query to a newly created alert using an assetId property, and subscribes users to alerts for that query through the use of emailIds.

Request
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-service-token
string

An optional key used to authenticate access.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Request Body schema: application/json
required

Create an alert for a particular query or schedule ID and subscribe emailIds to different notification channels.

assetId
required
string

The query or schedule ID that you want the alert to track.

alertType
required
string

The state of query execution that you want to trigger an alert. The alert type is one of three values (start, success, failure).

required
object

This object provides the details of the users that you want to receive the alert, including the preferred delivery method. You must include their email ID and preferred notification channels for the alerts.

Responses
200

Success

400

Request failed

401

Unauthorized

404

Not found

500

Internal server error

post/alert-subscriptions
Request samples
application/json
{
  • "assetId": "a679dd0e-bcb2-4e69-a610-22d17ba98cac",
  • "alertType": "failure",
  • "subscriptions": {
    }
}
Response samples
application/json
{}

List alert subscription information for a query or schedule

This request lists the alerts for the query ID or schedule ID provided in the request path. It returns subscription information that includes a list of all subscribed users by providing their email IDs and their chosen notification channels.

Request
path Parameters
assetId
required
string

A query or schedule ID that you want the subscription information for.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/alert-subscriptions/{assetId}
Response samples
application/json
{}

List alert subscription information for a particular query and alert type

This request lists the alerts and alert subscription information for the query ID and alert type provided in the request path.

Request
path Parameters
assetId
required
string

A query or schedule ID that you want the subscription information for.

alertType
required
string

This property describes the state of query execution that triggers an alert. The response will only include alert subscription information for alerts of this type. The alert type is one of three values (start, success, failure).

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

400

Request failed

401

Unauthorized

404

No alert was found for the given assetId.

500

Internal Server Error.

get/alert-subscriptions/{assetId}/{alertType}
Response samples
application/json
{}

Delete the alert for a particular query and alert type

Delete a specific alert by providing either an alert type and a query ID or an alert type and a schedule ID in the request path.

Request
path Parameters
assetId
required
string

A query ID or a schedule ID that you want to delete the alert for.

alertType
required
string

The state of query execution that triggers the alert to be deleted. The alert type is one of three values (start, success, failure).

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

400

Request failed

401

Unauthorized

404

No alert was found for the given assetId and alertType.

500

Internal Server Error.

delete/alert-subscriptions/{assetId}/{alertType}
Response samples
application/json
{
  • "message": "Alert deleted successfully for assetId: 6df22232-f427-4250-a4e1-43cd30990641 and alertType: success",
  • "statusCode": "200"
}

Enable or disable an alert

Update the status of an alert to either enable or disable by providing a query or schedule ID and an alert type in the request path.

Request
path Parameters
assetId
required
string

A query ID or a schedule ID for the resource that you want to update.

alertType
required
string

This property determines the state of query execution that triggers a user to receive an alert. The alert type is one of three values (start, success, failure).

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Request Body schema: application/json
required

Use JSON PATCH formatting to enable or disable an alert.

op
string

The operation to be performed. The only accepted value is replace. It replaces the current alert's status with the value provided in the request.

Value: "replace"
path
string

The path must be /status to ensure the alert status is updated.

Value: "/status"
value
string

The provided value will be the status of the alert after the update takes effect.

Enum: "enable" "disable"
Responses
200

Success

400

Request failed

401

Unauthorized

404

No alert found for the assetId and alertType provided.

500

Internal server error

patch/alert-subscriptions/{assetId}/{alertType}
Request samples
application/json
{
  • "op": "replace",
  • "path": "/status",
  • "value": "enable"
}
Response samples
application/json
{
  • "id": "query_service_flow_run_success-4422fc69-eaa7-464e-945b-63cfd435d3d1",
  • "assetId": "4422fc69-eaa7-464e-945b-63cfd435d3d1",
  • "alertType": "start",
  • "status": "enabled"
}

List information on all alerts that a user is subscribed to

This request lists the alerts subscribed to by the email ID provided in the request path. The returned information includes the alert name, IDs, status, alert type, and notification channels.

Request
path Parameters
emailID
required
string

An Adobe-registered email address whose alert subscriptions you want to retrieve.

query Parameters
orderby
string

The field that specifies the order of results. The supported fields are created and updated. Prepend the property name with + for ascending and - for descending order. The default is -created. Note that the plus sign (+) has to be escaped with %2B. For example %2Bcreated is the value for an ascending created order.

pagesize
integer

Control the number of records you want to fetch from the API call per page. The default limit is set to the maximum amount of 50 records per page.

page
string

Indicate the page number of the returned results that you want to see the records for.

property
string

Comma-separated filters. Multiple filters separated by commas can be passed. The examples below are given with unsafe HTML characters for clarity, but all content MUST be HTML escaped.

The properties that allow filtering:

  • id
  • assetId
  • status
  • alertType

The list of supported operators:

‘==` (equal to)

Examples with filters that support the (==)operator:

  • Get me the alert with a match on the id: id==query_flow_run_start-599442e0-433a-4708-85fc-e226e8092096
  • Get me alerts with a match on the assetId: assetId==700d43d9-3b99-4d4c-8dbb-29c911c0e0df
  • Get me alerts with a match on the status: status==enabled
  • Get me alerts with a match on the alertType: alertType==success An example of a complex search with multiple filters:
  • Get me alerts that utilize multiple filters: body: status==enabled,alertType==failure
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

400

Request failed

401

Unauthorized

500

Internal server error

get/alert-subscriptions/user-subscriptions/{emailID}
Response samples
application/json
{}

Query Templates

Query templates let you create, store, and execute any query as an ad hoc or scheduled service.

List query templates

This request provides a list of every query template.

Request
query Parameters
isPrevLink
boolean

isPrevLink is part of pagination. Results are sorted using the created timestamp and the orderby property. When navigating pages of results, isPrevLink is set to true when paging backwards. It reverses the order of the query. See "next" and "prev" links as examples.

orderby
string

The field that specifies the order of results. The supported fields are created and updated. Prepend the property name with + for ascending and - for descending order. The default is -created. Note that the plus sign (+) has to be escaped with %2B. For example %2Bcreated is the value for an ascending created order.

limit
integer

Restrict the maximum number of records that should be returned for a given request.

start
string

The timestamp used with orderby to order the returned results.

property
string

Comma-separated filters. Multiple filters separated by commas can be passed.

List of properties that allow filtering: name, userId, lastUpdatedBy.

  • The name property can only be filtered with the ~ (contains) operator. Only one name string WITHOUT a comma can be included. For example, property=name~maria.

  • The userId and the lastUpdatedBy properties can be used with the == (equal to) operator. Only one name string WITHOUT a comma can be included. For example, property=userId==49D005796000B4B20A495J85@acme.adobe.com

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/query-templates
Response samples
application/json
{}

Create a query template

This request creates a query template.

Request
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Request Body schema: application/json
required

The query template to be created.

sql
required
string

You can either use standard SQL or a parameter replacement. To use a parameter replacement in the SQL you must prepend the parameter key with a $. For example, $key, and provide the parameters used in the SQL as JSON key value pairs in the queryParameters field. The values passed here will be the default parameters used in the template. If you want to override these parameters, you must override them in the POST request.

object

A key value pairing to replace values in the SQL statement. These are required if you are using parameter replacements. No value type checking will be done on these key value pairs.

name
required
string

A descriptive and human readable name for the template.

Responses
202

Success

401

Unauthorized

500

Internal server error

post/query-templates
Request samples
application/json
{
  • "sql": "SELECT $key FROM $key1 WHERE $key > $key2;",
  • "queryParameters": {
    },
  • "name": "Test Parameterized Query"
}
Response samples
application/json
{}

Retrieve the count of query templates

This request retrieves the count of query templates.

Request
query Parameters
property
string

Comma-separated filters. Multiple filters separated by commas can be passed. Examples below are given with unsafe HTML characters for clarity, but all content MUST be HTML escaped.

Currently only userId is allowed in filtering count. Example: property=userId=={USER_ID}

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/query-templates/count
Response samples
application/json
{
  • "totalCount": 52,
  • "version": 1
}

Retrieve a query template

This request retrieves the query template for the template ID provided in the request path.

Request
path Parameters
queryTemplateId
required
string

The query template ID for the query template to be retrieved.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

get/query-templates/{queryTemplateId}
Response samples
application/json
{}

Update a query template

This request updates the query template for the template ID provided in the request path.

Request
path Parameters
queryTemplateId
required
string

The query template ID for the template to be updated.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Request Body schema: application/json
required

Query template to be created.

sql
required
string

You can either use standard SQL or a parameter replacement. To use a parameter replacement in the SQL you must prepend the parameter key with a $. For example, $key, and provide the parameters used in the SQL as JSON key value pairs in the queryParameters field. The values passed here will be the default parameters used in the template. If you want to override these parameters, you must override them in the POST request.

object

A key value pairing to replace values in the SQL statement. These are required if you are using parameter replacements. No value type checking will be done on these key value pairs.

name
required
string

A descriptive and human readable name for the template.

Responses
202

Success

401

Unauthorized

500

Internal server error

put/query-templates/{queryTemplateId}
Request samples
application/json
{
  • "sql": "SELECT $key FROM $key1 WHERE $key > $key2;",
  • "queryParameters": {
    },
  • "name": "Test Parameterized Query"
}
Response samples
application/json
{}

Delete a query template

This request deletes the query template for the template ID provided in the request path.

Request
path Parameters
queryTemplateId
required
string

The query template ID for the template to be deleted.

header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Responses
202

Success

401

Unauthorized

404

Not found

500

Internal server error

delete/query-templates/{queryTemplateId}
Response samples
application/json
{
  • "message": "Deleted",
  • "statusCode": 202
}

Accelerated Queries

Query the accelerated store in a stateless manner to quickly return results based on aggregated data.

Query the accelerated store

Run a query on accelerated store datasets by including either an SQL statement or a template ID within the request payload.

Request
header Parameters
Authorization
required
string

The access token which can be copied from your Experience Platform integration, prefixed with "Bearer " (for example, Bearer {ACCESS_TOKEN}). For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-gw-ims-org-id
required
string

The Organization ID which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-api-key
required
string

The API key which can be copied from your Experience Platform integration. For more information on how to obtain this value, visit the documentation covering making API calls in the authentication tutorial.

x-sandbox-name
required
string

The name of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

Content-Type
required
string

The type of content being sent in the body of the request. The value should be 'application/json'.

x-sandbox-id
string

The unique identifier of the sandbox in which the operation will take place. See the sandboxes overview documentation for more information.

x-request-id
string

An optional header that serves as a tracking ID for the request. If one is not provided on the request, the server generates one automatically.

User-Agent
string

The type of the client making the HTTP request.

Accept-Encoding
string

This request header indicates the type of content encoding that the client can understand when consuming compressed response bodies. It is usually a compression algorithm. Accepted values include gzip and identity.

Request Body schema: application/json
required

The request body to run a query on the accelerated store. The request accepts either a query string as sql or the ID of a saved query as templateId.

One of:

The query definition submitted to the query accelerated store.

dbName
required
string

The name of the database you are making an accelerated query to. The value for dbName should take the format of {SANDBOX_NAME}:{ACCELERATED_STORE_DATABASE}.{ACCELERATED_STORE_SCHEMA}. The database provided must exist within the accelerated store or the request will result in an error. You must ensure that the x-sandbox-name header and sandbox name in dbName refer to same sandbox.'

sql
required
string

An SQL statement string to be submitted to the query accelerated store. The maximum size allowed is 1000000 bytes. Accelerated queries require EITHER an SQL statement OR a template ID, but not both. Submitting both in a request causes an error.

name
string

An optional human-friendly, descriptive name for the accelerated query.

description
string

An optional comment on the intent of the query to help other users understand its purpose. The maximum size allowed is 1000 bytes.

Responses
200

Success

401

Unauthorized

404

Not found

500

Internal server error

post/accelerated-queries
Request samples
application/json

A payload for an accelerated query request that includes SQL in the payload.

{
  • "dbName": "acmesbox1:acmeacceldb:accmeaggschema",
  • "sql": "SELECT * FROM accounts;",
  • "name": "Accelerated Query Sample",
  • "description": "A sample of an accelerated query."
}
Response samples
application/json

A sample response for an accelerated query request that used SQL directly in the payload.

{
  • "queryId": "ba7aa60c-f5ab-47de-b980-c30789108efe",
  • "resultsMeta": {
    },
  • "results": {
    },
  • "request": {
    }
}