projects
Creates, updates, deletes, gets or lists a projects resource.
Overview
| Name | projects |
| Type | Resource |
| Id | deno.project.projects |
Fields
The following fields are returned by SELECT queries:
- list_projects
- get_project
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | (example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11) |
name | string | (example: my-project) |
createdAt | string (date-time) | (example: 2021-08-01T00:00:00Z) |
description | string | (example: this is my project.) |
updatedAt | string (date-time) | (example: 2021-08-01T00:00:00Z) |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | (example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11) |
name | string | (example: my-project) |
createdAt | string (date-time) | (example: 2021-08-01T00:00:00Z) |
description | string | (example: this is my project.) |
updatedAt | string (date-time) | (example: 2021-08-01T00:00:00Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_projects | select | organizationId | page, limit, q, sort, order | This API returns a list of projects belonging to the specified organization in a pagenated manner. The URLs for the next, previous, first, and last page are returned in the Link header of the response, if any. |
get_project | select | projectId | ||
create_project | insert | organizationId | This API allows you to create a new project under the specified organization. The project name is optional; if not provided, a random name will be generated. | |
update_project | update | projectId | ||
delete_project | delete | projectId |
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 |
|---|---|---|
organizationId | string (uuid) | Organization ID |
projectId | string (uuid) | Project ID |
limit | integer | The maximum number of items to return per page. |
order | string | Sort order, either asc or desc. Defaults to asc. |
page | integer | The page number to return. |
q | string | Query by project name or project ID |
sort | string | The field to sort by, either name, updated_at, requests, or bandwidth. Defaults to updated_at. |
SELECT examples
- list_projects
- get_project
This API returns a list of projects belonging to the specified organization
in a pagenated manner.
The URLs for the next, previous, first, and last page are returned in theLink header of the response, if any.
SELECT
id,
name,
createdAt,
description,
updatedAt
FROM deno.project.projects
WHERE organizationId = '{{ organizationId }}' -- required
AND page = '{{ page }}'
AND limit = '{{ limit }}'
AND q = '{{ q }}'
AND sort = '{{ sort }}'
AND order = '{{ order }}'
;
Success
SELECT
id,
name,
createdAt,
description,
updatedAt
FROM deno.project.projects
WHERE projectId = '{{ projectId }}' -- required
;
INSERT examples
- create_project
- Manifest
This API allows you to create a new project under the specified
organization.
The project name is optional; if not provided, a random name will be
generated.
INSERT INTO deno.project.projects (
data__name,
data__description,
organizationId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ organizationId }}'
RETURNING
id,
name,
createdAt,
description,
updatedAt
;
# Description fields are for documentation purposes
- name: projects
props:
- name: organizationId
value: string (uuid)
description: Required parameter for the projects resource.
- name: name
value: string
description: |
The name of the project. This must be globally unique. If this is `null`,
a random unique name will be generated.
- name: description
value: string
description: |
The description of the project. If this is `null`, an empty string will be
set.
UPDATE examples
- update_project
No description available.
UPDATE deno.project.projects
SET
data__name = '{{ name }}',
data__description = '{{ description }}'
WHERE
projectId = '{{ projectId }}' --required
RETURNING
id,
name,
createdAt,
description,
updatedAt;
DELETE examples
- delete_project
No description available.
DELETE FROM deno.project.projects
WHERE projectId = '{{ projectId }}' --required
;