projects
Creates, updates, deletes, gets or lists a projects resource.
Overview​
| Name | projects |
| Type | Resource |
| Id | github.projects.projects |
Fields​
The following fields are returned by SELECT queries:
- get_for_org
- get_for_user
- list_for_org
- list_for_user
Response
| Name | Datatype | Description |
|---|---|---|
id | number | The unique identifier of the project. |
node_id | string | The node ID of the project. |
closed_at | string (date-time) | The time when the project was closed. (example: 2022-04-28T12:00:00Z) |
created_at | string (date-time) | The time when the project was created. (example: 2022-04-28T12:00:00Z) |
creator | object | A GitHub user. (title: Simple User) |
deleted_at | string (date-time) | The time when the project was deleted. (example: 2022-04-28T12:00:00Z) |
deleted_by | object | A GitHub user. (title: Simple User) |
description | string | A short description of the project. |
is_template | boolean | Whether this project is a template |
latest_status_update | object | An status update belonging to a project (title: Projects v2 Status Update) |
number | integer | The project number. |
owner | object | A GitHub user. (title: Simple User) |
public | boolean | Whether the project is visible to anyone with access to the owner. |
short_description | string | A concise summary of the project. |
state | string | The current state of the project. (open, closed) |
title | string | The project title. |
updated_at | string (date-time) | The time when the project was last updated. (example: 2022-04-28T12:00:00Z) |
Response
| Name | Datatype | Description |
|---|---|---|
id | number | The unique identifier of the project. |
node_id | string | The node ID of the project. |
closed_at | string (date-time) | The time when the project was closed. (example: 2022-04-28T12:00:00Z) |
created_at | string (date-time) | The time when the project was created. (example: 2022-04-28T12:00:00Z) |
creator | object | A GitHub user. (title: Simple User) |
deleted_at | string (date-time) | The time when the project was deleted. (example: 2022-04-28T12:00:00Z) |
deleted_by | object | A GitHub user. (title: Simple User) |
description | string | A short description of the project. |
is_template | boolean | Whether this project is a template |
latest_status_update | object | An status update belonging to a project (title: Projects v2 Status Update) |
number | integer | The project number. |
owner | object | A GitHub user. (title: Simple User) |
public | boolean | Whether the project is visible to anyone with access to the owner. |
short_description | string | A concise summary of the project. |
state | string | The current state of the project. (open, closed) |
title | string | The project title. |
updated_at | string (date-time) | The time when the project was last updated. (example: 2022-04-28T12:00:00Z) |
Response
| Name | Datatype | Description |
|---|---|---|
id | number | The unique identifier of the project. |
node_id | string | The node ID of the project. |
closed_at | string (date-time) | The time when the project was closed. (example: 2022-04-28T12:00:00Z) |
created_at | string (date-time) | The time when the project was created. (example: 2022-04-28T12:00:00Z) |
creator | object | A GitHub user. (title: Simple User) |
deleted_at | string (date-time) | The time when the project was deleted. (example: 2022-04-28T12:00:00Z) |
deleted_by | object | A GitHub user. (title: Simple User) |
description | string | A short description of the project. |
is_template | boolean | Whether this project is a template |
latest_status_update | object | An status update belonging to a project (title: Projects v2 Status Update) |
number | integer | The project number. |
owner | object | A GitHub user. (title: Simple User) |
public | boolean | Whether the project is visible to anyone with access to the owner. |
short_description | string | A concise summary of the project. |
state | string | The current state of the project. (open, closed) |
title | string | The project title. |
updated_at | string (date-time) | The time when the project was last updated. (example: 2022-04-28T12:00:00Z) |
Response
| Name | Datatype | Description |
|---|---|---|
id | number | The unique identifier of the project. |
node_id | string | The node ID of the project. |
closed_at | string (date-time) | The time when the project was closed. (example: 2022-04-28T12:00:00Z) |
created_at | string (date-time) | The time when the project was created. (example: 2022-04-28T12:00:00Z) |
creator | object | A GitHub user. (title: Simple User) |
deleted_at | string (date-time) | The time when the project was deleted. (example: 2022-04-28T12:00:00Z) |
deleted_by | object | A GitHub user. (title: Simple User) |
description | string | A short description of the project. |
is_template | boolean | Whether this project is a template |
latest_status_update | object | An status update belonging to a project (title: Projects v2 Status Update) |
number | integer | The project number. |
owner | object | A GitHub user. (title: Simple User) |
public | boolean | Whether the project is visible to anyone with access to the owner. |
short_description | string | A concise summary of the project. |
state | string | The current state of the project. (open, closed) |
title | string | The project title. |
updated_at | string (date-time) | The time when the project was last updated. (example: 2022-04-28T12:00:00Z) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_for_org | select | project_number, org | Get a specific organization-owned project. | |
get_for_user | select | project_number, username | Get a specific user-owned project. | |
list_for_org | select | org | q, before, after, per_page | List all projects owned by a specific organization accessible by the authenticated user. |
list_for_user | select | username | q, before, after, per_page | List all projects owned by a specific user accessible by the authenticated user. |
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.
| Name | Datatype | Description |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
project_number | integer | The project's number. |
username | string | The handle for the GitHub user account. |
after | string | A 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." |
before | string | A 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." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
q | string | Limit results to projects of the specified type. |
SELECT examples​
- get_for_org
- get_for_user
- list_for_org
- list_for_user
Get a specific organization-owned project.
SELECT
id,
node_id,
closed_at,
created_at,
creator,
deleted_at,
deleted_by,
description,
is_template,
latest_status_update,
number,
owner,
public,
short_description,
state,
title,
updated_at
FROM github.projects.projects
WHERE project_number = '{{ project_number }}' -- required
AND org = '{{ org }}' -- required
;
Get a specific user-owned project.
SELECT
id,
node_id,
closed_at,
created_at,
creator,
deleted_at,
deleted_by,
description,
is_template,
latest_status_update,
number,
owner,
public,
short_description,
state,
title,
updated_at
FROM github.projects.projects
WHERE project_number = '{{ project_number }}' -- required
AND username = '{{ username }}' -- required
;
List all projects owned by a specific organization accessible by the authenticated user.
SELECT
id,
node_id,
closed_at,
created_at,
creator,
deleted_at,
deleted_by,
description,
is_template,
latest_status_update,
number,
owner,
public,
short_description,
state,
title,
updated_at
FROM github.projects.projects
WHERE org = '{{ org }}' -- required
AND q = '{{ q }}'
AND before = '{{ before }}'
AND after = '{{ after }}'
AND per_page = '{{ per_page }}'
;
List all projects owned by a specific user accessible by the authenticated user.
SELECT
id,
node_id,
closed_at,
created_at,
creator,
deleted_at,
deleted_by,
description,
is_template,
latest_status_update,
number,
owner,
public,
short_description,
state,
title,
updated_at
FROM github.projects.projects
WHERE username = '{{ username }}' -- required
AND q = '{{ q }}'
AND before = '{{ before }}'
AND after = '{{ after }}'
AND per_page = '{{ per_page }}'
;