workspace_templates
Creates, updates, deletes, gets or lists a workspace_templates resource.
Overview​
| Name | workspace_templates |
| Type | Resource |
| Id | railway.templates.workspace_templates |
Fields​
The following fields are returned by SELECT queries:
- list
One row per Template.
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
demo_project_id | string | |
publishing_restriction_id | string | The active restriction stopping this workspace publishing templates, so a restricted author can be sent to the page that explains it and takes the appeal. Null when publishing is not restricted, and for anyone but the template's owner: the template query is public, and whether a workspace is under an abuse restriction is not. |
workspace_id | string | |
active_projects | integer | |
canvas_config | object | |
category | string | |
code | string | |
community_thread_slug | string | |
created_at | string (date-time) | |
creator | object | TemplateCreator object |
description | string | |
guides | object | TemplateGuide object |
health | number | |
image | string | |
is_approved | boolean | |
is_v2_template | boolean | |
is_verified | boolean | |
languages | array | |
maintainer | object | MaintainerWorkspace object |
projects | integer | |
readme | string | |
recent_projects | integer | |
serialized_config | object | |
similar_templates | array | List of SimilarTemplate objects |
status | string | (HIDDEN, PUBLISHED, UNPUBLISHED) |
support_health_metrics | object | |
tags | array | |
total_payout | number | |
updated_at | string (date-time) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | workspace_id | Get all templates for a workspace. Backed by the Railway GraphQL query workspaceTemplates. |
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 |
|---|---|---|
workspace_id | string |
SELECT examples​
- list
Get all templates for a workspace. Backed by the Railway GraphQL query workspaceTemplates.
SELECT
id,
name,
demo_project_id,
publishing_restriction_id,
workspace_id,
active_projects,
canvas_config,
category,
code,
community_thread_slug,
created_at,
creator,
description,
guides,
health,
image,
is_approved,
is_v2_template,
is_verified,
languages,
maintainer,
projects,
readme,
recent_projects,
serialized_config,
similar_templates,
status,
support_health_metrics,
tags,
total_payout,
updated_at
FROM railway.templates.workspace_templates
WHERE workspace_id = '{{ workspace_id }}' -- required
;