Skip to end of metadata
Go to start of metadata

This feature is only available in the BiZZdesign cloud solution.

[BETA]

A data enrichment open API is available in the HoriZZon server. With this data enrichment API, external data and attributes can be added to existing structural data created by Enterprise Studio. In order to use the open API a named "API client" must be created in HoriZZon.

Currently, the data enrichment API can only be used in the context of ArchiMate modeling.

Required roles

Administrator or System Administrator


On this page:


Creating a named API client

The first step for using the API is creating an API Client. Every API Client has a unique identifier (the Client ID) and an associated secret key that can be used to request access tokens to authenticate with the API.

  1. In the sidebar menu, click Clients.

  2. Click Create API client.



  3. Set the API client properties. If you want to have the possibility to also write data into the API client, select Write permission. Click Create to create the client.



  4. When the API client is successfully created, a generated client secret is shown. This client secret is needed to connect your application to the BiZZdesign open API. Save a copy of the client secret somewhere in a safe place. After that, click Done.

    Once you leave the page, the client secret is gone.


Requesting an API Access Token

The generated API Client credentials can be used to create a temporary access token to authenticate your API calls. For authentication OAuth 2 is used, a modern standard for securing access to APIs. The token is created by sending a POST request to https://<orgname>.bizzdesign.cloud/oauth/token with the following parameters :


KeyValue
grant_typeclient_credentials
client_id<generated Client ID>
client_secret<generated secret>


The hostname for requesting API Access Tokens is the same hostname used in the Enterprise Studio clients


These parameters can either be set as query parameters in the URL or in the body using x-www-form-url encoded data. Possible return values are:


Response codeBodyDescription
200Access token in RFC 7519 format (JWT)Relevant attributes are access_token (which contains the token used to authenticate to the API) and expires_in (lifetime of the access token, in seconds). The access token uses the JSON Web Token format defined in RFC 7519. 
400JSON-formatted error messageInvalid request
401emptyThe combination of client_id and client_secret is invalid
403emptyYour current license level does not cover use of the Open API


Below is a simple example using Curl, assuming your HoriZZon environment is normally accessed via  https://<orgname>.horizzon.cloud/ .

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=CustomerClientID' \
--data-urlencode 'client_secret=CustomerClientSecret' \
https://<orgname>.bizzdesign.cloud/oauth/token

Submitting requests to the Open API

Once a valid access token is obtained requests can be submitted to the Open API using the following URL:

https://<orgname>-api.horizzon.cloud/api/<version>/<API-call>


Where <version> represents the API version identifier. It may change with every new version of the Open API.

The identifier associated with the current Open API version is: beta2

So, the API is now reachable via  https://<orgname>-api.horizzon.cloud/api/beta2/ 

The hostname used for OpenAPI requests is different from the hostname normally used to access HoriZZon, note the extra -api part in the name!


The access token is used as a bearer token, which means it should be sent in the Authorization: header, with the value of the header set to "Bearer <tokenvalue>". An example using Curl to request a list of all collaborations in JSON format:

curl -H "Accept: application/json" \
-H "Authorization: Bearer ReplaceThisWithTheBearerTokenRetrievedInThePreviousStep" \
https://<orgname>-api.horizzon.cloud/api/<version>/collaborations

Open API documentation

The following API calls are available for use:

{ "swagger": "2.0", "info": { "title": "BiZZdesign Open API - beta2", "description": "API for <i>extending</i> and <i>enriching</i> architectures managed by the BiZZdesign toolset.<br><br> BiZZdesign <b>Enterprise Studio</b> allows invited users to collaboratively model architectural structural objects, store these in BiZZdesign <b>Team Server</b>, and publish them to selected user groups on the <b>HoriZZon</b> platform.<br><br> Part of this collaborative process is managing a set of properties for each modeled object. Property values are assigned in <b>Enterprise Studio</b>, and stored with the object in <b>Team Server</b>. <b>HoriZZon</b> will display their values with the object, but does not allow changing them.<br><br> <u>Data enrichment</u><br> On top of these read-only properties <b>HoriZZon</b> supports additional object attributes of which the values can be edited in <b>HoriZZon</b> itself. These attributes are defined in a <i>schema</i>, and their values are attached to an object in the form of a <i>document</i>. This API allows an authorized client application to directly create, modify and delete schemas and documents, enriching the architecture with additional data that is visible and editable in (and only in) <b>HoriZZon</b>.<br><br> <u>Architecture automation</u><br> The architecture managed by the BiZZdesign toolset can also be extended with architectural elements that are managed outside of this toolset. This API allows an authorized client application to add <i>collections</i> of <i>entities</i> and <i>links</i> from an external source, and incorporate them seamlessly in an architecture managed in <b>Enterprise Studio</b>. These entities themselves can be assigned additional properties using <i>data enrichment</i>.<br><br> <small>Please note that all calls to this API might be subject to <i>rate limiting</i>, causing them to return a 429 status code (\"Too Many Requests\"). </small><br><br>", "termsOfService": "https://support.bizzdesign.com/", "contact": { "name": "BiZZdesign", "url": "https://support.bizzdesign.com/" }, "license": { "name": "BiZZdesign OpenAPI license pack", "url": "https://support.bizzdesign.com/" }, "version": "2.0.0" }, "externalDocs": { "description": "BiZZdesign online documentation", "url": "https://support.bizzdesign.com/" }, "tags": [ { "name": "schema", "description": "A <i>schema</i> describes a group of attributes that can be instantiated (as a <i>document</i>) and then linked to an architectural entity (i.e. an <i>Enterprise Studio object</i>)." }, { "name": "document", "description": "A <i>document</i> is a group of attribute values that conforms to a schema and is linked to an architectural entity (i.e. an <i>Enterprise Studio object</i>)." }, { "name": "object", "description": "An <i>object</i> represents an architectural entity in a model package (i.e. an <i>Enterprise Studio object</i>)." }, { "name": "collaboration", "description": "A <i>collaboration</i> is a Team Server entity that allows invited users to collaboratively model architectural structural data stored in a model package." }, { "name": "repository", "description": "A <i>repository</i> is a construct associated with a 'master' collaboration. Both this collaboration and the 'project' collaborations that were based on it have access to the <i>collections</i> in this repository." }, { "name": "collection", "description": "A <i>collection</i> contains entities and links.<br>These paths use <i>external</i> IDs (Strings) to identify collections, entities and links." }, { "name": "container", "description": "A <i>container</i> is a subdivision of a <i>collection</i>, and contains entities belonging to a certain domain, and links. The number of elements a container can hold is limited to 5000.<br>These paths use <i>external</i> IDs (Strings) to identify collections, entities and links." }, { "name": "entity", "description": "An <i>entity</i> represents a structural object.<br>These paths use <i>external</i> IDs (Strings) to identify collections, entities and links." }, { "name": "link", "description": "A <i>link</i> represents a relationship between two entities. The number of links that may be attached to an entity is limited to 100.<br>These paths use <i>external</i> IDs (Strings) to identify collections, entities and links." }, { "name": "entity document", "description": "An <i>entity document</i> is like a <i>document</i>, but linked to an architectural entity that is managed outside of <i>Enterprise Studio</i>.<br>These paths use <i>external</i> IDs (Strings) to identify collections, entities and links." }, { "name": "link document", "description": "A <i>link document</i> is like a <i>document</i>, but linked to an architectural link that is managed outside of <i>Enterprise Studio</i>.<br>These paths use <i>external</i> IDs (Strings) to identify collections, entities and links." }, { "name": "bulk", "description": "Creating/updating multiple <i>entities</i> or <i>links</i> at once." } ], "paths": { "/collaborations": { "get": { "tags": [ "collaboration" ], "summary": "Get all collaborations", "description": "Retrieve a list of all available collaborations.", "operationId": "getCollaborations", "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains a JSON array of collaborations. This array might be empty.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Collaboration" } } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/objects": { "get": { "tags": [ "object" ], "summary": "Get all objects of a specified type", "description": "Retrieve a list of all Enterprise Studio objects of a certain type, located in the collaboration specified.", "operationId": "getObjects", "produces": [ "application/json" ], "parameters": [ { "name": "collaborationId", "in": "query", "description": "The UUID that identifies the collaboration.", "required": true, "type": "string" }, { "name": "modelId", "in": "query", "description": "A UUID that identifies a parent model (cannot be combined with layerId).", "required": false, "type": "string" }, { "name": "layerId", "in": "query", "description": "A UUID that identifies a parent scheme (cannot be combined with modelId).", "required": false, "type": "string" }, { "name": "type", "in": "query", "description": "The type of the objects to retrieve.", "required": true, "type": "string" }, { "name": "offset", "in": "query", "description": "Pagination offset: number of rows preceding the first row returned. When omitted, this number defaults to 0.", "required": false, "type": "integer", "format": "int32" }, { "name": "limit", "in": "query", "description": "Pagination limit: number of rows to return. The maximum is 50. When omitted, this number defaults to 30.", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "The request was successful. The response body is a JSON object, containing an array of objects (and some additional data). This array might be empty. Note that although documents associated with an object can be requested separately, they are returned also in this response.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Object" } } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/objects/{objectId}/{schemaNamespace}/{schemaName}": { "get": { "tags": [ "document" ], "summary": "Retrieve a document attached to an object", "description": "Retrieve a document attached to an object", "operationId": "getObjectDocument", "produces": [ "application/json" ], "parameters": [ { "name": "collaborationId", "in": "query", "description": "The UUID that identifies the collaboration.", "required": true, "type": "string" }, { "name": "objectId", "in": "path", "description": "The UUID that identifies the object.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful. The response body contains the document.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The entity did not have a document attached." } } } }, "/schemas": { "get": { "tags": [ "schema" ], "summary": "Get all schemas", "description": "Retrieve a list of all available schema definitions.", "operationId": "getSchemas", "parameters": [], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body is a JSON object containing an array of schema definitions. This array might be empty.", "schema": { "type": "array", "items": { "$ref": "#/definitions/VersionedSchema" } } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "post": { "tags": [ "schema" ], "summary": "Submit (a new version of) a JSON schema definition", "description": "When a schema with this namespace and name does not yet exist, it is added. When the schema already exists, this new definition will override the current version.<br><br>Existing documents using the previous definition will keep using this definition until written again, at which moment the new definition will be applied.", "operationId": "postSchema", "parameters": [ { "in": "body", "name": "schema", "description": "The JSON contents of the new schema", "schema": { "$ref": "#/definitions/VersionedSchema" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the JSON schema definition that was uploaded, complemented with some additional operational data (like a creation timestamp).", "schema": { "$ref": "#/definitions/VersionedSchema" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/relations": { "get": { "tags": [ "object" ], "summary": "Get all relations of a specified type", "description": "Retrieve a list of all Enterprise Studio relations of a certain type, located in the collaboration specified.", "operationId": "getRelations", "produces": [ "application/json" ], "parameters": [ { "name": "collaborationId", "in": "query", "description": "The UUID that identifies the collaboration.", "required": true, "type": "string" }, { "name": "relationType", "in": "query", "description": "The type of the relations to retrieve.", "required": false, "type": "string" }, { "name": "fromType", "in": "query", "description": "The type of object these relations must start on.", "required": false, "type": "string" }, { "name": "toType", "in": "query", "description": "The type of object these relations must end on.", "required": false, "type": "string" }, { "name": "relationId", "in": "query", "description": "The UUID of the relation to retrieve.", "required": false, "type": "string" }, { "name": "fromId", "in": "query", "description": "The UUID of the object these relations must start on.", "required": false, "type": "string" }, { "name": "toId", "in": "query", "description": "The UUID of the object these relations must end on.", "required": false, "type": "string" }, { "name": "offset", "in": "query", "description": "Pagination offset: number of rows preceding the first row returned. When omitted, this number defaults to 0.", "required": false, "type": "integer", "format": "int32" }, { "name": "limit", "in": "query", "description": "Pagination limit: number of rows to return. The maximum is 50. When omitted, this number defaults to 30.", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "The request was successful. The response body is a JSON object, containing an array of relations. This array might be empty.", "schema": { "type": "array", "items": { "$ref": "#/definitions/RelationInfos" } } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/schemas/{namespace}/{name}": { "get": { "tags": [ "schema" ], "summary": "Get schema with name", "description": "Retrieve the schema with the specified namespace and name.", "operationId": "getSchemaWithName", "produces": [ "application/json" ], "parameters": [ { "name": "namespace", "in": "path", "description": "The namespace in which the schema is defined.", "required": true, "type": "string" }, { "name": "name", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful. The response body contains a JSON object representing the schema definition.", "schema": { "$ref": "#/definitions/VersionedSchema" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The request failed because no schema exists with this namespace and name." } } }, "delete": { "tags": [ "schema" ], "summary": "Delete schema with name", "description": "Delete the schema with the specified namespace and name.<br><br><b>Please note that this will also remove all documents that use this schema!</b>", "operationId": "deleteSchemaWithName", "parameters": [ { "name": "namespace", "in": "path", "description": "The namespace in which the schema is defined.", "required": true, "type": "string" }, { "name": "name", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The request failed because no schema exists with this namespace and name." } } } }, "/documents": { "post": { "tags": [ "document" ], "summary": "Create a new document", "description": "Create a new document and associate it with an Enterprise Studio object.", "operationId": "postDocument", "parameters": [ { "in": "body", "name": "document", "description": "The JSON contents of the new document", "schema": { "$ref": "#/definitions/DocumentCreate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the JSON document that was uploaded, complemented with the document's ID.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "409": { "description": "The request failed because the object already has a document for the specified schema. The response body contains a JSON object specifying the Team Server error number 'H_409' and a URL to the associated online help page." } } } }, "/documents/{id}": { "get": { "tags": [ "document" ], "summary": "Get an existing document", "description": "Retrieve the document with the specified ID.<br><br>The values returned will adhere to the schema associated with this document the moment they were written, even if a new version of this schema has been uploaded since then.<br>Note that when this document needs to be written again, its contents must use the latest schema version.", "operationId": "getDocument", "produces": [ "application/json" ], "parameters": [ { "name": "id", "in": "path", "description": "The UUID that identifies the document.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful. The response body contains the current JSON contents of the document.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The request failed because no document exists with this ID." } } }, "put": { "tags": [ "document" ], "summary": "Replace an existing document", "description": "Replace an existing document associated with an Enterprise Studio object.<br><br>If the associated schema has been updated since the last time this document was written, this latest schema version will be applied.", "operationId": "putDocument", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "name": "id", "in": "path", "description": "The UUID that identifies the document.", "required": true, "type": "string" }, { "in": "body", "name": "document", "description": "The new JSON contents of the document", "schema": { "$ref": "#/definitions/DocumentUpdate" } } ], "responses": { "200": { "description": "The request was successful. The response body contains the (replaced) current JSON contents of the document.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The request failed because no document exists with this ID." } } }, "delete": { "tags": [ "document" ], "summary": "Delete an existing document", "description": "Delete the document with the specified ID.", "operationId": "deleteDocument", "parameters": [ { "name": "id", "in": "path", "description": "The UUID that identifies the document.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The request failed because no document exists with this ID." } } }, "patch": { "tags": [ "document" ], "summary": "Update an existing document", "description": "Replace a subset of values in an existing document.<br><br>If the associated schema has been updated since the last time this document was written, this latest schema version will be applied.", "operationId": "patchDocument", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "name": "id", "in": "path", "description": "The UUID that identifies the document.", "required": true, "type": "string" }, { "in": "body", "name": "document", "description": "The new JSON contents of the document", "schema": { "$ref": "#/definitions/DocumentUpdate" } } ], "responses": { "200": { "description": "The request was successful. The response body contains the (updated) current JSON contents of the document.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The request failed because no document exists with this ID." } } } }, "/repositories": { "get": { "tags": [ "repository" ], "summary": "Retrieve all repositories", "description": "Retrieve all repositories", "operationId": "getRepositories", "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the repositories.", "schema": { "$ref": "#/definitions/Repositories" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/collections": { "post": { "tags": [ "collection" ], "summary": "Create a new collection in the repository", "description": "Create a new collection in the repository", "operationId": "postCollection", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collection", "in": "body", "description": "The JSON contents of the new collection", "schema": { "$ref": "#/definitions/CollectionCreate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the collection that was uploaded.", "schema": { "$ref": "#/definitions/Collection" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "collection" ], "summary": "Retrieve all collections in the repository", "description": "Retrieve all collections in the repository", "operationId": "getCollections", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the collections.", "schema": { "$ref": "#/definitions/Collections" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/collections/{collectionId}": { "put": { "tags": [ "collection" ], "summary": "Update (the name of) a collection", "description": "Update (the name of) a collection", "operationId": "updateCollection", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" }, { "name": "collection", "in": "body", "description": "The values to update (only the name). When omitted, the value will be cleared. If the values are equal to the ones already set, the request will succeed without performing an update.", "schema": { "$ref": "#/definitions/CollectionUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "collection" ], "summary": "Retrieve a collection from the repository", "description": "Retrieve a collection from the repository", "operationId": "getCollection", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the collection.", "schema": { "$ref": "#/definitions/Collection" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "delete": { "tags": [ "collection" ], "summary": "Delete a collection from the repository", "description": "Delete a collection from the repository", "operationId": "deleteCollection", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/collections/{collectionId}/containers": { "post": { "tags": [ "container" ], "summary": "Create a new container in a collection", "description": "Create a new container in a collection", "operationId": "postContainer", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" }, { "name": "container", "in": "body", "description": "The JSON contents of the new container", "schema": { "$ref": "#/definitions/ContainerCreate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "201": { "description": "The request was successful. The response body contains the container that was uploaded.", "schema": { "$ref": "#/definitions/Container" } }, "400": { "description": "The request failed because the information provided was incorrect." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "container" ], "summary": "Retrieve all containers in a collection", "description": "Retrieve all containers in a collection", "operationId": "getContainers", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the containers.", "schema": { "$ref": "#/definitions/Containers" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/containers/{containerId}": { "put": { "tags": [ "container" ], "summary": "Update (the name of) a container", "description": "Update (the name of) a container", "operationId": "updateContainer", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "containerId", "in": "path", "description": "The external ID (a String) that identifies the container.", "required": true, "type": "string" }, { "name": "container", "in": "body", "description": "The values to update (only the name). When omitted, the value will be cleared. If the values are equal to the ones already set, the request will succeed without performing an update.", "schema": { "$ref": "#/definitions/ContainerUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "container" ], "summary": "Retrieve a container", "description": "Retrieve a container", "operationId": "getContainer", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "containerId", "in": "path", "description": "The external ID (a String) that identifies the container.", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the container.", "schema": { "$ref": "#/definitions/Container" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "delete": { "tags": [ "container" ], "summary": "Delete a container", "description": "Delete a container", "operationId": "deleteContainer", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "containerId", "in": "path", "description": "The external ID (a String) that identifies the container.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/collections/{collectionId}/entities/bulk": { "post": { "tags": [ "bulk" ], "summary": "Create and/or update one or more entities in a collection", "description": "Create and/or update one or more entities in a collection", "operationId": "postEntities", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" }, { "name": "entities", "in": "body", "description": "The JSON contents of the entities to create and/or update. Next to the external ID, the term is also mandatory when creating. When updating, external ID and the field(s) to update are required. When 'containerExternalId' is specified for a new element, it will be created in a container with that ID, unless that has reached its limit of 5000 elements, in which case a new container will be created with a similar ID. If 'containerExternalId' is omitted, the element is added to the default container. If the default container has already reached its limit of 5000 elements, the request will fail.", "schema": { "$ref": "#/definitions/EntitiesCreateUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "201": { "description": "The request was successful. The response body contains the entities (and data blocks) that were created or updated.", "schema": { "$ref": "#/definitions/EntitiesCreateUpdate" } }, "400": { "description": "The request failed because the request body contained errors." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/collections/{collectionId}/entities": { "post": { "tags": [ "entity" ], "summary": "Create an entity in a collection", "description": "Create an entity in a collection", "operationId": "createEntityInCollection", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" }, { "name": "entity", "in": "body", "description": "The JSON contents of the entity to create. When 'containerExternalId' is specified, the element will be created in a container with that ID, unless it has reached its limit of 5000 elements, in which case a new container will be created with a similar ID. If 'containerExternalId' is omitted, the element is added to the default container. If the default container has already reached its limit of 5000 elements, the request will fail.", "schema": { "$ref": "#/definitions/EntityCreateCollection" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "201": { "description": "The request was successful. The response body contains the entity.", "schema": { "$ref": "#/definitions/Entity" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "entity" ], "summary": "Retrieve all entities in a collection", "description": "Retrieve all entities in a collection", "operationId": "getEntitiesInCollection", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" }, { "name": "offset", "in": "query", "description": "Pagination offset: number of rows preceding the first row returned. When omitted, this number defaults to 0.", "required": false, "type": "integer", "format": "int32" }, { "name": "limit", "in": "query", "description": "Pagination limit: number of rows to return. The maximum is 2000. When omitted, this number defaults to 500.", "required": false, "type": "integer", "format": "int32" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the entities.", "schema": { "$ref": "#/definitions/Entities" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/containers/{containerId}/entities": { "post": { "tags": [ "entity" ], "summary": "Create an entity in a container", "description": "Create an entity in a container", "operationId": "createEntityInContainer", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "containerId", "in": "path", "description": "The external ID (a String) that identifies the container.", "required": true, "type": "string" }, { "name": "entity", "in": "body", "description": "The JSON contents of the entity to create. If the container has already reached its limit of 5000 elements, the request will fail.", "schema": { "$ref": "#/definitions/EntityCreate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "201": { "description": "The request was successful. The response body contains the entity.", "schema": { "$ref": "#/definitions/Entity" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "entity" ], "summary": "Retrieve all entities in a container", "description": "Retrieve all entities in a container", "operationId": "getEntitiesInContainer", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "containerId", "in": "path", "description": "The external ID (a String) that identifies the container.", "required": true, "type": "string" }, { "name": "offset", "in": "query", "description": "Pagination offset: number of rows preceding the first row returned. When omitted, this number defaults to 0.", "required": false, "type": "integer", "format": "int32" }, { "name": "limit", "in": "query", "description": "Pagination limit: number of rows to return. The maximum is 2000. When omitted, this number defaults to 500.", "required": false, "type": "integer", "format": "int32" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the entities.", "schema": { "$ref": "#/definitions/Entities" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/entities/{entityId}": { "put": { "tags": [ "entity" ], "summary": "Update (the name of) an entity", "description": "Update (the name of) an entity", "operationId": "updateEntity", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "entityId", "in": "path", "description": "The external ID (a String) that identifies the entity.", "required": true, "type": "string" }, { "name": "entity", "in": "body", "description": "The values to update (only the name). When omitted, the value will be cleared. If the values are equal to the ones already set, the request will succeed without performing an update.", "schema": { "$ref": "#/definitions/EntityUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "entity" ], "summary": "Retrieve an entity", "description": "Retrieve an entity", "operationId": "getEntity", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "entityId", "in": "path", "description": "The external ID (a String) that identifies the entity.", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the entity.", "schema": { "$ref": "#/definitions/Entity" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "delete": { "tags": [ "entity" ], "summary": "Delete an entity", "description": "Delete an entity", "operationId": "deleteEntity", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "entityId", "in": "path", "description": "The external ID (a String) that identifies the entity.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/collections/{collectionId}/links/bulk": { "post": { "tags": [ "bulk" ], "summary": "Create and/or update one or more links in a collection", "description": "Create and/or one or more multiple links in a collection", "operationId": "postLinks", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" }, { "name": "links", "in": "body", "description": "The JSON contents of the links to create and/or update. Next to the external ID, the term is also mandatory when creating. When updating, external ID and the field(s) to update are required. When 'containerExternalId' is specified for a new element, it will be created in a container with that ID, unless that has reached its limit of 5000 elements, in which case a new container will be created with a similar ID. If 'containerExternalId' is omitted, the element is added to the default container. If the default container has already reached its limit of 5000 elements, the request will fail. Also, when adding this link would make either of its end objects exceed the maximum number of 100 attached links, the request fails.", "schema": { "$ref": "#/definitions/LinksCreateUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the links (and data blocks) that were created or updated.", "schema": { "$ref": "#/definitions/LinksCreateUpdate" } }, "400": { "description": "The request failed because the request body contained errors." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/collections/{collectionId}/links": { "post": { "tags": [ "link" ], "summary": "Create an link in a collection", "description": "Create an link in a collection", "operationId": "createLinkInCollection", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" }, { "name": "link", "in": "body", "description": "The JSON contents of the link to create. When 'containerExternalId' is specified, the element will be created in a container with that ID, unless it has reached its limit of 5000 elements, in which case a new container will be created with a similar ID. If 'containerExternalId' is omitted, the element is added to the default container. If the default container has already reached its limit of 5000 elements, the request will fail. Also, when adding this link would make either of its end objects exceed the maximum number of 100 attached links, the request fails.", "schema": { "$ref": "#/definitions/LinkCreateCollection" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "201": { "description": "The request was successful. The response body contains the link.", "schema": { "$ref": "#/definitions/Link" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "link" ], "summary": "Retrieve all links in a collection", "description": "Retrieve all links in a collection", "operationId": "getLinksInCollection", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "collectionId", "in": "path", "description": "The external ID (a String) that identifies the collection.", "required": true, "type": "string" }, { "name": "offset", "in": "query", "description": "Pagination offset: number of rows preceding the first row returned. When omitted, this number defaults to 0.", "required": false, "type": "integer", "format": "int32" }, { "name": "limit", "in": "query", "description": "Pagination limit: number of rows to return. The maximum is 2000. When omitted, this number defaults to 500.", "required": false, "type": "integer", "format": "int32" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the links.", "schema": { "$ref": "#/definitions/Links" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/containers/{containerId}/links": { "post": { "tags": [ "link" ], "summary": "Create an link in a container", "description": "Create an link in a container", "operationId": "createLinkInContainer", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "containerId", "in": "path", "description": "The external ID (a String) that identifies the container.", "required": true, "type": "string" }, { "name": "link", "in": "body", "description": "The JSON contents of the link to create. If the container has already reached its limit of 5000 elements, the request will fail. When adding this link would make either of its end objects exceed the maximum number of 100 attached links, the request fails.", "schema": { "$ref": "#/definitions/LinkCreate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "201": { "description": "The request was successful. The response body contains the link.", "schema": { "$ref": "#/definitions/Link" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "link" ], "summary": "Retrieve all links in a container", "description": "Retrieve all links in a container", "operationId": "getLinksInContainer", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "containerId", "in": "path", "description": "The external ID (a String) that identifies the container.", "required": true, "type": "string" }, { "name": "offset", "in": "query", "description": "Pagination offset: number of rows preceding the first row returned. When omitted, this number defaults to 0.", "required": false, "type": "integer", "format": "int32" }, { "name": "limit", "in": "query", "description": "Pagination limit: number of rows to return. The maximum is 2000. When omitted, this number defaults to 500.", "required": false, "type": "integer", "format": "int32" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the links.", "schema": { "$ref": "#/definitions/Links" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/links/{linkId}": { "put": { "tags": [ "link" ], "summary": "Update (the name of) a link", "description": "Ipdate (the name of) a link", "operationId": "updateLink", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "linkId", "in": "path", "description": "The external ID (a String) that identifies the link.", "required": true, "type": "string" }, { "name": "link", "in": "body", "description": "The values to update (only the name). When omitted, the value will be cleared. If the values are equal to the ones already set, the request will succeed without performing an update.", "schema": { "$ref": "#/definitions/LinkUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the link.", "schema": { "$ref": "#/definitions/Link" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "link" ], "summary": "Retrieve a link", "description": "Retrieve a link", "operationId": "getLink", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "linkId", "in": "path", "description": "The external ID (a String) that identifies the link.", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the link.", "schema": { "$ref": "#/definitions/Link" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "delete": { "tags": [ "link" ], "summary": "Delete a link", "description": "Delete a link", "operationId": "deleteLink", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "linkId", "in": "path", "description": "The external ID (a String) that identifies the link.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } } }, "/repositories/{repositoryId}/entities/{entityId}/{schemaNamespace}/{schemaName}": { "post": { "tags": [ "entity document" ], "summary": "Create a new document attached to an entity", "description": "Create a new document attached to an entity", "operationId": "postEntityDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "entityId", "in": "path", "description": "The external ID (a String) that identifies the entity.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" }, { "name": "document", "in": "body", "description": "The JSON contents of the new document", "schema": { "$ref": "#/definitions/BlockDocumentCreate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the document that was uploaded, complemented with the document's ID.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "put": { "tags": [ "entity document" ], "summary": "Replace an existing document attached to an entity", "description": "Replace an existing document attached to an entity", "operationId": "putEntityDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "entityId", "in": "path", "description": "The external ID (a String) that identifies the entity.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" }, { "name": "document", "in": "body", "description": "The updated JSON contents of the document.", "schema": { "$ref": "#/definitions/DocumentUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the updated document (as it was uploaded).", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "patch": { "tags": [ "entity document" ], "summary": "Update an existing document attached to an entity", "description": "Update an existing document attached to an entity", "operationId": "patchEntityDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "entityId", "in": "path", "description": "The external ID (a String) that identifies the entity.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" }, { "name": "document", "in": "body", "description": "The (updated part of the) JSON contents of the document.", "schema": { "$ref": "#/definitions/DocumentUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the updated document.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "entity document" ], "summary": "Retrieve a document attached to an entity", "description": "Retrieve a document attached to an entity", "operationId": "getEntityDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "entityId", "in": "path", "description": "The external ID (a String) that identifies the entity.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the document.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The entity did not have a document attached." } } }, "delete": { "tags": [ "entity document" ], "summary": "Delete a document attached to an entity", "description": "Delete a document attached to an entity", "operationId": "deleteEntityDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "entityId", "in": "path", "description": "The external ID (a String) that identifies the entity.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The entity did not have a document attached." } } } }, "/repositories/{repositoryId}/links/{linkId}/{schemaNamespace}/{schemaName}": { "post": { "tags": [ "link document" ], "summary": "Create a new document attached to a link", "description": "Create a new document attached to a link", "operationId": "postLinkDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "linkId", "in": "path", "description": "The external ID (a String) that identifies the link.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" }, { "name": "document", "in": "body", "description": "The JSON contents of the new document", "schema": { "$ref": "#/definitions/BlockDocumentCreate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the document that was uploaded, complemented with the document's ID.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "put": { "tags": [ "link document" ], "summary": "Replace an existing document attached to a link", "description": "Replace an existing document attached to a link", "operationId": "putLinkDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "linkId", "in": "path", "description": "The external ID (a String) that identifies the link.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" }, { "name": "document", "in": "body", "description": "The updated JSON contents of the document.", "schema": { "$ref": "#/definitions/DocumentUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the updated document (as it was uploaded).", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "patch": { "tags": [ "link document" ], "summary": "Update an existing document attached to a link", "description": "Update an existing document attached to a link", "operationId": "patchLinkDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "linkId", "in": "path", "description": "The external ID (a String) that identifies the link.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" }, { "name": "document", "in": "body", "description": "The (updated part of the) JSON contents of the document.", "schema": { "$ref": "#/definitions/DocumentUpdate" } } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the updated document.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." } } }, "get": { "tags": [ "link document" ], "summary": "Retrieve a document attached to a link", "description": "Retrieve a document attached to a link", "operationId": "getLinkDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "linkId", "in": "path", "description": "The external ID (a String) that identifies the link.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" } ], "produces": [ "application/json" ], "responses": { "200": { "description": "The request was successful. The response body contains the document.", "schema": { "$ref": "#/definitions/Document" } }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The link did not have a document attached." } } }, "delete": { "tags": [ "link document" ], "summary": "Delete a document attached to a link", "description": "Delete a document attached to a link", "operationId": "deleteLinkDocument", "parameters": [ { "name": "repositoryId", "in": "path", "description": "The number that identifies the repository.", "required": true, "type": "integer" }, { "name": "linkId", "in": "path", "description": "The external ID (a String) that identifies the link.", "required": true, "type": "string" }, { "name": "schemaNamespace", "in": "path", "description": "The namespace of the schema.", "required": true, "type": "string" }, { "name": "schemaName", "in": "path", "description": "The name of the schema.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request was successful." }, "401": { "description": "The request failed because the authentication credentials were incorrect or missing." }, "404": { "description": "The link did not have a document attached." } } } } }, "definitions": { "Collaboration": { "type": "object", "properties": { "collaborationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" } }, "additionalProperties": false }, "VersionedSchema": { "required": [ "fields", "name", "namespace", "publishedForCollaboration", "schemas", "types" ], "type": "object", "properties": { "namespace": { "type": "string" }, "name": { "type": "string" }, "label": { "type": "string" }, "fields": { "minItems": 1, "type": "array", "items": { "$ref": "#/definitions/Field" } }, "schemas": { "type": "array", "items": { "$ref": "#/definitions/Schema" } }, "types": { "type": "array", "items": { "type": "string" } }, "publishedForCollaboration": { "type": "string" } }, "additionalProperties": false }, "Field": { "required": [ "name", "schema" ], "type": "object", "properties": { "name": { "type": "string" }, "schema": { "type": "string" }, "label": { "type": "string" } } }, "Schema": { "required": [ "kind", "name" ], "type": "object", "properties": { "kind": { "type": "string", "enum": [ "enum" ] }, "name": { "type": "string" }, "literals": { "minItems": 1, "type": "array", "items": { "$ref": "#/definitions/EnumLiteral" } } } }, "EnumLiteral": { "type": "object", "properties": { "name": { "type": "string" }, "label": { "type": "string" } } }, "DocumentCreate": { "required": [ "objectId", "schemaName", "schemaNamespace", "values" ], "type": "object", "properties": { "objectId": { "type": "string" }, "schemaNamespace": { "type": "string" }, "schemaName": { "type": "string" }, "values": { "minProperties": 1, "type": "object" } }, "additionalProperties": false }, "BlockDocumentCreate": { "type": "object", "properties": { "values": { "minProperties": 1, "type": "object" } }, "additionalProperties": false, "required": [ "values" ] }, "DocumentUpdate": { "required": [ "values" ], "type": "object", "properties": { "values": { "minProperties": 1, "type": "object" } }, "additionalProperties": false }, "Document": { "type": "object", "properties": { "id": { "type": "string" }, "schemaNamespace": { "type": "string" }, "schemaName": { "type": "string" }, "values": { "minProperties": 1, "type": "object" } }, "additionalProperties": false }, "Object": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "name": { "type": "object", "additionalProperties": { "type": "string" } }, "documents": { "type": "array", "items": { "$ref": "#/definitions/Document" } }, "updatedAt": { "type": "string" } } }, "RelationInfo": { "type": "object", "properties": { "relationId": { "type": "string" }, "relationType": { "type": "string" }, "relationName": { "type": "object", "additionalProperties": { "type": "string" } }, "fromId": { "type": "string" }, "fromType": { "type": "string" }, "fromName": { "type": "object", "additionalProperties": { "type": "string" } }, "toId": { "type": "string" }, "toType": { "type": "string" }, "toName": { "type": "object", "additionalProperties": { "type": "string" } }, "updatedAt": { "type": "string" } }, "required": [ "relationId", "relationType", "fromId", "fromType", "toId", "toType" ] }, "RelationInfos": { "type": "object", "properties": { "_items": { "type": "array", "items": { "$ref": "#/definitions/RelationInfo" } } } }, "Names": { "type": "object", "additionalProperties": { "type": "string", "minProperties": 1 } }, "DataBlock": { "type": "object", "properties": { "schemaNamespace": { "type": "string" }, "schemaName": { "type": "string" }, "values": { "type": "object", "minProperties": 1 } } }, "Repository": { "type": "object", "properties": { "id": { "type": "integer" }, "masterCollaborationId": { "type": "integer" }, "masterCollaborationName": { "type": "string" }, "masterCollaborationDescription": { "type": "string" } } }, "Repositories": { "type": "object", "properties": { "_items": { "type": "array", "items": { "$ref": "#/definitions/Repository" } } } }, "CollectionCreate": { "type": "object", "properties": { "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" } }, "required": [ "externalId", "term" ] }, "CollectionUpdate": { "type": "object", "properties": { "name": { "$ref": "#/definitions/Names" } } }, "Collection": { "type": "object", "properties": { "id": { "type": "string" }, "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "type": "object", "additionalProperties": { "type": "string", "minProperties": 1 } }, "updatedAt": { "type": "string" } }, "required": [ "id", "term", "updatedAt" ] }, "Collections": { "type": "object", "properties": { "_items": { "type": "array", "items": { "$ref": "#/definitions/Collection" } } } }, "ContainerCreate": { "type": "object", "properties": { "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" } }, "required": [ "externalId", "term" ] }, "ContainerUpdate": { "type": "object", "properties": { "name": { "$ref": "#/definitions/Names" } } }, "Container": { "type": "object", "properties": { "id": { "type": "string" }, "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "type": "object", "additionalProperties": { "type": "string", "minProperties": 1 } }, "updatedAt": { "type": "string" } }, "required": [ "id", "term", "updatedAt" ] }, "Containers": { "type": "object", "properties": { "_items": { "type": "array", "items": { "$ref": "#/definitions/Container" } } } }, "EntityCreateUpdate": { "type": "object", "properties": { "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" }, "containerExternalId": { "type": "string" }, "dataBlocks": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/DataBlock" } } }, "required": [ "externalId" ] }, "EntityCreateCollection": { "type": "object", "properties": { "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" }, "containerExternalId": { "type": "string" } }, "required": [ "externalId", "term" ] }, "EntityCreate": { "type": "object", "properties": { "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" } }, "required": [ "externalId", "term" ] }, "EntityUpdate": { "type": "object", "properties": { "name": { "$ref": "#/definitions/Names" } } }, "Entity": { "type": "object", "properties": { "id": { "type": "string" }, "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" }, "updatedAt": { "type": "string" } }, "required": [ "id", "term", "updatedAt" ] }, "Entities": { "type": "object", "properties": { "_items": { "type": "array", "items": { "$ref": "#/definitions/Entity" } } } }, "EntitiesCreateUpdate": { "type": "object", "properties": { "_items": { "type": "array", "items": { "$ref": "#/definitions/EntityCreateUpdate" } } } }, "LinkCreateUpdate": { "type": "object", "properties": { "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" }, "fromExternalId": { "type": "string" }, "toExternalId": { "type": "string" }, "containerExternalId": { "type": "string" }, "dataBlocks": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/DataBlock" } } }, "required": [ "externalId" ] }, "LinkCreateCollection": { "type": "object", "properties": { "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" }, "fromId": { "type": "string" }, "fromExternalId": { "type": "string" }, "toId": { "type": "string" }, "toExternalId": { "type": "string" }, "containerExternalId": { "type": "string" } }, "required": [ "externalId", "term", "fromExternalId", "toExternalId" ] }, "LinkCreate": { "type": "object", "properties": { "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" }, "fromId": { "type": "string" }, "fromExternalId": { "type": "string" }, "toId": { "type": "string" }, "toExternalId": { "type": "string" } }, "required": [ "externalId", "term", "fromExternalId", "toExternalId" ] }, "LinkUpdate": { "type": "object", "properties": { "name": { "$ref": "#/definitions/Names" } } }, "Link": { "type": "object", "properties": { "id": { "type": "string" }, "externalId": { "type": "string" }, "term": { "type": "string" }, "name": { "$ref": "#/definitions/Names" }, "fromId": { "type": "string" }, "fromExternalId": { "type": "string" }, "toId": { "type": "string" }, "toExternalId": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "term", "fromId", "toId", "updatedAt" ] }, "Links": { "type": "object", "properties": { "_items": { "type": "array", "items": { "$ref": "#/definitions/Link" } } } }, "LinksCreateUpdate": { "type": "object", "properties": { "_items": { "type": "array", "items": { "$ref": "#/definitions/LinkCreateUpdate" } } } } } }

Finding type names

When using the Open API for requesting elements, their type names are needed to access the correct information. These type names can be found using the Metamodel Browser or you can use a script to generate a list of available type names in your model.

Using the Metamodel Browser

The Metamodel Browser can be accessed via the Query tool script editor. The Metamodel Browser contains the names of all elements, attributes and enumeration values of all the elements available in the metamodel of a model, including any customizations that have been made to the configuration of the metamodel.

Clicking the Metamodel button in the script editor will open the Metamodel Browser window. Type the name of the element you are looking for in the search box, and click Search. The result in Name will show the type name.

Using a script

Lists of type names can be generated using a script. The script can be executed in the script editor and needs the "Table" output type. Following scripts are available:

// Find the type of 1 object, selected in the model browser.

output selection[1].type().name();
// Find the type of all objects in the current open model package.

nameType = Index();
forall List("AbstractCompound", "AbstractElement") obj in modelpackage {
      nameType.add( obj.type().toString(), obj.type().name() );
}
forall name, type in nameType {
      output name, type;
}
// Find all possible types in a metamodel (whether present in the model package or not).

metamodel = "ArchiMate";
nameType = Index();
forall c in InternalObject("configuration").context(modelpackage).metaModel(metamodel).concepts(true) {
      if ( c.derivesFrom("AbstractCompound") || c.derivesFrom("AbstractElement") ) {
           nameType.add( c.label( modelpackage.activeLanguage() ), format("%s:%s", c.metaModel().name(), c.name()) );
      }
}
forall name, type in nameType {
      output name, type;
}


Example of a list generated with a script