Skip to main content

project_view_items

Creates, updates, deletes, gets or lists a project_view_items resource.

Overview

Nameproject_view_items
TypeResource
Idgithub.projects.project_view_items

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idnumberThe unique identifier of the project item.
node_idstringThe node ID of the project item.
archived_atstring (date-time)The time when the item was archived. (example: 2022-04-28T12:00:00Z)
contentobjectThe content of the item, which varies by content type.
content_typestringThe type of content tracked in a project item (Issue, PullRequest, DraftIssue) (title: Projects v2 Item Content Type)
created_atstring (date-time)The time when the item was created. (example: 2022-04-28T12:00:00Z)
creatorobjectA GitHub user. (title: Simple User)
fieldsarrayThe fields and values associated with this item.
item_urlstring (uri)The API URL of this item. (example: https://api.github.com/users/monalisa/2/projectsV2/items/3)
project_urlstring (uri)The API URL of the project that contains this item. (example: https://api.github.com/users/monalisa/2/projectsV2/3)
updated_atstring (date-time)The time when the item was last updated. (example: 2022-04-28T12:00:00Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_view_items_for_orgselectproject_number, org, view_numberfields, before, after, per_pageList items in an organization project with the saved view's filter applied.
list_view_items_for_userselectproject_number, username, view_numberfields, before, after, per_pageList items in a user project with the saved view's filter applied.

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
orgstringThe organization name. The name is not case sensitive.
project_numberintegerThe project's number.
usernamestringThe handle for the GitHub user account.
view_numberintegerThe number that identifies the project view.
afterstringA cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."
beforestringA cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."
fieldsLimit results to specific fields, by their IDs. If not specified, the title field will be returned. Example: fields[]=123&fields[]=456&fields[]=789 or fields=123,456,789
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

List items in an organization project with the saved view's filter applied.

SELECT
id,
node_id,
archived_at,
content,
content_type,
created_at,
creator,
fields,
item_url,
project_url,
updated_at
FROM github.projects.project_view_items
WHERE project_number = '{{ project_number }}' -- required
AND org = '{{ org }}' -- required
AND view_number = '{{ view_number }}' -- required
AND fields = '{{ fields }}'
AND before = '{{ before }}'
AND after = '{{ after }}'
AND per_page = '{{ per_page }}'
;