Import an artifact catalog
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/artifacts/import-catalog/"
payload = {
"artifacts": [
{
"slug": "<string>",
"versions": [
{
"version_number": 2,
"short_name": "<string>",
"change_summary": "<string>",
"payload": "<unknown>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"title": "<string>",
"display_order": 123,
"group": "<string>",
"out_scoped_at": "2023-11-07T05:31:56Z",
"definition_short": "<string>",
"definition_long": "<string>"
}
],
"artifact_snapshots": [
{
"snapshot_type": "in_scope_latest",
"cohesion_guide_text": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
artifacts: [
{
slug: '<string>',
versions: [
{
version_number: 2,
short_name: '<string>',
change_summary: '<string>',
payload: '<unknown>',
created_at: '2023-11-07T05:31:56Z'
}
],
title: '<string>',
display_order: 123,
group: '<string>',
out_scoped_at: '2023-11-07T05:31:56Z',
definition_short: '<string>',
definition_long: '<string>'
}
],
artifact_snapshots: [
{
snapshot_type: 'in_scope_latest',
cohesion_guide_text: '<string>',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/artifacts/import-catalog/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/artifacts/import-catalog/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifacts": [
{
"slug": "<string>",
"versions": [
{
"version_number": 2,
"short_name": "<string>",
"change_summary": "<string>",
"payload": "<unknown>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"title": "<string>",
"display_order": 123,
"group": "<string>",
"out_scoped_at": "2023-11-07T05:31:56Z",
"definition_short": "<string>",
"definition_long": "<string>"
}
],
"artifact_snapshots": [
{
"snapshot_type": "in_scope_latest",
"cohesion_guide_text": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
'{
"artifact_count": 123,
"version_count": 123,
"artifact_snapshot_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"artifact_snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Artifacts
Import an artifact catalog
Import a full catalog (same shape as the export) into a project whose
catalog is still empty — the import is rejected if the project already
has catalog rows. Only in_scope_latest snapshots are supported.
Requires admin permission.
POST
/
projects
/
{project_id}
/
artifacts
/
import-catalog
/
Import an artifact catalog
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/artifacts/import-catalog/"
payload = {
"artifacts": [
{
"slug": "<string>",
"versions": [
{
"version_number": 2,
"short_name": "<string>",
"change_summary": "<string>",
"payload": "<unknown>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"title": "<string>",
"display_order": 123,
"group": "<string>",
"out_scoped_at": "2023-11-07T05:31:56Z",
"definition_short": "<string>",
"definition_long": "<string>"
}
],
"artifact_snapshots": [
{
"snapshot_type": "in_scope_latest",
"cohesion_guide_text": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
artifacts: [
{
slug: '<string>',
versions: [
{
version_number: 2,
short_name: '<string>',
change_summary: '<string>',
payload: '<unknown>',
created_at: '2023-11-07T05:31:56Z'
}
],
title: '<string>',
display_order: 123,
group: '<string>',
out_scoped_at: '2023-11-07T05:31:56Z',
definition_short: '<string>',
definition_long: '<string>'
}
],
artifact_snapshots: [
{
snapshot_type: 'in_scope_latest',
cohesion_guide_text: '<string>',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/artifacts/import-catalog/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/artifacts/import-catalog/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifacts": [
{
"slug": "<string>",
"versions": [
{
"version_number": 2,
"short_name": "<string>",
"change_summary": "<string>",
"payload": "<unknown>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"title": "<string>",
"display_order": 123,
"group": "<string>",
"out_scoped_at": "2023-11-07T05:31:56Z",
"definition_short": "<string>",
"definition_long": "<string>"
}
],
"artifact_snapshots": [
{
"snapshot_type": "in_scope_latest",
"cohesion_guide_text": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
'{
"artifact_count": 123,
"version_count": 123,
"artifact_snapshot_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"artifact_snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer
Path Parameters
UUID of the project
Body
application/json
⌘I