projqoDevelopers

Reference

Labels

Labels: the ones in use, and adding and removing them on a task.

List labels

GET/orgs/{org}/labels

Scope: tasks:read

The labels in use on tasks you can open, in alphabetical order, each with how many of those tasks carry it. q narrows them to labels containing the text.

Path parameters

  • orgstringRequired

    The organisation's id (or its address name).

    1 to 100 characters

    The id comes from List organisations.

Query parameters

  • limitinteger

    How many items a page holds, 1 to 200.

    from 1 to 200; default 50

  • cursorstring

    The next_cursor of the previous page; leave it out for the first page.

    at most 1000 characters

  • qstring

    Only labels containing this text.

    at most 255 characters

Answer

200 OK

Headers: X-Request-Id, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset

Show the answer's fields
  • itemsarray of LabelRequired
    Show 2 fields
    • namestringRequired
    • tasksintegerRequired

      Tasks you can open that carry it.

  • next_cursorstring or nullRequired

    Pass as cursor to read the next page; null on the last page.

  • totalinteger

    The number of items in the whole list, with count=true.

Errors

  • 400 invalid invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
    400 answer
    {
      "error": {
        "code": "invalid",
        "message": "A value is wrong or missing, or a parameter is unknown. Every problem is in details.",
        "status": 400,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 401 invalid_token invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
    401 answer
    {
      "error": {
        "code": "invalid_token",
        "message": "No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).",
        "status": 401,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 403 insufficient_scope insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation.
    403 answer
    {
      "error": {
        "code": "insufficient_scope",
        "message": "The token doesn't have the scope this call needs (named in WWW-Authenticate).",
        "status": 403,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 404 not_found not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
    404 answer
    {
      "error": {
        "code": "not_found",
        "message": "Nothing is at this address, or the token's person can't see it: the answer is the same.",
        "status": 404,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 429 rate_limited rate_limited: Too many calls in this minute, for the token or for the whole organisation.
    429 answer
    {
      "error": {
        "code": "rate_limited",
        "message": "Too many calls in this minute, for the token or for the whole organisation.",
        "status": 429,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 500 internal internal: Something went wrong on projqo's side (never your mistake).
    500 answer
    {
      "error": {
        "code": "internal",
        "message": "Something went wrong on projqo's side (never your mistake).",
        "status": 500,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }

Request

cURL
curl -X GET "https://projqo.example/api/v1/orgs/{org}/labels" \
  -H "Authorization: Bearer $PROJQO_TOKEN"

Sample answer 200

200 OK
{
  "items": [
    {
      "name": "pricing",
      "tasks": 4
    }
  ],
  "next_cursor": null
}

Get a task's labels

GET/orgs/{org}/tasks/{task}/labels

Scope: tasks:read

The labels on the task.

Path parameters

  • orgstringRequired

    The organisation's id (or its address name).

    1 to 100 characters

    The id comes from List organisations.

  • taskstringRequired

    The task's id or key (WEB-12).

    1 to 60 characters

    The id comes from List tasks.

Answer

200 OK

Headers: X-Request-Id, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset

Show the answer's fields
  • labelsarray of stringRequired

Errors

  • 400 invalid invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
    400 answer
    {
      "error": {
        "code": "invalid",
        "message": "A value is wrong or missing, or a parameter is unknown. Every problem is in details.",
        "status": 400,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 401 invalid_token invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
    401 answer
    {
      "error": {
        "code": "invalid_token",
        "message": "No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).",
        "status": 401,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 403 insufficient_scope insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation.
    403 answer
    {
      "error": {
        "code": "insufficient_scope",
        "message": "The token doesn't have the scope this call needs (named in WWW-Authenticate).",
        "status": 403,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 404 not_found not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
    404 answer
    {
      "error": {
        "code": "not_found",
        "message": "Nothing is at this address, or the token's person can't see it: the answer is the same.",
        "status": 404,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 429 rate_limited rate_limited: Too many calls in this minute, for the token or for the whole organisation.
    429 answer
    {
      "error": {
        "code": "rate_limited",
        "message": "Too many calls in this minute, for the token or for the whole organisation.",
        "status": 429,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 500 internal internal: Something went wrong on projqo's side (never your mistake).
    500 answer
    {
      "error": {
        "code": "internal",
        "message": "Something went wrong on projqo's side (never your mistake).",
        "status": 500,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }

Request

cURL
curl -X GET "https://projqo.example/api/v1/orgs/{org}/tasks/{task}/labels" \
  -H "Authorization: Bearer $PROJQO_TOKEN"

Sample answer 200

200 OK
{
  "labels": [
    "pricing",
    "q1"
  ]
}

Add and remove a task's labels

PATCH/orgs/{org}/tasks/{task}/labels

Scope: tasks:write

Adds and removes labels without reading them first, as editing the Labels field in the app: needs Edit tasks, the Labels field on the task's type, and the task not archived. Written in History; watchers are told.

Path parameters

  • orgstringRequired

    The organisation's id (or its address name).

    1 to 100 characters

    The id comes from List organisations.

  • taskstringRequired

    The task's id or key (WEB-12).

    1 to 60 characters

    The id comes from List tasks.

Body

  • addarray of string

    Labels to add.

    at most 100 items

  • removearray of string

    Labels to remove.

    at most 100 items

Answer

200 OK

Headers: X-Request-Id, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset

Show the answer's fields
  • labelsarray of stringRequired

Errors

  • 400 invalid invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
    400 answer
    {
      "error": {
        "code": "invalid",
        "message": "A value is wrong or missing, or a parameter is unknown. Every problem is in details.",
        "status": 400,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 401 invalid_token invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
    401 answer
    {
      "error": {
        "code": "invalid_token",
        "message": "No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).",
        "status": 401,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 403 insufficient_scope insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation. refused: The token's person can see the thing but may not do this; the message says why. read_only: The organisation is read-only (over the Free plan's people, or a payment is overdue).
    403 answer
    {
      "error": {
        "code": "insufficient_scope",
        "message": "The token doesn't have the scope this call needs (named in WWW-Authenticate).",
        "status": 403,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 404 not_found not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
    404 answer
    {
      "error": {
        "code": "not_found",
        "message": "Nothing is at this address, or the token's person can't see it: the answer is the same.",
        "status": 404,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 409 archived archived: The item (or its project) is archived, so it can't be changed.
    409 answer
    {
      "error": {
        "code": "archived",
        "message": "The item (or its project) is archived, so it can't be changed.",
        "status": 409,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 413 too_large too_large: The body or a file is larger than allowed.
    413 answer
    {
      "error": {
        "code": "too_large",
        "message": "The body or a file is larger than allowed.",
        "status": 413,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 415 unsupported_media_type unsupported_media_type: The body isn't JSON.
    415 answer
    {
      "error": {
        "code": "unsupported_media_type",
        "message": "The body isn't JSON.",
        "status": 415,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 429 rate_limited rate_limited: Too many calls in this minute, for the token or for the whole organisation.
    429 answer
    {
      "error": {
        "code": "rate_limited",
        "message": "Too many calls in this minute, for the token or for the whole organisation.",
        "status": 429,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }
  • 500 internal internal: Something went wrong on projqo's side (never your mistake).
    500 answer
    {
      "error": {
        "code": "internal",
        "message": "Something went wrong on projqo's side (never your mistake).",
        "status": 500,
        "request_id": "5b0c4d2e-8f1a-4c3b-9d7e-6a5f4e3d2c1b"
      }
    }

Request

cURL
curl -X PATCH "https://projqo.example/api/v1/orgs/{org}/tasks/{task}/labels" \
  -H "Authorization: Bearer $PROJQO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "add": [
    "string"
  ],
  "remove": [
    "string"
  ]
}'

Sample answer 200

200 OK
{
  "labels": [
    "pricing",
    "q1"
  ]
}