Roles

List roles

Retrieve all persisted roles.

Request

GET /api/v1/platform/infrastructure/blueprinter/roles

Responses

200
(RoleAggregates) The role aggregates.

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/infrastructure/blueprinter/roles \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Create a role

Create a Blueprinter role.

Request

POST /api/v1/platform/infrastructure/blueprinter/roles

Request body

(RoleAggregateCreateData) (required) The data you want to use for creating a role.

Responses

201
(RoleAggregate) The role aggregate that was just created.
409

(BasicFailedReply) The role ID you specified is already in use. (code: roles.already_exists)

Headers

x-cloud-error-codes (string; allowed values: [roles.already_exists])
The error codes associated with the response

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/infrastructure/blueprinter/roles \
-H "Authorization: ApiKey $CLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "blessings" : {
      "runner_ids_to_blessing" : {
         "some_property" : {
            "value" : true
         }
      }
   },
   "role" : {
      "auto_blessed" : true,
      "containers" : [
         {
            "container_set_name" : "string",
            "kind" : "string",
            "name" : "string",
            "options" : {
               "acls" : [
                  {
                     "id" : "string",
                     "perms" : 0,
                     "scheme" : "string"
                  }
               ],
               "auths" : [
                  {
                     "auth" : "string",
                     "scheme" : "string"
                  }
               ],
               "container_set_secret" : "string",
               "enabled" : true,
               "enabled_by_named_feature_flag" : "string",
               "overrides" : {
                  "container_config" : {
                     "env" : [
                        "string"
                     ],
                     "host_config" : {
                        "binds" : [
                           "string"
                        ],
                        "cpu_period" : 0,
                        "extra_hosts" : [
                           "string"
                        ],
                        "network_mode" : "string",
                        "port_bindings" : {
                           "some_property" : {
                              "host_ip" : "string",
                              "host_port" : "string"
                           }
                        },
                        "privileged" : true,
                        "restart_policy" : {
                           "maximum_retry_count" : 0,
                           "name" : "string"
                        }
                     }
                  }
               },
               "runners_secret" : "string"
            }
         }
      ],
      "id" : "string"
   }
}
'

Delete role

Delete a role.

Request

DELETE /api/v1/platform/infrastructure/blueprinter/roles/{blueprinter_role_id}

Path parameters

NameTypeRequiredDescription

blueprinter_role_id

string

Y

User-specified Blueprinter role ID.

Query parameters

NameTypeRequiredDescription

version

integer

N

When specified, checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

Responses

200
(EmptyResponse) The role was successfully deleted.
400

(BasicFailedReply) The role is currently running container sets. (code: roles.in_use)

Headers

x-cloud-error-codes (string; allowed values: [roles.in_use])
The error codes associated with the response
404

(BasicFailedReply) The role can't be found. (code: roles.not_found)

Headers

x-cloud-error-codes (string; allowed values: [roles.not_found])
The error codes associated with the response
409

(BasicFailedReply) Your request failed because the specified version does not match the persisted version. (code: roles.version_conflict)

Headers

x-cloud-error-codes (string; allowed values: [roles.version_conflict])
The error codes associated with the response

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/infrastructure/blueprinter/roles/{blueprinter_role_id} \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Get role

Retrieve a role.

Request

GET /api/v1/platform/infrastructure/blueprinter/roles/{blueprinter_role_id}

Path parameters

NameTypeRequiredDescription

blueprinter_role_id

string

Y

User-specified Blueprinter role ID.

Responses

200
(RoleAggregate) The role aggregate definition.
404

(BasicFailedReply) The role can't be found. (code: roles.not_found)

Headers

x-cloud-error-codes (string; allowed values: [roles.not_found])
The error codes associated with the response

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/infrastructure/blueprinter/roles/{blueprinter_role_id} \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Update role

Update a role.

Request

PUT /api/v1/platform/infrastructure/blueprinter/roles/{blueprinter_role_id}

Path parameters

NameTypeRequiredDescription

blueprinter_role_id

string

Y

User-specified Blueprinter role ID.

Query parameters

NameTypeRequiredDescription

version

integer

N

When specified, checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

Request body

(Role) (required) The role update data.

Responses

200
(RoleAggregate) The role was successfully updated.
400

(BasicFailedReply) The role is currently running container sets. (code: roles.in_use)

Headers

x-cloud-error-codes (string; allowed values: [roles.in_use])
The error codes associated with the response
404

(BasicFailedReply) The role can't be found. (code: roles.not_found)

Headers

x-cloud-error-codes (string; allowed values: [roles.not_found])
The error codes associated with the response
409

(BasicFailedReply) Your request failed because the specified version does not match the persisted version. (code: roles.version_conflict)

Headers

x-cloud-error-codes (string; allowed values: [roles.version_conflict])
The error codes associated with the response

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/infrastructure/blueprinter/roles/{blueprinter_role_id} \
-H "Authorization: ApiKey $CLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "auto_blessed" : true,
   "containers" : [
      {
         "container_set_name" : "string",
         "kind" : "string",
         "name" : "string",
         "options" : {
            "acls" : [
               {
                  "id" : "string",
                  "perms" : 0,
                  "scheme" : "string"
               }
            ],
            "auths" : [
               {
                  "auth" : "string",
                  "scheme" : "string"
               }
            ],
            "container_set_secret" : "string",
            "enabled" : true,
            "enabled_by_named_feature_flag" : "string",
            "overrides" : {
               "container_config" : {
                  "env" : [
                     "string"
                  ],
                  "host_config" : {
                     "binds" : [
                        "string"
                     ],
                     "cpu_period" : 0,
                     "extra_hosts" : [
                        "string"
                     ],
                     "network_mode" : "string",
                     "port_bindings" : {
                        "some_property" : {
                           "host_ip" : "string",
                           "host_port" : "string"
                        }
                     },
                     "privileged" : true,
                     "restart_policy" : {
                        "maximum_retry_count" : 0,
                        "name" : "string"
                     }
                  }
               }
            },
            "runners_secret" : "string"
         }
      }
   ],
   "id" : "string"
}
'

Set blessings

Set blessings for a role.

Request

PUT /api/v1/platform/infrastructure/blueprinter/roles/{blueprinter_role_id}/blessings

Path parameters

NameTypeRequiredDescription

blueprinter_role_id

string

Y

User-specified Blueprinter role ID.

Query parameters

NameTypeRequiredDescription

version

integer

N

When specified, checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

Request body

(Blessings) (required) The blessings to set.

Responses

200
(RoleAggregate) The blessings were successfully set.
404

(BasicFailedReply) The role can't be found. (code: roles.not_found)

Headers

x-cloud-error-codes (string; allowed values: [roles.not_found])
The error codes associated with the response
409

(BasicFailedReply) Your request failed because the specified version does not match the persisted version. (code: roles.version_conflict)

Headers

x-cloud-error-codes (string; allowed values: [roles.version_conflict])
The error codes associated with the response

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/infrastructure/blueprinter/roles/{blueprinter_role_id}/blessings \
-H "Authorization: ApiKey $CLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "runner_ids_to_blessing" : {
      "some_property" : {
         "value" : true
      }
   }
}
'

Add Blessing

Add a Blessing for a runner to a role.

Request

PUT /api/v1/platform/infrastructure/blueprinter/roles/{blueprinter_role_id}/blessings/{runner_id}

Path parameters

NameTypeRequiredDescription

blueprinter_role_id

string

Y

User-specified Blueprinter role ID.

runner_id

string

Y

Runner ID for a blessing associated with a role.

Query parameters

NameTypeRequiredDescription

version

integer

N

When specified, checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

Request body

(Blessing) (required) The blessing to add.

Responses

200
(RoleAggregate) Blessing added successfully.
404

(BasicFailedReply) The role can't be found. (code: roles.not_found)

Headers

x-cloud-error-codes (string; allowed values: [roles.not_found])
The error codes associated with the response
409

(BasicFailedReply) Your request failed because the specified version does not match the persisted version. (code: roles.version_conflict)

Headers

x-cloud-error-codes (string; allowed values: [roles.version_conflict])
The error codes associated with the response

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/infrastructure/blueprinter/roles/{blueprinter_role_id}/blessings/{runner_id} \
-H "Authorization: ApiKey $CLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "value" : true
}
'