{
  "swagger": "2.0",
  "info": {
    "title": "Integration API",
    "version": "v1"
  },
  "paths": {
    "/v1/{projectId}/fetchNode": {
      "get": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "query",
            "name": "NodeId",
            "type": "string"
          },
          {
            "in": "query",
            "name": "AddRelations",
            "type": "boolean"
          },
          {
            "in": "query",
            "name": "AddMixins",
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/NodeApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/fetchNodes": {
      "get": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "query",
            "name": "NodeType",
            "type": "string",
            "default": ""
          },
          {
            "in": "query",
            "name": "NodeIds",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "Expression",
            "type": "string",
            "default": ""
          },
          {
            "in": "query",
            "name": "SpaceIds",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "AddRelations",
            "type": "boolean",
            "default": false
          },
          {
            "in": "query",
            "name": "AddMixins",
            "type": "boolean",
            "default": false
          },
          {
            "in": "query",
            "name": "SortAttr",
            "type": "string"
          },
          {
            "in": "query",
            "name": "SortDesc",
            "type": "boolean",
            "default": false
          },
          {
            "in": "query",
            "name": "PageSize",
            "type": "integer",
            "format": "int32",
            "default": 50
          },
          {
            "in": "query",
            "name": "PagingToken",
            "type": "string"
          },
          {
            "in": "query",
            "name": "IncludeRelationsFromAllSpaces",
            "type": "boolean",
            "default": false
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/NodeResultApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/fetchImportProfiles": {
      "get": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ObjectApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/node": {
      "post": {
        "tags": [
          "IntegrationApi"
        ],
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/NodeCreateDto"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/NodeCreateResultApiResponse"
            }
          }
        }
      },
      "put": {
        "tags": [
          "IntegrationApi"
        ],
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/NodeUpdateDto"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ObjectApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/restoreNode/{id}": {
      "get": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ObjectApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/node/{id}": {
      "delete": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ObjectApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/relation": {
      "post": {
        "tags": [
          "IntegrationApi"
        ],
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Relation"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/RelationCreateResultApiResponse"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "IntegrationApi"
        ],
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Relation"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ObjectApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/relationGroupsInfo": {
      "get": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/RelationInfoIEnumerableApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/mixinsInfo": {
      "get": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/MixinListApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/mixinValue": {
      "delete": {
        "tags": [
          "IntegrationApi"
        ],
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/MixinRemoveDto"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ObjectApiResponse"
            }
          }
        }
      },
      "post": {
        "tags": [
          "IntegrationApi"
        ],
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/MixinCreateDto"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ObjectApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/bulkCreate": {
      "post": {
        "tags": [
          "IntegrationApi"
        ],
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/BulkCreateDto"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/BulkCreateResultApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/exportJsonLd": {
      "get": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "query",
            "name": "spaceId",
            "type": "string"
          },
          {
            "in": "query",
            "name": "configTypeId",
            "type": "string"
          },
          {
            "in": "query",
            "name": "exportTypes",
            "type": "boolean",
            "default": true
          },
          {
            "in": "query",
            "name": "exportElements",
            "type": "boolean",
            "default": false
          },
          {
            "in": "query",
            "name": "exportTaxonomies",
            "type": "boolean",
            "default": false
          },
          {
            "in": "query",
            "name": "includeSpace",
            "type": "boolean",
            "default": false
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/StringApiResponse"
            }
          }
        }
      }
    },
    "/v1/{projectId}/mergeJSONLD": {
      "get": {
        "tags": [
          "IntegrationApi"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "type": "string"
          },
          {
            "in": "query",
            "name": "SpaceId",
            "type": "string"
          },
          {
            "in": "query",
            "name": "ConfigTypeId",
            "type": "string"
          },
          {
            "in": "query",
            "name": "Owner",
            "type": "string"
          },
          {
            "in": "query",
            "name": "Repository",
            "type": "string"
          },
          {
            "in": "query",
            "name": "Branch",
            "type": "string"
          },
          {
            "in": "query",
            "name": "FilePath",
            "type": "string"
          },
          {
            "in": "query",
            "name": "OverrideNewPropertiesWarning",
            "type": "boolean"
          },
          {
            "in": "query",
            "name": "OverrideDifferentSourceWarning",
            "type": "boolean"
          },
          {
            "in": "query",
            "name": "OverrideOverwriteWarning",
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/StringApiResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "BulkCreateDto": {
      "type": "object",
      "properties": {
        "nodes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/NodeCreateDto"
          }
        },
        "relations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Relation"
          }
        },
        "mixins": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MixinCreateDto"
          }
        }
      }
    },
    "BulkCreateResult": {
      "type": "object",
      "properties": {
        "nodesResult": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/NodeCreateResult"
          }
        },
        "relationsResult": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RelationCreateResult"
          }
        }
      }
    },
    "BulkCreateResultApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": {
          "$ref": "#/definitions/BulkCreateResult"
        }
      }
    },
    "CheckResult": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "level": {
          "$ref": "#/definitions/NotificationLevel"
        }
      }
    },
    "CMImportKind": {
      "format": "int32",
      "enum": [
        1,
        3,
        4,
        5,
        6,
        7
      ],
      "type": "integer",
      "x-enumNames": [
        "None",
        "Relation",
        "Mixin",
        "NewRelation",
        "NewMixin",
        "Space"
      ]
    },
    "ErrorDetail": {
      "type": "object",
      "properties": {
        "isFatal": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "JsonLdPropertyTypes": {
      "format": "int32",
      "enum": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8
      ],
      "type": "integer",
      "x-enumNames": [
        "Null",
        "Boolean",
        "String",
        "Object",
        "ObjectArray",
        "StringArray",
        "Number",
        "NumberArray"
      ]
    },
    "Mixin": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "columns": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MixinColumn"
          }
        }
      }
    },
    "MixinColumn": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      }
    },
    "MixinColumnData": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "MixinCreateDto": {
      "type": "object",
      "properties": {
        "targetNodeId": {
          "type": "string"
        },
        "mixinId": {
          "type": "string"
        },
        "mixinColumns": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MixinColumn"
          }
        }
      }
    },
    "MixinData": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "columns": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MixinColumnData"
          }
        }
      }
    },
    "MixinListApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Mixin"
          }
        }
      }
    },
    "MixinRemoveDto": {
      "type": "object",
      "properties": {
        "targetNodeId": {
          "type": "string"
        },
        "mixinId": {
          "type": "string"
        },
        "mixinColumnsIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Node": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "nodeType": {
          "type": "string"
        },
        "spaceIds": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "relations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Relation"
          }
        },
        "mixins": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MixinData"
          }
        }
      }
    },
    "NodeApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": {
          "$ref": "#/definitions/Node"
        }
      }
    },
    "NodeCreateDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "nodeType": {
          "type": "string"
        },
        "checkBeforeCreate": {
          "type": "boolean"
        },
        "spaceIds": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "NodeCreateResult": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "checkResult": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CheckResult"
          }
        }
      }
    },
    "NodeCreateResultApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": {
          "$ref": "#/definitions/NodeCreateResult"
        }
      }
    },
    "NodeResult": {
      "type": "object",
      "properties": {
        "nodes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Node"
          }
        },
        "pagingToken": {
          "type": "string"
        },
        "lastPage": {
          "type": "boolean",
          "readOnly": true
        }
      }
    },
    "NodeResultApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": {
          "$ref": "#/definitions/NodeResult"
        }
      }
    },
    "NodeUpdateDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "spaceIds": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "NotificationLevel": {
      "format": "int32",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5
      ],
      "type": "integer",
      "x-enumNames": [
        "Verbose",
        "Debug",
        "Information",
        "Warning",
        "Error",
        "Fatal"
      ]
    },
    "ObjectApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": { }
      }
    },
    "Relation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "fromNodeId": {
          "type": "string"
        },
        "toNodeId": {
          "type": "string"
        },
        "relationGroupId": {
          "type": "string"
        },
        "value": { }
      }
    },
    "RelationCreateResult": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        }
      }
    },
    "RelationCreateResultApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": {
          "$ref": "#/definitions/RelationCreateResult"
        }
      }
    },
    "RelationInfo": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        },
        "relationGroupId": {
          "type": "string"
        },
        "from": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "to": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "secondLevelFrom": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "secondLevelTo": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "RelationInfoIEnumerableApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RelationInfo"
          }
        }
      }
    },
    "StringApiResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "error": {
          "$ref": "#/definitions/ErrorDetail"
        },
        "data": {
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "Bearer": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header",
      "description": "JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below."
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ]
}