Skip to main content
GET
/
training
/
directories
/
tree
Get directory tree
curl --request GET \
  --url https://api.open.cx/training/directories/tree
{
  "directories": [
    {
      "id": "<string>",
      "name": "<string>",
      "org_id": "<string>",
      "items": [
        {
          "id": "<string>",
          "organization_id": "<string>",
          "question": "<string>",
          "answer": "<string>",
          "is_draft": true,
          "accepted_by": 123,
          "learned_from_session_id": "<string>",
          "type": "BEHAVIORAL",
          "restricted_to_segments": [
            "<string>"
          ],
          "restricted_to_channels": [
            "web"
          ],
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "directory_id": "<string>",
          "draft_payload": "<unknown>"
        }
      ]
    }
  ],
  "uncategorized": [
    {
      "id": "<string>",
      "organization_id": "<string>",
      "question": "<string>",
      "answer": "<string>",
      "is_draft": true,
      "accepted_by": 123,
      "learned_from_session_id": "<string>",
      "type": "BEHAVIORAL",
      "restricted_to_segments": [
        "<string>"
      ],
      "restricted_to_channels": [
        "web"
      ],
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "directory_id": "<string>",
      "draft_payload": "<unknown>"
    }
  ]
}

Query Parameters

show_drafts
enum<string>

Include draft trainings (default: true)

Available options:
true,
false
show_published
enum<string>

Include published trainings (default: true)

Available options:
true,
false

Response

Default Response

directories
object[]
required
uncategorized
object[]
required