Reference

This is the complete API reference for CoreModels Integration APIs Version 1.

1. Fetch Operations

1.1 Fetch Node

Fetch a single node’s info using its ID

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Query parameters
NodeIdstringOptional
AddRelationsbooleanOptional
AddMixinsbooleanOptional
Responses
200

Success

get
/v1/{projectId}/fetchNode
GET /v1/{projectId}/fetchNode HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": {
    "id": "text",
    "label": "text",
    "nodeType": "text",
    "spaceIds": [
      "text"
    ],
    "relations": [
      {
        "id": "text",
        "fromNodeId": "text",
        "toNodeId": "text",
        "relationGroupId": "text",
        "value": null
      }
    ],
    "mixins": [
      {
        "id": "text",
        "label": "text",
        "type": "text",
        "columns": [
          {
            "id": "text",
            "label": "text",
            "value": "text"
          }
        ]
      }
    ]
  }
}
  • Path parameters

    • projectId:

      • CoreModels projectId can be copied from the settings page

      • or it can be inferred from the URL:

  • Query parameters

    • NodeId: determines the node Id you want to get information about (required parameter).

    • AddRelations: will include node relations in the result (optional parameter, by default is false).

    • AddMixins: will include node mixins ( for existing values only ) in the result (optional parameter, by default is false).

  • Response

    • success: determine if operation succeeded or not.

    • error: if any error occurred you'll get an error object, with

      • isFata: to determine if this is a fatal error in the system, or it's a logical error.

      • message: if error is fatal: you'll get error message to contact the admin with specific error code for further tracking, else if the error is not fatal, then the error message will determine what is the logical error in the request.

    • data: contains info about the fetched node.

      • Id: node Id in CoreModels.

      • label: node label in CoreModels.

      • NodeType: can be one of: Element, Type, Taxonomy, Exemplar, Component, Space, Tag, Mixin (case sensitive value).

      • spaceIds: in which space(s) this node is located.

      • relations: list all node relations, will be empty if AddRelations is false in the request, or node has no relations.

      • mixins: list all node mixins, will be empty is AddMixins is false in the request, or node has no mixins.

1.2 Fetch Nodes

Paginated fetch and search operation for any node in CoreModels.

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Query parameters
NodeTypestringOptional
NodeIdsstring[]Optional
ExpressionstringOptional
SpaceIdsstring[]Optional
AddRelationsbooleanOptional
AddMixinsbooleanOptional
SortAttrstringOptional
SortDescbooleanOptional
PageSizeinteger · int32Optional
PagingTokenstringOptional
IncludeRelationsFromAllSpacesbooleanOptional
Responses
200

Success

get
/v1/{projectId}/fetchNodes
GET /v1/{projectId}/fetchNodes HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": {
    "nodes": [
      {
        "id": "text",
        "label": "text",
        "nodeType": "text",
        "spaceIds": [
          "text"
        ],
        "relations": [
          {
            "id": "text",
            "fromNodeId": "text",
            "toNodeId": "text",
            "relationGroupId": "text",
            "value": null
          }
        ],
        "mixins": [
          {
            "id": "text",
            "label": "text",
            "type": "text",
            "columns": [
              {
                "id": "text",
                "label": "text",
                "value": "text"
              }
            ]
          }
        ]
      }
    ],
    "pagingToken": "text",
    "lastPage": true
  }
}
  • Path parameters:

  • Query parameters:

    • NodeType: see 1.1 Fetch Node.

    • NodeIds: node Ids you want to search for.

    • Expression: search by part of the node name.

    Note: you've to provide at least one of NodeType, NodeIds, and Expression, but also you can use any combination of them to perform more complex filter for your search.

    • SpaceIds: in which space(s) you want to search, if empty it means the main space.

    • AddRelations: add node relations to the result see1.1 Fetch Node.

    • AddMixins: add node mixins to the result see 1.1 Fetch Node.

    • SortAttr: Label, CreationTime, or UpdateTime (sort the results base on the selected criteria).

    • sortDesc: true for sort results descending (default false if not provided).

    • pageSize: the page size of the fetch paginated search operation: must be in range (1,250) default 50 if not provided.

    • pagingToken: the pagination token. see the response parameters section below.

    • indeludeRelationsFromAllSpaces: default to false, if send true: the relations of all spaces will be returned with node result.

  • Response:

    • success: see 1.1 Fetch Node

    • error: see 1.1 Fetch Node

    • data

      • nodes: the result nodes.

      • lastPage: true if this is the last page of the result.

      • pagingToken: if lastPage is false, then use the pagingToken value when you send the next request to get the next page. so you'll send the same request again with same parameters but set pagingToken to the new value to get the next page. known limitation: we don't return page count of the fetch result.

2. Nodes Operations

2.1 Create Node

Creates Type, Element, Taxonomy, Exemplar, Component (view), Space, Tag, or Mixin in CoreModels.

post
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Body
idstringOptional
labelstringOptional
nodeTypestringOptional
checkBeforeCreatebooleanOptional
spaceIdsstring[]Optional
Responses
200

Success

post
/v1/{projectId}/node
POST /v1/{projectId}/node HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 91

{
  "id": "text",
  "label": "text",
  "nodeType": "text",
  "checkBeforeCreate": true,
  "spaceIds": [
    "text"
  ]
}
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": {
    "id": "text",
    "checkResult": [
      {
        "id": "text",
        "content": "text",
        "level": 0
      }
    ]
  }
}
  • path parameters:

  • Request Body:

    • Id: NodeId you want to create, if left empty it'll be generated for you, and returned in the result. We prefer GUID shaped values if you want to provide it.

    • label: node label.

    • nodeType: for accepted node types see 1.1 Fetch Node

    • checkBeforeCreate: if true, we'll check for the label if used by any other node, and return the check result in checkResult object of the result. Note: even if the node label already exists the new node will be created.

    • spaceIds: the space(s) where you want to locate the newly created node, if left empty it'll be created in the main spaec.

  • Response:

    • Id: the created node Id.

    • checkResult: if checkBeforeCreate set to true in the request, this will hold list of checkResult objects.

      • checkResult content: result of check as string.

      • level: warning always.

2.2 Update Node

Update a node’s label and space (optionally) using its ID.

put
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Body
idstringOptional
labelstringOptional
spaceIdsstring[]Optional
Responses
200

Success

put
/v1/{projectId}/node
PUT /v1/{projectId}/node HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 48

{
  "id": "text",
  "label": "text",
  "spaceIds": [
    "text"
  ]
}
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": null
}
  • Path parameters:

  • Request body

    • Id: Id of node you want to edit.

    • label: new label value.

    • spaceIds: (optional) set the new spaces for the node, if left empty: the spaces will be kept as is.

  • Resposnse

2.3 Remove Node

Remove a node using its ID.

delete
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
idstringRequired
Responses
200

Success

delete
/v1/{projectId}/node/{id}
DELETE /v1/{projectId}/node/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": null
}

3. Relations

3.1 Relation Groups info

In CoreModels there are default relation groups, and user also can add custom relation groups. In order to create any relation between two nodes in CoreModels you need the relation Group Id to determine the type of this relation. We suggest you to retrieve the Relation Groups info using this API, store their info for later usage with relation operations.

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Responses
200

Success

get
/v1/{projectId}/relationGroupsInfo
GET /v1/{projectId}/relationGroupsInfo HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": [
    {
      "label": "text",
      "relationGroupId": "text",
      "from": [
        "text"
      ],
      "to": [
        "text"
      ],
      "secondLevelFrom": [
        "text"
      ],
      "secondLevelTo": [
        "text"
      ]
    }
  ]
}
  • Path parameters

  • Reposnse

    • success: see 1.1 Fetch Node

    • error: see 1.1 Fetch Node

    • data: array of relation info, each object consists of

      • label: relation group name (label).

      • relationGroupId: the Id of the relation Group, this is important because we work with Ids when we want to create any relation.

      • from: the accepted types for the From node part of the relation. ( can by one or more of NodeTypes).

      • to: the accepted types for the To part of the relation. (can be one or more of NodeTypes).

      • secondLevelFrom & secondLevelTo: not used for now.

3.2 Create Relation

to create a new relations between two nodes in CoreModels, please provide: from node Id, to node Id, and relation Group Id (explained in the previous section).

post
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Body
idstringOptional
fromNodeIdstringOptional
toNodeIdstringOptional
relationGroupIdstringOptional
valueanyOptional
Responses
200

Success

post
/v1/{projectId}/relation
POST /v1/{projectId}/relation HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 89

{
  "id": "text",
  "fromNodeId": "text",
  "toNodeId": "text",
  "relationGroupId": "text",
  "value": null
}
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": {
    "id": "text"
  }
}
  • Path parameters

  • Request body

    • Id: required Id of the newly create relation we suggest to use GUID shaped values for all Ids, if this value not provided we'll create the new Id and return it in the result.

    • fromNodeId: node Id where relations starts.

    • toNodeId: node Id where relation ends.

    • relationGroupId: the Id of relation group (which determine the type of the relation).

    • value: not used for now.

  • Resposen

Note: there will be a validation step before creating the required relation, if both (from, to) nodes fulfill the relation group, the relation will be created else an error is returned with the appropriate message.

3.3 Remove Relation

Remove a relation using its info.

delete
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Body
idstringOptional
fromNodeIdstringOptional
toNodeIdstringOptional
relationGroupIdstringOptional
valueanyOptional
Responses
200

Success

delete
/v1/{projectId}/relation
DELETE /v1/{projectId}/relation HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 89

{
  "id": "text",
  "fromNodeId": "text",
  "toNodeId": "text",
  "relationGroupId": "text",
  "value": null
}
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": null
}

4. Mixins

4.1 Get Mixins Info

In CoreModels there are default Mixins, and user also can add custom mixins. In order to add/update/remove a mixin for any node in CoreModels you need the Mixin Id, and It's columns Ids. We suggest you to retrieve the Mixins info using this API, store their info for later usage with mixins operations.

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Responses
200

Success

get
/v1/{projectId}/mixinsInfo
GET /v1/{projectId}/mixinsInfo HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": [
    {
      "id": "text",
      "label": "text",
      "type": "text",
      "columns": [
        {
          "id": "text",
          "label": "text"
        }
      ]
    }
  ]
}
  • Path parameters

  • Response

    • success: see 1.1 Fetch Node

    • error: see 1.1 Fetch Node

    • data: list of mixin, each mixin consists of

      • Id: the mixin Id.

      • label: mixin name (label)

      • type: mixin type: multi level mixin, attribute mixin, or normal mixin.

      • columns: list of mixin column; to represents the columns in this mixin, each column has this properties:

        • Id: column Id.

        • Label: column name (label).

4.2 Create Mixin

This sets the mixin value for a specific node.

You need to determine the Mixin Id, and then what are the columns you need to set values (using column Id, and the needed new value for the column).

post
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Body
targetNodeIdstringOptional
mixinIdstringOptional
Responses
200

Success

post
/v1/{projectId}/mixinValue
POST /v1/{projectId}/mixinValue HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 86

{
  "targetNodeId": "text",
  "mixinId": "text",
  "mixinColumns": [
    {
      "id": "text",
      "label": "text"
    }
  ]
}
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": null
}
  • Path parameters

  • Request body

    • target Node Id: for what node you want to set the mixin value.

    • mixinId: which mixin you want to change.

    • mixinColumns: determine the columns, and therir new values. by using the columnId, and set the new value in each mixin column.

  • Resposen

4.3 Remove Mixin

Delete Mixin value for specific node.

delete
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Body
targetNodeIdstringOptional
mixinIdstringOptional
mixinColumnsIdsstring[]Optional
Responses
200

Success

delete
/v1/{projectId}/mixinValue
DELETE /v1/{projectId}/mixinValue HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 67

{
  "targetNodeId": "text",
  "mixinId": "text",
  "mixinColumnsIds": [
    "text"
  ]
}
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": null
}
  • Path parameters:

  • Request body

    • targetNodeId: for what node you want to remove the mixin value(s).

    • mixinId: which mixin you want to remove.

    • mixinColumnIds: which column(s) to remove their value(s).

5. Bulk Operations

5.1 Bulk Create

You can create nodes, relations, and mixins in one shot using this API.

post
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Body
Responses
200

Success

post
/v1/{projectId}/bulkCreate
POST /v1/{projectId}/bulkCreate HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 305

{
  "nodes": [
    {
      "id": "text",
      "label": "text",
      "nodeType": "text",
      "checkBeforeCreate": true,
      "spaceIds": [
        "text"
      ]
    }
  ],
  "relations": [
    {
      "id": "text",
      "fromNodeId": "text",
      "toNodeId": "text",
      "relationGroupId": "text",
      "value": null
    }
  ],
  "mixins": [
    {
      "targetNodeId": "text",
      "mixinId": "text",
      "mixinColumns": [
        {
          "id": "text",
          "label": "text"
        }
      ]
    }
  ]
}
200

Success

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": {
    "nodesResult": [
      {
        "id": "text",
        "checkResult": [
          {
            "id": "text",
            "content": "text",
            "level": 0
          }
        ]
      }
    ],
    "relationsResult": [
      {
        "id": "text"
      }
    ]
  }
}

6. Export JSON-LD

6.1 Fetch JSON-LD Import Profiles

Returns the set of profiles that can be used in the export process.

To export data from CoreModels as JSON-LD you need to use export profile. Using this API you can retrieve all import profiles you have for later use in the export operation.

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Responses
200

OK

get
/v1/{projectId}/fetchJsonLdImportProfiles
GET /v1/{projectId}/fetchJsonLdImportProfiles HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": null
}

6.2 Export JSON-LD

Export types, and/or elements, and/or taxonomies from a certain space using a specific configuration profile.

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Query parameters
spaceIdstringOptional
configTypeIdstringOptional
exportTypesbooleanOptional
exportElementsbooleanOptional
exportTaxonomiesbooleanOptional
exportDataTypesbooleanOptional
includeSpacebooleanOptional
nodeIdsstring[]Optional
graphBasedbooleanOptional
useDefaultTypebooleanOptional
Responses
200

OK

get
/v1/{projectId}/exportJsonLd
GET /v1/{projectId}/exportJsonLd HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": "text"
}
  • Path parameters

  • Query parameters

    • spaceId: determine the space Id to use in export process.

    • configTypeId: determine profile Id to use in export process, to get the full list of available profiles in a project see 6.1 Fetch JSON-LD Import Profiles

    • exportTypes: (optional), default to false, if set to true types will be exported.

    • exportElements: (optional), default to false, if set to true elements will be exported.

    • exportTaxonomies: (optional) default to false, if set to true taxonomies will be exported.

    • includeSpace: (optional) include space info in the exported result, the space will be added in a special key CoreModels_Space.

    • graphBased: (optional - default is true) controls whether the export is using the @graph array or will be exporting a single node

    • useDefaultType: (optional) controls whether the export will automatically add rdfs:Class for types and rdfs:Property for elements

  • Response

7. Merge JSON-LD

Imports new updates into a CoreModels space, this API triggers the same merge process that can be done through the user interface, you can add a URL or the github info.

  • Path parameters

  • Query parameters

    • SpaceId: The space id that will be imported into, to get the spaces in a project, refer to 1.2 Fetch Nodes, and use NodeType='Space'.

    • ConfigTypeId: the configuration profile Id that the merge process will use to map the JSON-LD file properties into to CoreModels mixins and relations, to get the full list of available profiles in a project see 6.1 Fetch JSON-LD Import Profiles

    • SourceDtos: an array of the sources, you can either add the github info or the file url.

      • Owner: The github repository owner of the source file.

      • Repository: The github repository name of the source file.

      • Branch: The github repository branch name of the source file.

      • FilePath: The target file path in the github repositry.

      • FileUrl: The target jsonld file absolute url.

    • OverrideNewPropertiesWarning (optional flag): If the github file had unmapped properties, CoreModels will return an error, this flag will skip the error. Note: this will happen if the file is not compatible with the configuration profile, we recommend creating a new import profile or manually verifying the profile.

    • OverrideDifferentSourceWarning (optional flag): CoreModels will verify that the space was originally linked to the provided information, and will return an error if the arguments referred to different source, this flag will skip this error.

    • OverrideOverwriteWarning (optional flag): CoreModels will check if any local changes in the space, and return an error (so the user wouldn't overwrite the changes) this flag will skip this error.

    • OnlyAddAndUpdate (optional flag): When using this flag, CoreModels will only add new nodes and update existing nodes (according to how they match the current schema), but it will not remove any node from the space.

  • Response

  • Example: if we are synchronizing the following file https://github.com/ModarAlNacharA/my-sample-repository/blob/main/sample-folder/JSON-LD%20sample%20file.json We would use the following github information:

    • Owner: ModarAlNacharA

    • Repository: my-sample-repository

    • Branch: main

    • FilePath: sample-folder/JSON-LD sample file.json

8. Export JSON Schema

8.1 Fetch JSON Schema Import Profiles

Returns the set of profiles that can be used in the export process.

To export data from CoreModels as JSON Schema you need to use export profile. Using this API you can retrieve all the JSON Schema import profiles you have for later use in the export operation.

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Responses
200

OK

get
/v1/{projectId}/fetchJsonSchemaImportProfiles
GET /v1/{projectId}/fetchJsonSchemaImportProfiles HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": null
}

8.2 Export JSON Schema

Export types, and/or elements, and/or taxonomies from a certain space using a specific configuration profile.

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Query parameters
configTypeIdstringOptional
spaceIdstringOptional
rootNodeIdstringOptional
useAnchorForRefbooleanOptional
Responses
200

OK

get
/v1/{projectId}/exportJsonSchema
GET /v1/{projectId}/exportJsonSchema HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": "text"
}
  • Path parameters

  • Query parameters

    • spaceId: determine the space Id to use in export process.

    • configTypeId: determine profile Id to use in export process, to get the full list of available profiles in a project see Reference

    • rootNodeId: the root node id to use for export operation, this is the node that will be used as the root of the JSON Schema.

    • useAnchorForRef: if true, the exported JSON Schema will use the $anchor if available, other wise it will always use the JSON Path when referencing JSON Schemas in the $ref - default true

  • Response

9. Merge JSON Schema

Imports new updates into a CoreModels space, this API triggers the same merge process that can be done through the user interface, you can add a url or the github info.

  • Path parameters

  • Query parameters

    • SpaceId: The space id that will be imported into, to get the spaces in a project, refer to 1.2 Fetch Nodes, and use NodeType='Space'.

    • ConfigTypeId: the configuration profile Id that the merge process will use to map the JSON-Schema file properties into to CoreModels mixins and relations, to get the full list of available profiles in a project see Reference

    • SourceDtos: an array of the sources, you can either add the github info or the file url.

      • Owner: The github repository owner of the source file.

      • Repository: The github repository name of the source file.

      • Branch: The github repository branch name of the source file.

      • FilePath: The target file path in the github repositry.

      • FileUrl: The target jsonld file absolute url.

    • OverrideNewPropertiesWarning (optional flag): If the github file had unmapped properties, CoreModels will return an error, this flag will skip the error. Note: this will happen if the file is not compatible with the configuration profile, we recommend creating a new import profile or manually verifying the profile.

    • OverrideDifferentSourceWarning (optional flag): CoreModels will verify that the space was originally linked to the provided information, and will return an error if the arguments referred to different source, this flag will skip this error.

    • OverrideOverwriteWarning (optional flag): CoreModels will check if any local changes in the space, and return an error (so the user wouldn't overwrite the changes) this flag will skip this error.

    • OnlyAddAndUpdate (optional flag): When using this flag, CoreModels will only add new nodes and update existing nodes (according to how they match the current schema), but it will not remove any node from the space.

  • Response

  • Example: if we are synchronizing the following file https://github.com/ModarAlNacharA/my-sample-repository/blob/main/sample-folder/SampleJsonSchema.json We would use the following github information:

    • Owner: ModarAlNacharA

    • Repository: my-sample-repository

    • Branch: main

    • FilePath: sample-folder/SampleJsonSchema.json

10. Validate JSON Schema

Validates a json string against a specific JSON Schema.

get
Authorizations
AuthorizationstringRequired

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below.

Path parameters
projectIdstringRequired
Query parameters
configTypeIdstringOptional
jsonStringstringOptional
spaceIdstringOptional
rootNodeIdstringOptional
Responses
200

OK

get
/v1/{projectId}/validateJSON
GET /v1/{projectId}/validateJSON HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "success": true,
  "error": {
    "isFatal": true,
    "message": "text"
  },
  "data": {
    "isValid": true,
    "jsonSchemaValidationErrors": [
      "text"
    ]
  }
}
  • Path parameters

  • Query parameters

    • configTypeId: determine profile Id to use in export process, to get the full list of available profiles in a project see Reference

    • jsonString: the json that needs to be validated against the schema.

    • spaceId: (optional) The Space where the schema exists.

    • rootNodeId: (optional) the node that represents the JSON Schema. (use either the spaceId or the rootNodeId)

  • Response

    • success: see 1.1 Fetch Node

    • error: see 1.1 Fetch Node

    • data:

      • IsValid: if the json string is valid against the schema

      • JsonSchemaValidationErrors: the validation errors

Last updated