Use the app management endpoints to create a Site Search app and retrieve its endpoints and API keys.
Authentication
Headers
| Name | Type | Description |
|---|---|---|
account
|
string
|
Your account name. Required. |
Create a Site Search App
Note: You can create up to 10 Site Search apps per account in any 60-minute window. If you exceed this limit, the API returns 429 Too Many Requests.
Endpoint
POST https://app.searchstax.com/api/rest/experience-manager/v2/apps
Query Parameters
| Name | Type | Description |
|---|---|---|
account
|
string
|
Your account name. Required. |
Headers
| Name | Type | Description |
|---|---|---|
Content-Type
|
string
|
application/json.
|
Body Parameters
| Name | Type | Description |
|---|---|---|
name
|
string
|
App name. Required. Constraints: Allowed characters: letters, numbers, underscore (_). Hyphens are not allowed. Min length 6, max length 126.
|
platform
|
string
|
Application platform. Required. Allowed values : Sitecore, Custom App, Drupal.
|
region
|
string
|
Deployment region. Required. Allowed values: North Virginia, US; Frankfurt, DE; Oregon, US; Montreal, CA; Ireland, DU; Sydney, AU; Tokyo, JP; Singapore, AP.
|
platform_version
|
string
|
Drupal version. Optional. Allowed values: 11, 10, 9, 8, 7.
|
environment
|
string
|
Deployment environment. Optional. Allowed values: Development, Production, Staging, QA, UAT.
|
Request
Use this curl request to create a Site Search app:
curl -s -X POST \
-H "Authorization: Token <token>" \
-H "Content-Type: application/json" \
"https://app.searchstax.com/api/rest/experience-manager/v2/apps?account=<account_name>" \
-d '{
"name": "api_docs_test",
"platform": "Drupal",
"region": "North Virginia, US",
"platform_version": "11",
"environment": "Production"
}'
Response
The response includes:
| Name | Type | Description |
|---|---|---|
success
|
boolean
|
true or false (JSON boolean literals are lowercase).
|
app_id
|
integer
|
The new app ID. |
message
|
string
|
Returned when: success=false or on non-2xx responses.
|
The response looks like this:
{
"app_id": 1234,
"success": true
}
Note: App creation is asynchronous. After creating an app, poll the app details endpoint and wait for app_ready=true before using the generated endpoints and tokens.
Get App Status, Endpoints, and API Keys
Endpoint
GET https://app.searchstax.com/api/rest/experience-manager/v2/apps
Query Parameters
| Name | Type | Description |
|---|---|---|
account
|
string
|
Your account name. Required. |
appId
|
string
|
App ID. Optional. |
Request
Use this curl request to get app status, endpoints, and API keys:
curl -s \
-H "Authorization: Token <token>" \
"https://app.searchstax.com/api/rest/experience-manager/v2/apps?account=<account_name>&appId=<app_id>"
Response
Use app_ready to determine whether the app is ready for use.
The response also includes the endpoints and keys you use for Search, Update, Analytics, and Discovery, including:
| Name | Type | Description |
|---|---|---|
app_ready
|
boolean
|
Indicates whether the app is ready for use. |
search_endpoint
|
string
|
Search endpoint URL. |
update_endpoint
|
string
|
Update endpoint URL. |
read_token
|
string
|
Read token. |
write_token
|
string
|
Write token. |
analytics_endpoint
|
string
|
Analytics endpoint URL. |
analytics_app.key
|
string
|
Analytics app key. |
analytics_app.reporting_key
|
string
|
Analytics reporting key. |
suggester_endpoint
|
string
|
Suggester endpoint URL. |
popular_search_endpoint
|
string
|
Popular Searches endpoint URL. |
related_search_endpoint
|
string
|
Related Searches endpoint URL. |
discovery_api_key
|
string
|
Discovery API key. |
The response looks like this:
{
"analytics_app": null,
"analytics_endpoint": "https://app.searchstax.com",
"app_ready": false,
"discovery_api_key": "<discovery_api_key>",
"environment": "Production",
"id": 1234,
"name": "api_docs_test",
"platform": "Drupal",
"platform_version": "11",
"popular_search_endpoint": "https://app.searchstax.com/api/v1/1234/popular-search/",
"read_token": "<read_token>",
"related_search_endpoint": "https://app.searchstax.com/api/v1/1234/related-search/",
"search_endpoint": null,
"suggester_endpoint": null,
"update_endpoint": null,
"write_token": "<write_token>"
}