---
id: service-specification-actions-create
title: "Create a service specification action"
description: "Create a service specification action"
sidebar_label: "Create a service specification action"
hide_title: true
hide_table_of_contents: true
api: eJztW21v2zgS/isEscBu9yQnbZxeY2CxyPUFm8VdGzTp3eIcn0FLY4tbilRJyq5r6L8fhpRkyZaTdFts24U+xZIocjgvzzycUTZUZaCZ5UpexHREDeglj2BqMoj4nEfuyZRF+MeMIg3MAg2oZQtDR2N67h7QSUBjMJHmmbsc0aduIGGknI+05iN+PhpQDe9yMPYfKl7T0cZdcg0xHVmdQ0AjJS1Ii49Ylony9aPfDS6yoSZKIGX4y64zoCOqZr9DZGlAM43bshwMPpUshcYoYzWXCxrQlMt/glzYhI4eBlQqtxDIPKWjscyFmBS7+3rJUiBqTmwCBKTldj0g/8qNJTPcrFQyhDSza+KXIEzGRCpL4F3OBLGK4Ky0CGjGNEvBgnbyWW4FCnZureaz3Gv41h0d3nkMc5YL3Mme8FctG5S7YNWaxM/Z3M+SCR6TX69evSRXfsEioEsmci/ERyz9b/cSYcaoiDMLMVlxm7QFKFd2izrnWTAujSWZVkseQ1wKSIsiaDjKuNJFLdmkVtYazWUaRu0a2xb0XAi1gphUMxDppigCyuKY4yAmLhummDNhYHeSV04jREOmwaCbOFdoqNptnpUbcl7S0EwpmtulyYXtXaR3kVtcxOo1mwmHb7V2yyVL7c+UEsAk3ZXhQsZoaTBklYBNQHtlO2wmEZNoYZyfQ0y4dwXUNpMREG4Il4SROeMC9W6ZhUGFbEKA4B8+j0hpLizPxHZp492Smx1J4T1EOSqHS1IJMSCvpFiTMnfMBCAGR7mxKiUoSTmFcZLDewtaMtEMt+fVvf1oQyj3ive5qh19ZYa7M+nsuJbfkVXEgIzxr7PIAqQlc6WJBqPEEn2lEpbEzLqYU7nNcju9LeqbKzUiFpepI2q7ngaTKWnqIHNBdauHNyOuzvBtufaJgpJzvsg9Azm0R0cD3lu3V7LkzEmJ+s8Es3OlUy8yqsHvel/rVXTXDCbPYv8jBgHuB9NRwpfumdz+9t6C4z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4SJ/VzuopaG8l3kNs3XrpUs9n4EdfqLciiqDVl8Zq6T4v+DxoG/Vo=
sidebar_class_name: "post api-method"
info_path: docs/api/nullplatform-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Create a service specification action"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/service_specification/{serviceSpecificationId}/action_specification"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Create a service specification action

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"schema":{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},"in":"path","name":"serviceSpecificationId","required":true}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"not":{"enum":[null]},"description":"Name of the entity. Must be a non-empty string and not equal to null"},"parameters":{"title":"Attribute","type":"object","properties":{"schema":{"type":"object","default":{},"description":"Specification of the attribute schema. Must be a valid JSON Schema"},"values":{"type":"object","default":{},"description":"Values associated with the attribute. Must validate against provided schema"}},"required":["schema","values"],"propertyNames":{"enum":["schema","values"],"description":"Allowed property names"},"additionalProperties":false,"description":"Object representing an attribute with a schema and associated values"},"results":{"title":"Attribute","type":"object","properties":{"schema":{"type":"object","default":{},"description":"Specification of the attribute schema. Must be a valid JSON Schema"},"values":{"type":"object","default":{},"description":"Values associated with the attribute. Must validate against provided schema"}},"required":["schema","values"],"propertyNames":{"enum":["schema","values"],"description":"Allowed property names"},"additionalProperties":false,"description":"Object representing an attribute with a schema and associated values"},"retryable":{"default":false,"type":"boolean","description":"Indicates whether the action can be retried if the instance is in a failed state."},"parallelize":{"default":false,"type":"boolean","description":"Indicates whether multiple instances of this action can be executed in parallel. Only applicable to custom type actions."},"external":{"title":"External","type":"object","nullable":true,"properties":{"action":{"type":"string","minLength":1,"description":"Action to send to the agent for resolving external data"},"output_schema":{"type":"object","description":"JSON Schema to validate the agent response against"}},"additionalProperties":false,"required":["action","output_schema"],"description":"Configuration for resolving external context data via the nullplatform agent"},"type":{"type":"string","enum":["create","update","delete","archive","unarchive","custom","diagnose"],"description":"Type of the action. Should be one of the specified values in the ActionType enumeration"},"service_specification_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"},{"type":"string","pattern":"^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12},\\s*)*[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}],"description":"Unique identifier for the associated service specification"},"link_specification_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"},{"type":"string","pattern":"^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12},\\s*)*[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}],"description":"Unique identifier for the associated link specification"},"annotations":{"title":"Annotation","type":"object","properties":{"runs_over":{"type":"string","enum":["deployment","scope","instance"],"description":"Entity type over which the action applies"},"show_on":{"type":"array","items":{"type":"string","enum":["scope","performance","manage","deployment"],"description":"Place in nullplatform where the action will be able to be triggered"},"uniqueItems":true}},"additionalProperties":false,"description":"Object representing annotations with key-value pairs","default":{}},"enabled_when":{"type":"string","default":"","description":"Condition that must be met for the action to run"},"icon":{"type":"string","pattern":"^([a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+)?$","description":"Icon associated with the action. Format: 'icon-set:icon-variation'. Empty string to clear."},"enabled":{"type":"boolean","description":"Indicates if the action is enabled depending on enabled_when"},"external_resolution":{"type":"object","description":"Status of the external context resolution when the action specification was read","properties":{"status":{"type":"string","description":"Resolution outcome. One of: success, no_channel, agent_error, timeout, auth_error, service_unavailable, invalid_response"},"error":{"type":"string","description":"Human-readable error detail when status is not success"},"notification_id":{"type":"string","description":"ID of the notification sent to the agent. Present on error statuses to facilitate debugging"}},"required":["status"]}},"description":"Object representing action specifications","additionalProperties":false,"title":"ActionSpecification","example":{"name":"my-link-specification","type":"custom","parameters":{"schema":{"type":"object","properties":{"my_string_property":{"type":"string"},"my_number_property":{"type":"number","default":0}},"required":["my_string_property"]},"values":{}},"results":{"schema":{"type":"object","properties":{"my_string_property":{"type":"string"},"my_number_property":{"type":"number","default":0}},"required":["my_string_property"]},"values":{}},"service_specification_id":"134544a6-a089-43ba-9d52-5b6e6e4fa8d1","link_specification_id":"f3e8be90-0952-4506-bd54-c4e75a5a4393","retryable":true,"parallelize":true,"enabled_when":".service.dimensions.environment == \"development\"","annotations":{"runs_over":"scope","show_on":["scope","performance"]}},"required":["name"],"anyOf":[{"required":["service_specification_id"],"not":{"required":["link_specification_id"]}},{"required":["link_specification_id"],"not":{"required":["service_specification_id"]}},{"not":{"required":["service_specification_id","link_specification_id"]}}]}}},"description":"Object representing action specifications"}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"2XX":{"description":"Object representing action specifications","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},"name":{"type":"string","minLength":1,"not":{"enum":[null]},"description":"Name of the entity. Must be a non-empty string and not equal to null"},"slug":{"type":"string","minLength":1,"not":{"enum":[null]},"description":"Slug of the specification. Automatically generated from \"name\""},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"type":{"type":"string","enum":["create","update","delete","archive","unarchive","custom","diagnose"],"description":"Type of the action. Should be one of the specified values in the ActionType enumeration"},"parameters":{"title":"Attribute","type":"object","properties":{"schema":{"type":"object","default":{},"description":"Specification of the attribute schema. Must be a valid JSON Schema"},"values":{"type":"object","default":{},"description":"Values associated with the attribute. Must validate against provided schema"}},"required":["schema","values"],"propertyNames":{"enum":["schema","values"],"description":"Allowed property names"},"additionalProperties":false,"description":"Object representing an attribute with a schema and associated values"},"results":{"title":"Attribute","type":"object","properties":{"schema":{"type":"object","default":{},"description":"Specification of the attribute schema. Must be a valid JSON Schema"},"values":{"type":"object","default":{},"description":"Values associated with the attribute. Must validate against provided schema"}},"required":["schema","values"],"propertyNames":{"enum":["schema","values"],"description":"Allowed property names"},"additionalProperties":false,"description":"Object representing an attribute with a schema and associated values"},"service_specification_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"},{"type":"string","pattern":"^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12},\\s*)*[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}],"description":"Unique identifier for the associated service specification"},"link_specification_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"},{"type":"string","pattern":"^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12},\\s*)*[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}],"description":"Unique identifier for the associated link specification"},"retryable":{"type":"boolean","default":false,"description":"Indicates whether the action can be retried if the instance is in a failed state."},"parallelize":{"type":"boolean","default":false,"description":"Indicates whether multiple instances of this action can be executed in parallel. Only applicable to custom type actions."},"annotations":{"title":"Annotation","type":"object","properties":{"runs_over":{"type":"string","enum":["deployment","scope","instance"],"description":"Entity type over which the action applies"},"show_on":{"type":"array","items":{"type":"string","enum":["scope","performance","manage","deployment"],"description":"Place in nullplatform where the action will be able to be triggered"},"uniqueItems":true}},"additionalProperties":false,"description":"Object representing annotations with key-value pairs","default":{}},"external":{"title":"External","type":"object","nullable":true,"properties":{"action":{"type":"string","minLength":1,"description":"Action to send to the agent for resolving external data"},"output_schema":{"type":"object","description":"JSON Schema to validate the agent response against"}},"additionalProperties":false,"required":["action","output_schema"],"description":"Configuration for resolving external context data via the nullplatform agent"},"enabled_when":{"type":"string","default":"","description":"Condition that must be met for the action to run"},"icon":{"type":"string","pattern":"^([a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+)?$","description":"Icon associated with the action. Format: 'icon-set:icon-variation'. Empty string to clear."},"enabled":{"type":"boolean","description":"Indicates if the action is enabled depending on enabled_when"},"external_resolution":{"type":"object","description":"Status of the external context resolution when the action specification was read","properties":{"status":{"type":"string","description":"Resolution outcome. One of: success, no_channel, agent_error, timeout, auth_error, service_unavailable, invalid_response"},"error":{"type":"string","description":"Human-readable error detail when status is not success"},"notification_id":{"type":"string","description":"ID of the notification sent to the agent. Present on error statuses to facilitate debugging"}},"required":["status"]}},"description":"Object representing action specifications","additionalProperties":false,"title":"ActionSpecification","example":{"name":"my-link-specification","type":"custom","parameters":{"schema":{"type":"object","properties":{"my_string_property":{"type":"string"},"my_number_property":{"type":"number","default":0}},"required":["my_string_property"]},"values":{}},"results":{"schema":{"type":"object","properties":{"my_string_property":{"type":"string"},"my_number_property":{"type":"number","default":0}},"required":["my_string_property"]},"values":{}},"service_specification_id":"134544a6-a089-43ba-9d52-5b6e6e4fa8d1","link_specification_id":"f3e8be90-0952-4506-bd54-c4e75a5a4393","retryable":true,"parallelize":true,"enabled_when":".service.dimensions.environment == \"development\"","annotations":{"runs_over":"scope","show_on":["scope","performance"]}}}}}},"4XX":{"description":"Format for representing errors during API interactions","content":{"application/json":{"schema":{"title":"Error","type":"object","properties":{"statusCode":{"type":"number","description":"HTTP status code indicating the error"},"code":{"type":"string","description":"Unique error code for reference and categorization"},"error":{"type":"string","description":"Short, human-readable error type or category"},"message":{"type":"string","description":"Detailed error message providing additional context"}},"description":"Format for representing errors during API interactions","required":["statusCode","error","message"]}}}},"5XX":{"description":"Format for representing errors during API interactions","content":{"application/json":{"schema":{"title":"Error","type":"object","properties":{"statusCode":{"type":"number","description":"HTTP status code indicating the error"},"code":{"type":"string","description":"Unique error code for reference and categorization"},"error":{"type":"string","description":"Short, human-readable error type or category"},"message":{"type":"string","description":"Detailed error message providing additional context"}},"description":"Format for representing errors during API interactions","required":["statusCode","error","message"]}}}}}}
>
  
</StatusCodes>


      