Platform - Configuration - Instances - CRUD

Get instance configurations

Get instance configurations.

Request

GET /api/v1/platform/configuration/instances

Query parameters

Name Type Required Description

show_deleted

boolean

N

If true, instance configurations marked for deletions are also returned. Otherwise, only instance configurations not marked for deletion are returned

Responses

200
(array[InstanceConfiguration]) A InstanceConfiguration
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/platform/configuration/instances \
-u $CLOUD_USER:$CLOUD_KEY

Create instance configuration

Create instance configuration and return the auto-generated ID.

Request

POST /api/v1/platform/configuration/instances

Request body

(InstanceConfiguration) (required) the Instance Configuration

Responses

201
(IdResponse) Instance Configuration added with the auto generated ID returned
400
(BasicFailedReply) cluster_type in the InstanceConfiguration model is invalid (code: 'configuration.invalid_cluster_type') or the discrete_sizes in the InstanceConfiguration model is invalid (code: 'configuration.invalid_discrete_sizes') or the metadata in the InstanceConfiguration model has empty keys or values (code: 'configuration.bad_meta_data')
403
(BasicFailedReply) system_owned or deleted_on cannot be set externally (code: 'configuration.system_owned')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPOST {{hostname}}/api/v1/platform/configuration/instances \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "allocator_filter" : {
      "bool" : {
         "filter" : [
            null
         ],
         "minimum_should_match" : 0,
         "must" : [
            null
         ],
         "must_not" : [
            null
         ],
         "should" : [
            null
         ]
      },
      "exists" : {
         "field" : "string"
      },
      "match" : {
         "some_property" : {
            "analyzer" : "string",
            "minimum_should_match" : 0,
            "operator" : "string",
            "query" : "string"
         }
      },
      "match_all" : {},
      "match_none" : {},
      "nested" : {
         "path" : "string",
         "query" : null,
         "score_mode" : "string"
      },
      "prefix" : {
         "some_property" : {
            "boost" : 0.1,
            "value" : "string"
         }
      },
      "query_string" : {
         "allow_leading_wildcard" : true,
         "analyzer" : "string",
         "default_field" : "string",
         "default_operator" : "string",
         "query" : "string"
      },
      "range" : {
         "some_property" : {
            "boost" : 0.1,
            "format" : "string",
            "gt" : {},
            "gte" : {},
            "lt" : {},
            "lte" : {},
            "time_zone" : "string"
         }
      },
      "term" : {
         "some_property" : {
            "value" : {}
         }
      }
   },
   "deleted_on" : "2019-01-01T00:00:00Z",
   "description" : "string",
   "discrete_sizes" : {
      "default_size" : 0,
      "resource" : "string",
      "sizes" : [
         0
      ]
   },
   "id" : "string",
   "instance_type" : "string",
   "metadata" : {},
   "name" : "string",
   "node_types" : [
      "string"
   ],
   "storage_multiplier" : 0.1,
   "system_owned" : true
}
'

Delete a instance configuration

Delete the instance configuration with the given id.

Request

DELETE /api/v1/platform/configuration/instances/{id}

Path parameters

Name Type Required Description

id

string

Y

ID of the instance configuration

Query parameters

Name Type Required Description

version

integer

N

If specified, checks for conflicts against the version of the repository configuration (returned in 'x-cloud-resource-version' of the GET request)

Responses

200
(EmptyResponse) Instance configuration specified by {id} was deleted
403
(BasicFailedReply) Instance configuration specified by {id} is system owned (code: 'configuration.system_owned')
404
(BasicFailedReply) Instance configuration specified by {id} cannot be found or the operation failed (code: 'configuration.instance_configuration_not_found')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XDELETE {{hostname}}/api/v1/platform/configuration/instances/{id} \
-u $CLOUD_USER:$CLOUD_KEY

Get instance configuration

Get instance configuration by id.

Request

GET /api/v1/platform/configuration/instances/{id}

Path parameters

Name Type Required Description

id

string

Y

ID of the instance configuration

Query parameters

Name Type Required Description

show_deleted

boolean

N

If true, if the instance configuration has been marked for deletion it is still returned. Otherwise, instance configurations marked for deletion generate a 404

Responses

200
(InstanceConfiguration) An InstanceConfiguration
404
(BasicFailedReply) Instance configuration specified by {id} cannot be found (code: 'configuration.instance_configuration_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/platform/configuration/instances/{id} \
-u $CLOUD_USER:$CLOUD_KEY

Set instance configuration

Creates or updates an instance configuration.

Request

PUT /api/v1/platform/configuration/instances/{id}

Path parameters

Name Type Required Description

id

string

Y

ID of the instance configuration

Query parameters

Name Type Required Description

create_only

boolean

N

If true, will fail if an instance configuration already exists at the given id

version

integer

N

If specified, checks for conflicts against the version of the repository configuration (returned in 'x-cloud-resource-version' of the GET request)

Request body

(InstanceConfiguration) (required) the Instance Configuration

Responses

200
(IdResponse) The instance configuration was updated successfully.
201
(IdResponse) The instance configuration was created successfully.
400
(BasicFailedReply) cluster_type in the InstanceConfiguration model is invalid (code: 'configuration.invalid_cluster_type') or the ZooKeeper operation failed due to bad version, etc. (code: 'configuration.instance_configuration_update_failed') or the id in the InstanceConfiguration model is reserved/prohibited (code: 'configuration.configuration_id_reserved') or the discrete_sizes in the InstanceConfiguration model is invalid (code: 'configuration.invalid_discrete_sizes') or the metadata in the InstanceConfiguration model has empty keys or values (code: 'configuration.bad_meta_data')
403
(BasicFailedReply) system_owned or deleted_on cannot be set externally (code: 'configuration.system_owned')
404
(BasicFailedReply) Instance configuration specified by {id} cannot be found or the operation failed (code: 'configuration.instance_configuration_not_found')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPUT {{hostname}}/api/v1/platform/configuration/instances/{id} \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "allocator_filter" : {
      "bool" : {
         "filter" : [
            null
         ],
         "minimum_should_match" : 0,
         "must" : [
            null
         ],
         "must_not" : [
            null
         ],
         "should" : [
            null
         ]
      },
      "exists" : {
         "field" : "string"
      },
      "match" : {
         "some_property" : {
            "analyzer" : "string",
            "minimum_should_match" : 0,
            "operator" : "string",
            "query" : "string"
         }
      },
      "match_all" : {},
      "match_none" : {},
      "nested" : {
         "path" : "string",
         "query" : null,
         "score_mode" : "string"
      },
      "prefix" : {
         "some_property" : {
            "boost" : 0.1,
            "value" : "string"
         }
      },
      "query_string" : {
         "allow_leading_wildcard" : true,
         "analyzer" : "string",
         "default_field" : "string",
         "default_operator" : "string",
         "query" : "string"
      },
      "range" : {
         "some_property" : {
            "boost" : 0.1,
            "format" : "string",
            "gt" : {},
            "gte" : {},
            "lt" : {},
            "lte" : {},
            "time_zone" : "string"
         }
      },
      "term" : {
         "some_property" : {
            "value" : {}
         }
      }
   },
   "deleted_on" : "2019-01-01T00:00:00Z",
   "description" : "string",
   "discrete_sizes" : {
      "default_size" : 0,
      "resource" : "string",
      "sizes" : [
         0
      ]
   },
   "id" : "string",
   "instance_type" : "string",
   "metadata" : {},
   "name" : "string",
   "node_types" : [
      "string"
   ],
   "storage_multiplier" : 0.1,
   "system_owned" : true
}
'