Service

Create a service specification

Create a service specification

post/service_specification

Request body

visible_toDef2[] required

Array representing visibility settings for the entity. Specifies what/who can see this entity

type'dependency' | 'scope'

Type of the service specification. Should be one of the specified values in the enumeration

dimensionsDef9
assignable_to'any' | 'dimension' | 'scope'

Specifies if the service can be assigned to any entity, only dimensions, or only scopes.

use_default_actionsboolean

Specifies if the service specification should autogenerate its create, update, and delete actions from the attributes schema. When omitted on create, the default is true for every type except scope. An explicitly sent value always wins

use_default_namingboolean

When true, the instance name is optional and generated by nullplatform or taken from the schema's name property. When false, a caller-provided name is required. Defaults to true for new specifications

Example request

{
  "name": "my-service-specification",
  "visible_to": [
    "organization=1:account=1",
    "organization=1:account=2"
  ],
  "dimensions": {
    "environment": {
      "required": true,
      "values": [
        "production",
        "staging"
      ]
    }
  },
  "scopes": {
    "provider": {
      "values": [
        "AWS:SERVERLESS:LAMBDA",
        "AWS:WEB_POOL:EC2INSTANCES",
        "uuid-of-a-specific-scope-specification"
      ]
    }
  },
  "assignable_to": "any",
  "attributes": {
    "schema": {
      "type": "object",
      "properties": {
        "my_string_property": {
          "type": "string"
        },
        "my_number_property": {
          "type": "number",
          "default": 0
        }
      },
      "required": [
        "my_string_property"
      ]
    },
    "values": {}
  }
}

Response

Object representing service specifications

idstring uuid

Unique identifier for the entity represented as a UUID

created_atstring date
updated_atstring date
visible_toDef2[]

Array representing visibility settings for the entity. Specifies what/who can see this entity

type'dependency' | 'scope'

Type of the service specification. Should be one of the specified values in the enumeration

dimensionsDef9
assignable_to'any' | 'dimension' | 'scope'

Specifies if the service can be assigned to any entity, only dimensions, or only scopes.

use_default_actionsboolean

Specifies if the service specification should autogenerate its create, update, and delete actions from the attributes schema. When omitted on create, the default is true for every type except scope

use_default_namingboolean

When true, the instance name is optional and generated by nullplatform or taken from the schema's name property. When false, a caller-provided name is required. Defaults to true for new specifications

Example response

{
  "name": "my-service-specification",
  "visible_to": [
    "organization=1:account=1",
    "organization=1:account=2"
  ],
  "dimensions": {
    "environment": {
      "required": true,
      "values": [
        "production",
        "staging"
      ]
    }
  },
  "scopes": {
    "provider": {
      "values": [
        "AWS:SERVERLESS:LAMBDA",
        "AWS:WEB_POOL:EC2INSTANCES",
        "uuid-of-a-specific-scope-specification"
      ]
    }
  },
  "assignable_to": "any",
  "attributes": {
    "schema": {
      "type": "object",
      "properties": {
        "my_string_property": {
          "type": "string"
        },
        "my_number_property": {
          "type": "number",
          "default": 0
        }
      },
      "required": [
        "my_string_property"
      ]
    },
    "values": {}
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.