curl --request GET \
--url https://api.open.cx/training/directories/tree \
--header 'Authorization: Bearer <token>'{
"directories": [
{
"id": "<string>",
"name": "<string>",
"org_id": "<string>",
"items": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>",
"draft_title": "<string>",
"draft_content": "<string>",
"type": "BEHAVIORAL",
"is_draft": true,
"directory_id": "<string>",
"restricted_to_channels": [
"web"
],
"restricted_to_segments": [
"<string>"
],
"current_version": 123,
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"uncategorized": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>",
"draft_title": "<string>",
"draft_content": "<string>",
"type": "BEHAVIORAL",
"is_draft": true,
"directory_id": "<string>",
"restricted_to_channels": [
"web"
],
"restricted_to_segments": [
"<string>"
],
"current_version": 123,
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Get all directories with their trainings, plus uncategorized trainings. Useful for getting a full overview of how trainings are organized.
curl --request GET \
--url https://api.open.cx/training/directories/tree \
--header 'Authorization: Bearer <token>'{
"directories": [
{
"id": "<string>",
"name": "<string>",
"org_id": "<string>",
"items": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>",
"draft_title": "<string>",
"draft_content": "<string>",
"type": "BEHAVIORAL",
"is_draft": true,
"directory_id": "<string>",
"restricted_to_channels": [
"web"
],
"restricted_to_segments": [
"<string>"
],
"current_version": 123,
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"uncategorized": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>",
"draft_title": "<string>",
"draft_content": "<string>",
"type": "BEHAVIORAL",
"is_draft": true,
"directory_id": "<string>",
"restricted_to_channels": [
"web"
],
"restricted_to_segments": [
"<string>"
],
"current_version": 123,
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Include draft trainings (default: true)
true, false Include published trainings (default: true)
true, false Was this page helpful?