> For the complete documentation index, see [llms.txt](https://learn.coremodels.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.coremodels.io/user-guides/integration-apis.md).

# Integration APIs

### API Key Generation

From the top right corner, tap your profile picture, then click on 'User Settings'

<figure><img src="/files/EDaigUpIv7ng3eACBISt" alt=""><figcaption></figcaption></figure>

Th User Settings modal will show up, click on 'API Management', then click on the Generate button, to generate a new Key.

Copy and store the Key as it will not be displayed again.

Notes:

* As of v3.1 users can only have one active API Key, and if you need to re-generate a new key, it will revoke the old one.
* API Key life time is 3 months after that it'll be automatically revoked.
* All operations will be logged in change log using the user account the API key belongs to.
* The API Key has the same owner user permissions.

### Integration APIs

To view the available APIs, open the channels in the features tray, and click on 'RESTful' to open the tab.

<figure><img src="/files/5e28mCud0lj7wm8muQe3" alt=""><figcaption><p>Accessing the RESTful Tab</p></figcaption></figure>

The Swagger interface shows up, you view the available APIs and the DTO models used, you can also try the APIs.

To test the APIs, first click on the 'Authorize' green button, then enter 'Bearer' \[space] and then your token.

### Guide

CoreModels is a dynamic graph based solution where users can create their own spaces, mixins, and relation groups, and most APIs are referencing those by their Ids.

(Both the required DTOs when creating nodes or relations, and the API results when requesting to fetch nodes are referring to the spaces, mixins, and relation groups by their Id)

Therefor the first step for developers is to call and store this information first, as those Ids will be used in most other APIs:

1. `relationsGroupsInfo` will return the relation groups.
2. `mixinsInfo` will return the mixins.
3. `fetchNodes` with `"nodeType":"Space"`  will return the spaces.

#### Fetching The model

Developers can either use the `fetchNode` API to return a single node by its Id, or the general `fetchNodes` API to search for nodes based on a criteria.

Both APIs offer two parameters `addRelations`  and `addMixins` that will include more information about the node.

`fetchNodes` can be used to:

* Return nodes of a specific kind (types, elements, or taxonomies etc...) with token based pagination.
* Return nodes based on an expression that will filter the nodes based on the label.
* Return nodes by their Ids.

#### Modifying the model

To modify the nodes: use the `node`  endpoints:

* Post is for creating new nodes.
* Put is to update a node (by its Id)
* Delete is for removal

To modify relations: use the `relation` endpoints:

* Post is for creating new relations
* Delete is for removal

To modify mixins values for a specific node use the `mixins` (POST) endpoint.

Please refere to the complete [Reference ](/user-guides/integration-apis/reference.md)for more details on each API.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.coremodels.io/user-guides/integration-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
