Skip to content

Update the board fields associated with an Issue

PUT /api/v5/repos/{owner}/{repo}/issues/{number}/kanban_values

This endpoint updates the board fields associated with a specified Issue. By specifying the board identifier (kanban_id) and submitting field names and the corresponding lists of field values, you can batch-modify the field values of the Issue on the board. On completion, it returns the updated board name, description, and field value details.

Access token support

  • AtomGit user access token (AtomGit user access tokens)

Anonymous access

This endpoint does not allow anonymous access.

Request parameters

Parameter Location Type Required Description
owner path string Yes Address path of the namespace that owns the repository (the address path of an organization or individual)
repo path string Yes Repository path (path)
number path string Yes Issue number
access_token query string Yes User authorization code

Request Body:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "kanban_id": {
      "description": "Board ID",
      "type": "integer"
    },
    "field_values": {
      "description": "List of board field values",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field_name": {
            "description": "Field name",
            "type": "string"
          },
          "value": {
            "description": "Field value; for option types, enter the option value",
            "type": "string"
          }
        }
      }
    }
  },
  "required": ["kanban_id", "field_values"]
}

Response parameters

Field Type Always returned Nullable Description
kanban_id integer Yes — Board ID
name string Yes — Board name
description string Yes — Board description
values array Yes — List of board field values

values array element object

Field Type Always returned Nullable Description
values[].field_name string Yes — Field name
values[].field_type string Yes — Field type
values[].value object Yes — Field value

values[].value object

Field Type Always returned Nullable Description
values[].value.color string Yes — Color
values[].value.value string Yes — Value
values[].value.position integer Yes — Position
values[].value.description string No — Description

Error responses

400 Invalid parameters

{
  "error": "invalid_request",
  "message": "Parameter kanban_id cannot be empty",
  "field": "kanban_id"
}

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

Note: The error field names in the above error response examples are subject to the actual backend response and may differ slightly.

HTTP status codes

Status code Description
200 Success (OK)
400 Bad request (Bad Request)
401 Requires authentication (Requires authentication)
403 Forbidden (Forbidden)
404 Resource not found (Not Found)
500 Internal server error (Internal Server Error)

Request example

Parameter notes

Replace <owner> with the address path of the namespace that owns the repository (the address path of an organization or individual); replace <repo> with the repository path; replace <number> with the Issue number; replace <token> with your AtomGit user access token.

cURL

curl -X PUT 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/kanban_values?access_token=<token>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "kanban_id": 1,
    "field_values": [
      {
        "field_name": "priority",
        "value": "high"
      }
    ]
  }'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch(
  "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/kanban_values?access_token=<token>",
  {
    method: "PUT",
    headers: {
      "Accept": "application/json",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      kanban_id: 1,
      field_values: [{ field_name: "priority", value: "high" }],
    }),
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);

Python

import requests

resp = requests.put(
    "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/<number>/kanban_values",
    params={"access_token": "<token>"},
    json={
        "kanban_id": 1,
        "field_values": [{"field_name": "priority", "value": "high"}],
    },
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{
  "kanban_id": 0,
  "name": "string",
  "description": "string",
  "values": [
    {
      "field_name": "string",
      "field_type": "string",
      "value": {
        "color": "string",
        "value": "string",
        "position": 0,
        "description": "string"
      }
    }
  ]
}

Error codes

Error code Description
400 Invalid parameters or unparsable request
401 Unauthenticated or invalid credentials (missing or invalid access credential)
404 Request path does not exist
405 Request method not allowed
429 Too many requests; rate limit triggered
500 Internal server error

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc