{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"19b4c858-17c3-4eb0-b1ab-15d94a09374f","name":"Sync documentation","description":"## Introduction\n\nWelcome to the Vertex Sync public documentation. In order to use the API, please use the latest version of the API.\n\n## Authentication and Authorization\n\nThis API uses OAuth2 authentication with Keycloak. To access protected endpoints, you need to obtain a JWT token and include it in the `Authorization` header.\n\n**Keycloak URLS**\n\n- Production site: auth-sync.vertex.fi\n    \n\n**Sample Request to Obtain a JWT Token:**\n\n``` http\n  POST https://auth-sync.vertex.fi/auth/realms/{realm}/protocol/openid-connect/token\n  Content-Type: application/x-www-form-urlencoded\n  grant_type=client_credentials&client_id=your-client-id&client_secret=your-client-secret\n\n ```\n\n**Sample Response:**\n\n``` json\n  {\n    \"access_token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n    \"expires_in\": 300,\n    \"token_type\": \"Bearer\",\n    \"scope\": \"entities:write entities:delete\"\n  }\n\n ```\n\n**Using the Access Token:**\n\nInclude the token in the `Authorization` header:\n\n``` http\n  Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\n\n ```\n\n## Entity information\n\nA service for handling entities. Entities are general use objects that most of Sync's main features revolve around. Entities typically contain various miscellaneous data, a payload file, a preview file and relations to other entities.\n\n# Important fields of entities\n\n## Type and Code\n\nEach entity must have a type and a code. The code is often automatically generated by the service but it can be set to specific values during creation as necessary. For example in Vertex BD the code is set to the building's ID. All entities must have a unique type and code combination (multiple entities can have the same combination if they are different revisions of each other). The code is case insensitive for all operations.\n\n## ModificationCount\n\nEntities have a modificationCount field. It is used to implement optimistic locking. Most modifying endpoints requires the field to be given and the operation only succeeds if the modificationCount is equal to the entity's modificationCount in the database.\n\n## Client System Files\n\nEntities marked as clientSystemFiles are normally hidden from the user. They can be optionally retrieved with a query parameter.\n\n## Files\n\nEach entity can have a file, a preview file and a thumbnail. The file is the main file of the entity. The preview file can be used to change the preview for a file. The thumbnail is automatically generated from the file or the preview file depending on whether a preview exists. It is a Base64 encoded picture.\n\n# Entities main features\n\n## Labels\n\nLabels can be added to entities. They are not freeform strings even though they may look like it. They need to be explicitly created after which they can be used freely in entities. The service renames and deletes labels from entities as necessary.\n\n## Autolabeling\n\nLabels can be automatically added to created entities based on some rules. The rules only activate on entities created after the rules were made. An entity's labels can be modified even if a label came from a rule.\n\n## Blocks\n\nEach entity can be blocked for various operations. Only admins and the user who added the block can remove it. OVERWRITE_EVERYONE block prevents all kinds of direct modifications except revisioning. OVERWRITE_OTHERS is akin to a reservation. It allows the current user to do anything while blocking all direct operations from other users. REVISE_EVERYONE only blocks revisioning.\n\n## Revisions\n\nWhen an entity is revised the original entity is overwrite blocked and a successor is attached to it. The successor is similar to a copy when it is first created. Revisioning can be likened to backing up an old version of an entity to version history.\n\n## Relations\n\nEntities can have multiple kinds of relations to other entities. The relations are automatically maintained and the different types behave differently under different operations. Relations have no requirements meaning that they can freely form chains, loops, etc. The relation types are similar to their respective UML class diagram relationships.\n\n### Composition Relations\n\nComposition relations thightly couple entities to each other. Most modifying operations also target all other entities linked to the targeted entity via composition. For example deleting an entity also deletes all entities attached to it via composition.\n\n### Aggregation Relations\n\nAggregation relations are not as tightly coupled as compositions. Most operations do not target entities linked via aggregation. Most operations can however be made to also target aggregation children via a query parameter.\n\n### Association Relations\n\nAssociations serve as \"links\" between entities. They are practically ignored by the service (but they are still maintained). They only serve a purpose for the client.\n\n### Updating relations\n\nRelations can be modified in all requests that take in entities in the body. If only one side of a relation is in a request, the relation is copied to the other side. If both sides are part of the request the behavior depends on the relation type: parent relations are completely ignored, children relations always overwritten and associations are asserted to be equal on both sides.\n\n## Access Control\n\nEntities can be hidden from specific users or groups with access control. The backend basically ignores any entities the user does not have access to. They cannot be retrieved or modified in any way. Admins can bypass access control as necessary with the optional entities:admin role.\n\n## Branches\n\nBranches can be used to execute multiple operations to a group of entities transactionally. When a branch is created entities can be copied to it. Then the entities inside it can be freely modified, or new entities can be added to the branch. Once the branch is ready it can either be merged to commit all the changes at once or deleted to cancel all changes. If the entities in a branch received modifications outside the branch, merging the branch fails and the branch should be deleted.\n\n## Recycle bin\n\nDeleted entities are automatically moved to the recycle bin. Entities in the recycle bin live for a certain period of time. They can be freely deleted from there or restored. Restored entities attach themselves to the entities they were originally attached to. Revision information is only restored if the previous revision hasn't received breaking changes. Entities in branches do not use the recycle bin.\n\n# Admin rights\n\nAdmins by default have the same permissions as normal users. They can optionally request the entities:admin scope from the authentication server to gain extra rights. With the scope admins can bypass access control and ignore and manipulate blocks freely.\n\n# Common error sources\n\n## Changed modificationCount\n\nThe service expected a different modificationCount. This means that something modified the entity without the client knowing about it.\n\n## Invalid relations\n\nIf both entities of an association relation are provided in the same request, the associations between the two entities must be identical.\n\n## Invalid labels\n\nAny operation that allows setting labels requires valid labels. The labels must exist and be active. Inactive labels already on an entity do not need to be changed.\n\n## Blocked entities\n\nModifying requests may not modify entities that have been overwrite blocked or reserved by another user.\n\n## Notification information\n\n## SignalR\n\nThis API documentation includes both RESTful endpoints and real-time communication endpoints via SignalR.\n\nVertex Sync uses SignalR for real-time web functionality, enabling the server to send asynchronous notifications to client-side web applications. The SignalR endpoints, specifically under `/(hubs)/NotificationHub`, are designed for real-time notifications and cannot be interacted with via standard HTTP requests.\n\nFor more detailed information on how to establish a SignalR connection and interact with these real-time endpoints, please refer to the [official SignalR documentation](https://docs.microsoft.com/aspnet/core/signalr/introduction).\n\n### Group Naming Conventions\n\nWithin the SignalR framework of our application, users can join different groups to receive targeted real-time notifications. Below are the formats used for different notification scenarios:\n\n- **Single User Notifications**: For notifications specific to a single user, groups are named using the user's ID and their interests in the format `USER_[userId]_INTERESTS`. For example, a user with the ID **\"foo\"** would be part of the group `USER_foo_INTERESTS`.\n    \n- **Entity Change Notifications**: To receive notifications about changes to any entity within the application, users should join the group named `ALL_ENTITY_CHANGES`.\n    \n- **System-Wide Notifications**: For notifications that are relevant across the entire system, the group name `SYSTEM` is used.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"26452717","collectionId":"19b4c858-17c3-4eb0-b1ab-15d94a09374f","publishedId":"2sB2j1hsG8","public":true,"publicUrl":"https://documenter-api.postman.tech/view/26452717/2sB2j1hsG8","privateUrl":"https://go.postman.co/documentation/26452717-19b4c858-17c3-4eb0-b1ab-15d94a09374f","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":"Vertex Sync OpenAPI"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2025-04-28T07:58:54.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Vertex Sync OpenAPI","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sB2j1hsG8"}