The Regions API uses the request header x-lw-region
in conjunction with the Clusters API to:
-
Specify where a resource is created
-
Modify resources in a region
-
Delete resources in a region
-
Check the status of resources in a region
For more information, see:
Examples
List all regions
Request
curl -X GET "https://pg01.us-west1.cloud.lucidworks.com/managed/api/regions"
-H "accept: /" \
-H 'Authorization: {bearerToken}' \
Response
{
"us-west2": [
{ "provider": "aws", "providerRegion": "us-west-2","providerLocation" : "Oregon", "publicDomain": "pa00.us-west2.cloud.lucidworks.com" }
],
"us-west1": [
{ "provider": "gcloud", "providerRegion": "us-west1", "providerLocation" : "Oregon", "publicDomain": "pg01.us-west1.cloud.lucidworks.com" }
]
}
List region info by ID
Request
curl -X GET "https://pg01.us-west1.cloud.lucidworks.com/managed/api/regions/us-west1"
-H "accept: /" \
-H 'Authorization: {bearerToken}' \
Response
{
"us-west1": [
{ "provider": "gcloud", "providerRegion": "us-west1", "providerLocation" : "Oregon", "publicDomain": "pg01.us-west1.cloud.lucidworks.com" }
]
}
Create a cluster
The following will use the request header x-lw-region
to create a cluster within a specified region, us-west1
.
Request
curl -X POST \
https://pg01.us-west1.lucidworks.com/managed/api/customers/lucidworks/clusters \
-H 'Authorization: Bearer {bearerToken}' \
-H 'Content-Type: application/json' \
-H 'accept: application/json' \
-H 'x-lw-region: us-west1' \
-d '
{ "id": "product-demo-1", "nodeCount": 2, "nodeType": "standard.small", "storageSizeGB": 20, "description": "Cluster for demo", "maintenanceTimeFrame": "SUN 21:45" }
Response
A response noting the taskID
, in this case 566
, will be received if the request is successful.
{ "taskId": "566", "status": "submitted" }
Check the status of a cluster
The following will check the status of the cluster creation task from above using a GET
request and the x-lw-region
request header.
Request
curl -X GET \
https://pg01.us-west1.lucidworks.com/managed/api/customers/lucidworks/tasks/566 \
-H 'Authorization: Bearer {bearerToken}' \
-H 'x-lw-region: us-west1'
Response
{ "id": 566, "clusterId": "product-demo-1", "description": "Cluster for demo", "progress": 0, "status": "running", "createdTime": "2019-12-336T01:07:54+0000", "updatedTime": "2019-12-336T01:07:54+0000" }
This API call only works after the cluster is successfully created.
Request
curl -X GET \
https://pg01.us-west1.lucidworks.com/managed/api/customers/lucidworks/clusters/product-demo-1 \
-H 'Accept: /' \
-H 'Authorization: Bearer {bearerToken}' \
-H 'x-lw-region: us-west1'
Response
{
"id": "product-demo-1",
"nodeCount": 2,
"nodeType": "standard.small",
"storageSizeGB": 20.0,
"description": "test cluster in dg01",
"maintenanceTimeFrame": "SUN 21:45",
"version": "8.2.0",
"autoscaling":
{ "enabled": false, "minNodes": 0, "maxNodes": 0, "targetSearchRate": 0, "schedule": null }
,
"enableBackups": true,
"customerId": "lucidworks",
"address": "https://pg01.us-west1.lucidworks.com/lucidworks/product-demo-1/solr/",
"status": "ready"
}
Check the status of all clusters in a region
The following will check the status of all clusters in all regions using a GET
request and the x-lw-region: ALL
request header.
Request
curl -X GET \
https://pg01.us-west1.lucidworks.com/managed/api/customers/lucidworks/clusters \
-H 'Accept: /' \
-H 'Authorization: Bearer {bearerToken}' \
-H 'x-lw-region: ALL'
Response
{
"id": "product-demo-1",
"nodeCount": 2,
"nodeType": "standard.small",
"storageSizeGB": 20.0,
"description": "Cluster for demo",
"maintenanceTimeFrame": "SUN 21:45",
"version": "8.2.0",
"autoscaling":
{ "enabled": false, "minNodes": 0, "maxNodes": 0, "targetSearchRate": 0, "schedule": null }
,
"enableBackups": true,
"customerId": "lucidworks",
"address": "https://pg01.us-west1.lucidworks.com/lucidworks/product-demo-1/solr/",
"status": "ready"
}
{
"id": "product-demo-2",
"nodeCount": 3,
"nodeType": "standard.small",
"storageSizeGB": 30.0,
"description": "A second cluster for demo",
"maintenanceTimeFrame": "SUN 21:45",
"version": "8.2.0",
"autoscaling":
{ "enabled": false, "minNodes": 0, "maxNodes": 0, "targetSearchRate": 0, "schedule": null }
,
"enableBackups": true,
"customerId": "lucidworks",
"address": "https://pg01.us-west1.lucidworks.com/lucidworks/product-demo-2/solr/",
"status": "ready"
}
...