Gamma API

Add an issue field

POST
/api/projects/{projectId}/issue-schemas/{schemaId}/fields

Added last. type, multiple and scope cannot be changed afterwards.

Who may call it: Whoever manages the project: an owner, security admin or admin of its organization, or an admin of the project. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

projectId*string

The project's id.

schemaId*string

Request Body

application/json
  1. body
label*string
Length1 <= length <= 200
type*string
Value in"text""number""boolean""date""select""multiselect""tree_select""tree_multiselect""user"
options?array<>

A select or multiselect field's choices, at least one. Ignored on other types.

Itemsitems <= 200
choices?unknown

A tree field's nodes, flat, each parent before its children: { id, label, parentId }[], ids of your choosing, 1 to 500 of them. Ignored on other types.

multiple?boolean

A user field: whether it takes more than one party.

scope?string

A user field: who it may name. members by default.

Value in"members""companies""both"
role?|

What the field stands for in the issue charts, whatever its label: assignee on a user, dueDate on a date. A schema has at most one field per role; giving it to this field takes it off the one that had it. null for none. status is not given: every schema is created with its status field, a select that keeps the role and cannot be removed.

Response Body

Created.

application/json
  1. response
field*

One field of an issue schema.

Example Request
curl -X POST 'http://localhost:3000/api/projects/string/issue-schemas/string/fields' \  -H 'Content-Type: application/json' \  -d '{  "label": "string",  "type": "text"}'
Example Response
{  "field": {    "id": "string",    "schemaId": "string",    "label": "string",    "type": "text",    "options": [      "string"    ],    "statuses": [      {        "name": "string",        "colorHex": "string",        "completion": "notStarted"      }    ],    "choices": null,    "multiple": true,    "scope": "members",    "role": "status",    "position": -9007199254740991  }}