---
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: eJztW+tv2zgS/1cI4j60d7LzaJK2Bg6HXtPFdR9pEae3C7i5hJbGFjcUqZJUXJ3h//0wQ8qWYjuPRQ/9sP4UmaKG854fB5M5NyVY4aXR7zM+4A7srUxhkJqiFBZ4wr2YOj4Y8WF4wy8TnoFLrSzxIz7gb8NW5meGxc8dT7iFLxU4/0+T1Xwwp5/SQsYH3laQ8NRoD9rjK1GWSqbEw97vDmnOuUtzKAQ++boEPuBm/Duknie8tMixl+Dw7cTYQvjWPuet1FOecNBVgXwjxV4pfJrzJPzI5GTSc7VO12X5gcgxM2E+B4YbmTdsDMyCr6yGrM/eCo0LIH0Oln1u0f/MmVmuLA/5zPvs/YRp45krIZUTCVnCMpiISnmH5Ls0+CLhzlQ2hauozSuZkYDSK5TwfYZWuSNtowdeVRLfd8X6pOWXCpjMQHtkwLKJsSQiLviaWSgtONAeMiYcE+zTp/enfLFIWnYbbWDrcrHATQ7Sykpf88FozscgLNg3lc/5YHS5uEx4KawowIN1tGHNtlGKRcIlclsKj7bSosCXJE7Xe5CmBVca7YIXHP72G/7pCn0aVMzO407+zZwObdvaJawV9ZrO3zAlHbnSj8MPZ+wjWpctg82xZ+Oanf/wlp283j98zlxuZlJPWW5mZBcv7BR8E0/kiWAdm1hT0Ptgij4bVmVprHfsWmTZdcKuLRTmFsJTqUSKj0Jn7JqWWwzwhEsPhXtYXFPeF1/xGDISnsETLjK0Gf24XCTBnhsodPV1kUPUlJHaA7qn8MyDUo7VpmKzHDDJ5LCSAbVWqYzloixBM6lbqkFvQm09fPB59C2KiTU19dkwRq0Lh1s5lVqoLq8xYdwKVQEbA1oSCWXIBS2uu+fFcr83DL2xZigvCtCkCYaa67NPDjIUjkwcjNnYtmtP+CqKknJEcJ+rcPTdMDYlj0a5xFdyqo2F7GoiQWXuQb/+OXp12M7ga6qqDLWHrhnKhnRGsyxIFmKK2UqB67N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pct5wm+gDvPghAxzEITCR/P44m04o4dgrfXhWopDnBm+eJOmUPp791623P7jh+EF+lj8j4aCUhO3YobBJGaBSVP65v5Na3OuhJ5WlBB4oEm4o+vQdxy4DbC7apjPw44LcwN6sVhqxeNvVMxi8T/Iu2iW
sidebar_class_name: "post api-method"
info_path: docs/api/services
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"}},"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"}},"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>


      