API reference

Issues

List, open, comment on and close issues.
GET/v1/orgs/:orgId/repos/:name/issues

Lists issues in one state, newest first. Pass the returned cursor to get the next page.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • name

    Repository name.

Query parameters

  • state"open" | "closed"

    Default "open".

  • cursorstring
  • labelstring

    Up to 50 characters.

  • authorstring

    Up to 64 characters.

  • assigneestring

    Up to 64 characters.

Errors

  • 404Repository not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/repos/{name}/issues' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  issues: {
    number: number
    createdAt?: number
    updatedAt?: number
    orgId: string
    title: string
    labels?: string[]
    repoId: string
    state?: "open" | "closed"
    body?: string
    assignees?: string[]
    comments?: number
    closedAt?: number
    closedBy?: string
    closedByPull?: number
    authorId: string
    authorEmail?: string
    authorName?: string
  }[]
  cursor: null | string
}
POST/v1/orgs/:orgId/repos/:name/issues

Opens an issue. Issues and pull requests share one number sequence per repository.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • name

    Repository name.

Request body

  • titlestringrequired

    1–256 characters. Trimmed.

  • bodystring

    Default "". Up to 65,536 characters.

  • labelsstring[]

    Default []. Up to 10 items. Each 1–50 characters, trimmed.

  • assigneesstring[]

    Default []. Up to 10 items. Each 1–64 characters.

Errors

  • 400Assignees must be members of this organization.
  • 404Repository not found
  • 404Issue not found
  • 409Could not create the issue. Try again.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/repos/{name}/issues' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example"
  }'
Send it from this page with your session or a key.

Response 201

{
  issue: {
    number: number
    createdAt?: number
    updatedAt?: number
    orgId: string
    title: string
    labels?: string[]
    repoId: string
    state?: "open" | "closed"
    body?: string
    assignees?: string[]
    comments?: number
    closedAt?: number
    closedBy?: string
    closedByPull?: number
    authorId: string
    authorEmail?: string
    authorName?: string
  }
}
GET/v1/orgs/:orgId/repos/:name/issues/:number

An issue and its comments.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • name

    Repository name.

  • number

    Issue or pull request number, or under pipelines a run number.

Errors

  • 404Repository not found
  • 404Not found
  • 404Issue not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/repos/{name}/issues/{number}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  issue: {
    number: number
    createdAt?: number
    updatedAt?: number
    orgId: string
    title: string
    labels?: string[]
    repoId: string
    state?: "open" | "closed"
    body?: string
    assignees?: string[]
    comments?: number
    closedAt?: number
    closedBy?: string
    closedByPull?: number
    authorId: string
    authorEmail?: string
    authorName?: string
  }
  comments: {
    number: number
    createdAt?: number
    updatedAt?: number
    orgId: string
    repoId: string
    body: string
    authorId: string
    authorEmail?: string
    authorName?: string
    commentId: string
  }[]
}
PATCH/v1/orgs/:orgId/repos/:name/issues/:number

Edits the title, body or labels, or closes and reopens the issue.

Auth
A person's token or an API key, as Authorization: Bearer.
Allowed
Author, or git:write
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • name

    Repository name.

  • number

    Issue or pull request number, or under pipelines a run number.

Request body

  • titlestring

    1–256 characters. Trimmed.

  • bodystring

    Up to 65,536 characters.

  • labelsstring[]

    Up to 10 items. Each 1–50 characters, trimmed.

  • assigneesstring[]

    Up to 10 items. Each 1–64 characters.

  • state"open" | "closed"

Errors

  • 400Assignees must be members of this organization.
  • 403Only the author or members with git:write can change this issue.
  • 404Repository not found
  • 404Not found
  • 404Issue not found
  • 409The issue changed. Reload and try again.
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/repos/{name}/issues/{number}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example",
    "body": "example",
    "labels": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  issue: {
    number: number
    createdAt?: number
    updatedAt?: number
    orgId: string
    title: string
    labels?: string[]
    repoId: string
    state?: "open" | "closed"
    body?: string
    assignees?: string[]
    comments?: number
    closedAt?: number
    closedBy?: string
    closedByPull?: number
    authorId: string
    authorEmail?: string
    authorName?: string
  }
}
POST/v1/orgs/:orgId/repos/:name/issues/:number/comments

Adds a comment to an issue.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • name

    Repository name.

  • number

    Issue or pull request number, or under pipelines a run number.

Request body

  • bodystringrequired

    1–65,536 characters. Trimmed.

Errors

  • 404Repository not found
  • 404Not found
  • 404Issue not found
  • 409Could not add the comment. Try again.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/repos/{name}/issues/{number}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 201

{
  comment: {
    authorId: string
    authorEmail: string
    authorName?: string
    repoId: string
    orgId: string
    number: number
    commentId: string
    body: string
  } | {
    authorId: string
    authorEmail?: undefined
    authorName?: undefined
    repoId: string
    orgId: string
    number: number
    commentId: string
    body: string
  }
}