POST
/
api
/
v1
/
tasks
/
query
Query
curl --request POST \
  --url https://api.onfragment.com/api/v1/tasks/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "selects": [
    "<string>"
  ],
  "metrics": {},
  "condition": {
    "combinator": "and",
    "conditions": [
      {}
    ],
    "field": "<string>",
    "operator": "==",
    "negated": false,
    "value": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "target": "<string>",
    "disabled": false
  },
  "groups": [
    "<string>"
  ],
  "sorts": [
    {
      "field": "<string>",
      "condition": {
        "combinator": "and",
        "conditions": [
          {}
        ],
        "field": "<string>",
        "operator": "==",
        "negated": true,
        "value": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "target": "<string>",
        "disabled": true
      },
      "direction": "ascending"
    }
  ],
  "limit": 123,
  "variables": [
    {
      "field": "<string>",
      "value": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "functions": [
    {
      "field": "<string>",
      "function": "<string>",
      "params": {}
    }
  ],
  "queries": [
    {}
  ],
  "aliases": {},
  "engine": "orm",
  "model": "<string>",
  "joins": [
    [
      "<any>"
    ]
  ],
  "expand": [
    "<string>"
  ]
}'
{
  "items": [
    {
      "uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "archived": true,
      "status": "TODO",
      "legacy_data": {},
      "skills": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "queue_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "assignee_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "participants": {},
      "case_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "parent_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "due_at": "2023-11-07T05:31:56Z",
      "snooze_expires_at": "2023-11-07T05:31:56Z",
      "fields": {},
      "metadata_form_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "form_data": {},
      "form_type": "<string>",
      "assigned_at": "2023-11-07T05:31:56Z",
      "started_at": "2023-11-07T05:31:56Z",
      "done_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "assignee_updated_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "queue_updated_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "is_assigned_player": true,
      "internal_created_at": "2023-11-07T05:31:56Z",
      "internal_updated_at": "2023-11-07T05:31:56Z",
      "external_created_at": "2023-11-07T05:31:56Z",
      "external_updated_at": "2023-11-07T05:31:56Z",
      "external_status": "TODO",
      "external_status_updated_at": "2023-11-07T05:31:56Z",
      "external_assignee_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "queue_time": 123,
      "queue_time_business": 123,
      "work_time": 123,
      "work_time_business": 123,
      "incremental_work_time": 123,
      "incremental_work_time_business": 123,
      "resolution_time": 123,
      "resolution_time_business": 123,
      "num_children": 123,
      "num_children_done": 123,
      "sla_breach_at": "2023-11-07T05:31:56Z",
      "sla_breach_business_at": "2023-11-07T05:31:56Z",
      "wait_time": 123,
      "wait_time_business": 123,
      "task_type": "<string>",
      "played_at": "2023-11-07T05:31:56Z",
      "parent": {},
      "children": [
        {}
      ],
      "comments": [
        {
          "uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "archived": true,
          "task_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "author_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "text": "<string>",
          "blocks": [
            {
              "id": "<string>",
              "type": "<string>",
              "props": {},
              "content": [
                {
                  "type": "<string>",
                  "text": "<string>",
                  "href": "<string>",
                  "content": [
                    {}
                  ],
                  "styles": {},
                  "props": {}
                }
              ],
              "children": [
                {}
              ]
            }
          ],
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ],
  "meta": {
    "limit": 123,
    "self_cursor": "<string>",
    "prev_cursor": "<string>",
    "next_cursor": "<string>",
    "total_count": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

fragment-user-agent
string | null
fragment-account
string | null
fragment-versioning
string | null
fragment-user
string<uuid> | null

Query Parameters

archived
boolean | null
default:false

Body

application/json

Query schema.

selects
string[] | null
metrics
object | null
condition
object | null

Tree-like condition schema

groups
string[] | null
sorts
Sort · object[] | null
limit
integer | null
variables
Variable · object[] | null
functions
Function · object[] | null
queries
Query · object[] | null
aliases
object | null
engine
string
default:orm
model
string | null
joins
any[][] | null
expand
string[] | null

Response

Successful Response

items
Task · object[]
required
meta
object

Page metadata.