---
id: service-compare
title: "Compare two services"
description: "Compare two services"
sidebar_label: "Compare two services"
hide_title: true
hide_table_of_contents: true
api: eJztW3tv2zgS/yoEccC2d7LzaJK2Bg6HXB/Y7u2mQZJeF0hzCU2NLW4oUiWpuD7D3/0wQ8qWbKePRQ+9vfovyxQ1nPf8OBJn3FbgRFDWvMr5gHtwd0rCQNqyEg54xoMYez645OfxDr/KeA5eOlXhQ3zAn8WpLEwsS497nnEH72vw4e82n/LBjP4qBzkfBFdDxqU1AUzAW6KqtJLEw85vHmnOuJcFlAKvwrQCPuB2+BvIwDNeOeQ4KPB4d2RdKUJrng9OmTHPOJi6RL6RYq8SQRY8i39yNRr1/NTIdVleEjlmRywUwHAiC5YNgTkItTOQ99kzYXAAVCjAsXct+u84s4uRxSLveJ+9GjFjA/MVSDVSkGcsh5GodfBIvkuDzzPube0kXCdtXqucBFRBo4SvcrTKirSNHnhdK7zfFeuNUe9rYCoHE5ABx0bWkYg4EKbMQeXAgwmQM+GZYG/evHrO5/OsZbfLDWxdzec4yYOsnQpTPric8SEIB+64DgUfXF7NrzJeCSdKCOA8TVizbZJinnGF3FYioK2MKPEmidP1HqTpwFfW+OgF+7/+ij9doZ9HFbOzNJN/NadD27ZmCefEdE3nx0wrT6700/nrE3aK1mWLYPPswXDKzl4+Y0dPd/cfMl/YiTJjVtgJ2SUIN4bQxBN5IjjPRs6WdD+aos/O66qyLnh2I/L8JmM3Dkp7B/Gq0kLipTA5u6HhFgM84ypA6T8trq0+Fl9pGTISrsEzLnK0Gf25mmfRnhsodPV1UUDSlFUmALqnCCyA1p5Nbc0mBWCSKWApA2qt1jkrRFWBYcq0VIPehNr69MJnybcoJtbU1GfnKWp9XNypsTJCd3lNCeNO6BrYENCSSChHLmhw3T0vFvODZeiNU4byogBNmmCouT574yFH4cjE0ZiNbbv2hA+irChHRPe5jkuvhrGteDLKFd5SY2Md5NcjBTr3n/Trn5NXx+kMPkhd56g9dM1YNpS3huVRshhTzNUafJ+9ELLAnOOmTFo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vbUmVtjnXRN/nR69qn25aKBQJEerHabgVoUk8SxcvG2Tw09sL0hi69tnyfNyLZV1cgIjOsbUN58H4o5F4cjg6OugdPt573Ds4PNrvDR+NZG9fPj16NDo6EiNxFI9UjajphrJHC+31d/u7fFmgO3vr49NXBISsD6UwrVJ9zzG/jvFny1i+b37SGDrPTqWFIs8nc8ySAS/5EhIMCEk1NrzKeIGmHlzy2WwoPLxxej7H4fc14H718gqP2zgVu7iXeFLL43W+uWndZvdBcwzoIbuPy6ZDaXCHl071cJ7xW5jGc2q00yxA0K7+cpZuPItr9HDz13pwLdUh1ItPHEsJVfjo3KuW+5++Pr9AX0snLUtKUdyJCQaVmEQmbRWafh6NzbgWZlxTYuCRJuGPrmOvOHJ7w95Vw2wWZ1zYWzDz+UIrAf+jYubz/wDePXsN
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={"Compare two services"}
>
</Heading>

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



Compare two services

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

<ParamsDetails
  parameters={[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","enum":["json-patch","json-diff-sync"],"description":"Format of the diff to be returned. Can be either \"json-patch\" or \"json-diff-sync\". If not specified, defaults to \"json-patch\""},"source_service_id":{"title":"Id","type":"string","format":"uuid","description":"Unique identifier for the entity represented as a UUID"}},"required":["source_service_id"]}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"2XX":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"diff":{"type":"array","description":"A list of JSON Patch operations (by RFC 6902) showing how the target service differs from the source. Supports `add`, `remove`, `replace`, and `move` operations","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace","remove","add","move"]},"path":{"type":"string","description":"The JSON Pointer that tells you where the operation should happen in the source"},"from":{"type":"string","description":"Required for `move` operations. Specifies the original JSON Pointer of the value being moved"},"value":{"description":"The value to apply at the specified path. Used in `add` and `replace` operations","example":"target_value"}},"required":["op","path"]}},"ignored_fields":{"type":"array","description":"List of fields excluded from comparison due to schema rules. Each entry corresponds to a property explicitly marked as `comparable: false` in the schema.","items":{"type":"string","description":"JSON Pointer referencing the field path in the target object that was excluded."}},"ignored_schemas":{"type":"array","description":"List of JSON Schema nodes explicitly marked with `comparable: false`, indicating that all corresponding properties were excluded from comparison.","items":{"type":"string","description":"JSON Pointer path to the schema node that was excluded during traversal."}},"source":{"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}}},"target":{"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}}}},"additionalProperties":false}}}},"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>


      