---
id: service-update
title: "Update a service"
description: "Updates a service"
sidebar_label: "Update a service"
hide_title: true
hide_table_of_contents: true
api: eJztWntvG7kR/yoEUeCSdiU/zk7vBBSFG+dwbns+w3Z6ByiuQpEjLc9cckNy5aiCvnsxJHe1K8lOHKRwcpX/8S4fw+G857daUFOCZV4afSbogDqwM8lhUJWCeaAZ9Wzq6GBIr+IEvcmoAMetLHEPHdDXYaUjjKS9NKMW3lXg/N+MmNPBIrxKC4IOvK0go9xoD9rjFCtLJXk4f+83hwQX1PEcCoZPfl4CHVAz/g24pxktLXLrJTic1ayA1irnrdRTmtFC6n+CnvqcDg4yWrD39dvh8XFGtQkHg64KOhjqSqmb5fqdzlkBxEyIz4GA9tLP++SnynkyBsKINroHRennJB5JmBZEG0/gXcUU8YYgVRqp4r1HrgQuJ+meIynCzfX85wkdDBfUS6/wAmcC5b12mYmxBfN0QKtK4vya8LV8VwGRArmcSLBkYmyLbWKhtOBAexCEoZJevz47pcuskVpkdUOrp5FzUt17AHPOcMmQcOd6eO8CnGPTqKX6dj/FsdUVmbVsTjMqPRTuw9pWMAO1Td1Jk1TAuMJ3qScm/UPRIUsZvWO2/pd2WWssypd5pqJVT1ilUNKJQFcgiX3iYAYWJRv46ZPTuM2h2t+ErW9oSwTbGO4SvkZZco+Wk/aQ2j+WGfWyAOdZUbYI6aoYg90kVC+tLbcmJzUppFLSATdaOLpcZi2XHDas3mSUCSGRHFMXLeFPmHKwftzPQU0rA0NHqPVO7qTP10QVz3We+co9pMYStJB6OuIWYgRKAzSjYSg+hvgUH5nluZylZ+7lDJpBEEHDUoUHzjQHhc8b5n4V2KoFlwJZn1zlplICvd7oJiAkawdBZkxV4FC+0eOqIoVS1Bzz3spx5WGrbXePP2nWtt0qCLHFT0Zcw8+MKSkImzKpnW8v6jojabggKaqiDkAB98Z23PMqDa788x4/lEVprAfRutXYGAVM05YTBZNZhr0zKcA+Kk4f7O+3/ZHpObLNmYepsfPPQMpV49FnI7e8z206Mf4RJ3Sic3D11k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P1ZuYnEFzzCfBnjdT6/W8hM+aWH+fyN0OB93hoE+BgwYYDbQfJQ6+Iv0j243gQgwJ2k0hJl08nGjKXmjA6lm3w3+/HPx3mdGjbSjnD8G2ggI7SgmwhSOiCuXsycUZkdqDjf70ONgzaetVAkIeLnVi6/rSCPgwEPHj9fUFiRsINwItSAQ+9DTafzgRy5guuXsAkuRIYVekF6UyAQuYtNH/UwWTdBaK3XDIB4lf5cb6jORVwXTPAhNoIeksH5K3JU159BhY5xR8aL0TrRqLiUVgKFkbV4p4z3u/xS8/2Qza+E5LdyvcqwF9ohEe74xwZ4RPa4ThYj43In5K4nlsQ3M6oHspZ+wtpFhiEgA7q798VVbRAc29L91gb4+Vst9u9/rcFLT93ekKbS+aU/vrUyNJJBTqeVyGTUZYRLP08EOd8//+y3UQFdr05eqXsa92Ge+hjJfQ+cGCov6ieR309/v7dFU+dDr/k4uzUKYZ5wumW2KNv1Du/EC5Y7WLVRDa+mvmpG40+b1SMRn8NdjSIlndkK5WD2TATXPjPE4sFmPm4LVVyyUOv6sAm+fhTUZnzMoIKQ8XVEiHz2I7gt7m8NllcpXn5D7earhUY7sZxTygNKO3MI9fW0PbmwMLEMNwkSZexjN62Im2Nm6EZaw7444TzqH0D669abnqxcn1yx/RP9LvwosQT6lldxgB2F3k0pS+RhfD2IIqpqdViGI0Eg3oQdcZ15yvDR905bBYxBXX5hb0ctmIxeM7Sma5/C/VvoD7
sidebar_class_name: "patch 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={"Update a service"}
>
</Heading>

<MethodEndpoint
  method={"patch"}
  path={"/service/{id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Updates a service

<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":"id","required":true}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"not":{"enum":[null]},"description":"Name of the entity. Must be a non-empty string and not equal to null"},"desired_specification_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"Desired unique identifier for the associated specification"},"messages":{"title":"Message","type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["debug","info","information","warn","warning","error","fatal"],"default":"info","description":"Message severity level. Defaults to \"info\""},"message":{"type":"string","description":"The actual message content"},"timestamp":{"type":"number","description":"Timestamp of the message in milliseconds"}},"required":["message"],"additionalProperties":false,"description":"Object representing messages with severity levels"}},"status":{"type":"string","enum":["pending_create","pending","creating","updating","archiving","active","archived","failed","cancelled"],"description":"Status of the service. Should be one of the specified values in the enumeration"},"attributes":{"type":"object","description":"Attributes associated with the service, should be valid against the service specification attribute schema"},"selectors":{"title":"Selector","type":"object","properties":{"imported":{"type":"boolean","default":false},"provider":{"type":"string","minLength":1,"maxLength":100,"default":"any"},"category":{"type":"string","minLength":1,"maxLength":100,"default":"any"},"sub_category":{"type":"string","minLength":1,"maxLength":100,"default":"any"}},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Key-value object representing instance selectors"},"linkable_to":{"title":"Visibility","type":"array","description":"Array representing visibility settings for the entity. Specifies what/who can see this entity","items":{"title":"NRN","type":"string","pattern":"^organization=[0-9*]+(:account=[0-9*]+)?(:namespace=[0-9*]+)?(:application=[0-9*]+)?(:scope=[0-9*]+)?$","description":"Nullplatform Resource Name (NRN) representing a hierarchical identifier for nullplatform resources"}},"entity_nrn":{"title":"NRN","type":"string","pattern":"^organization=[0-9*]+(:account=[0-9*]+)?(:namespace=[0-9*]+)?(:application=[0-9*]+)?(:scope=[0-9*]+)?$","description":"Nullplatform Resource Name (NRN) representing a hierarchical identifier for nullplatform resources"},"package_revision_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"The package revision the service is currently running, or `null` when it isn't running one. The agent that applies a revision records it here"},"desired_package_revision_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"The package revision the service should move to. While it is set, the service's specification and its action specifications resolve against this revision instead of `package_revision_id`. When an action on the service succeeds, this revision becomes `package_revision_id` and this field is cleared. `null` when no move is pending"}},"description":"Object representing service instances","additionalProperties":false,"title":"Service","example":{"name":"my-service","entity_nrn":"organization=1:account=1:namespace=1","specification_id":"67fac146-54cc-466d-8c52-a8234445a95f","linkable_to":["organization=1:account=1","organization=1:account=2"],"attributes":{"my_string_property":"my_string_value","my_number_property":0}}}}},"description":"Object representing service instances"}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"2XX":{"description":"Object representing service instances","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,"maxLength":255,"not":{"enum":[null]},"description":"Name of the entity. Must be a non-empty string and not equal to null"},"slug":{"type":"string","minLength":1,"maxLength":255,"not":{"enum":[null]},"description":"Slug of the entity. Automatically generated from \"name\""},"specification_id":{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},"desired_specification_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"Desired unique identifier for the associated specification"},"messages":{"title":"Message","type":"array","items":{"type":"object","properties":{"level":{"type":"string","enum":["debug","info","information","warn","warning","error","fatal"],"default":"info","description":"Message severity level. Defaults to \"info\""},"message":{"type":"string","description":"The actual message content"},"timestamp":{"type":"number","description":"Timestamp of the message in milliseconds"}},"required":["message"],"additionalProperties":false,"description":"Object representing messages with severity levels"}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"archived_at":{"type":"string","format":"date","nullable":true,"description":"When the instance was last archived. `null` while the instance is not archived"},"status":{"type":"string","enum":["pending_create","pending","creating","updating","archiving","active","archived","failed","cancelled"],"description":"Status of the service. Should be one of the specified values in the enumeration"},"linkable_to":{"title":"Visibility","type":"array","description":"Array representing visibility settings for the entity. Specifies what/who can see this entity","items":{"title":"NRN","type":"string","pattern":"^organization=[0-9*]+(:account=[0-9*]+)?(:namespace=[0-9*]+)?(:application=[0-9*]+)?(:scope=[0-9*]+)?$","description":"Nullplatform Resource Name (NRN) representing a hierarchical identifier for nullplatform resources"}},"dimensions":{"title":"Dimension","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100,"not":{"enum":[null]},"description":"Key-value pairs representing dimensions. Each key must be a non-null string with a minimum length of 1"},"description":"Object representing dimensions with key-value pairs"},"attributes":{"type":"object","description":"Attributes associated with the service, should be valid against the service specification attribute schema"},"entity_nrn":{"title":"NRN","type":"string","pattern":"^organization=[0-9*]+(:account=[0-9*]+)?(:namespace=[0-9*]+)?(:application=[0-9*]+)?(:scope=[0-9*]+)?$","description":"Nullplatform Resource Name (NRN) representing a hierarchical identifier for nullplatform resources"},"selectors":{"title":"Selector","type":"object","properties":{"imported":{"type":"boolean","default":false},"provider":{"type":"string","minLength":1,"maxLength":100,"default":"any"},"category":{"type":"string","minLength":1,"maxLength":100,"default":"any"},"sub_category":{"type":"string","minLength":1,"maxLength":100,"default":"any"}},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Key-value object representing instance selectors"},"type":{"type":"string","enum":["dependency","scope"],"description":"Type of the service. Should be one of the specified values in the enumeration"},"package_revision_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"The package revision the service is currently running, or `null` when it isn't running one. The agent that applies a revision records it here"},"desired_package_revision_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"The package revision the service should move to. While it is set, the service's specification and its action specifications resolve against this revision instead of `package_revision_id`. When an action on the service succeeds, this revision becomes `package_revision_id` and this field is cleared. `null` when no move is pending"},"parent_service_id":{"anyOf":[{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"},{"type":"null"}],"description":"The parent service of this service. `null` for top-level services"}},"description":"Object representing service instances","additionalProperties":false,"title":"Service","example":{"name":"my-service","entity_nrn":"organization=1:account=1:namespace=1","specification_id":"67fac146-54cc-466d-8c52-a8234445a95f","linkable_to":["organization=1:account=1","organization=1:account=2"],"attributes":{"my_string_property":"my_string_value","my_number_property":0}}}}}},"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>


      