Skip to main content

issue_fields

Creates, updates, deletes, gets or lists an issue_fields resource.

Overview

Nameissue_fields
TypeResource
Idgithub.orgs.issue_fields

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idintegerThe unique identifier of the issue field.
namestringThe name of the issue field.
node_idstringThe node identifier of the issue field.
created_atstring (date-time)The time the issue field was created.
data_typestringThe data type of the issue field. (text, date, single_select, number)
descriptionstringThe description of the issue field.
optionsarrayAvailable options for single select fields.
updated_atstring (date-time)The time the issue field was last updated.
visibilitystringThe visibility of the issue field. Can be organization_members_only (visible only within the organization) or all (visible to all users who can see issues). (organization_members_only, all)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_issue_fieldsselectorgLists all issue fields for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
create_issue_fieldinsertorg, name, data_typeCreates a new issue field for an organization.

You can find out more about issue fields in Managing issue fields in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.
update_issue_fieldupdateorg, issue_field_idUpdates an issue field for an organization.

You can find out more about issue fields in Managing issue fields in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.
delete_issue_fielddeleteorg, issue_field_idDeletes an issue field for an organization.

You can find out more about issue fields in Managing issue fields in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
issue_field_idintegerThe unique identifier of the issue field.
orgstringThe organization name. The name is not case sensitive.

SELECT examples

Lists all issue fields for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

SELECT
id,
name,
node_id,
created_at,
data_type,
description,
options,
updated_at,
visibility
FROM github.orgs.issue_fields
WHERE org = '{{ org }}' -- required
;

INSERT examples

Creates a new issue field for an organization.

You can find out more about issue fields in Managing issue fields in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.

INSERT INTO github.orgs.issue_fields (
name,
description,
data_type,
visibility,
options,
org
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ data_type }}' /* required */,
'{{ visibility }}',
'{{ options }}',
'{{ org }}'
RETURNING
id,
name,
node_id,
created_at,
data_type,
description,
options,
updated_at,
visibility
;

UPDATE examples

Updates an issue field for an organization.

You can find out more about issue fields in Managing issue fields in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.

UPDATE github.orgs.issue_fields
SET
name = '{{ name }}',
description = '{{ description }}',
visibility = '{{ visibility }}',
options = '{{ options }}'
WHERE
org = '{{ org }}' --required
AND issue_field_id = '{{ issue_field_id }}' --required
RETURNING
id,
name,
node_id,
created_at,
data_type,
description,
options,
updated_at,
visibility;

DELETE examples

Deletes an issue field for an organization.

You can find out more about issue fields in Managing issue fields in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.

DELETE FROM github.orgs.issue_fields
WHERE org = '{{ org }}' --required
AND issue_field_id = '{{ issue_field_id }}' --required
;