Skip to main content

workspace_templates

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

Overview​

Nameworkspace_templates
TypeResource
Idrailway.templates.workspace_templates

Fields​

The following fields are returned by SELECT queries:

One row per Template.

NameDatatypeDescription
idstring
namestring
demo_project_idstring
publishing_restriction_idstringThe 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_idstring
active_projectsinteger
canvas_configobject
categorystring
codestring
community_thread_slugstring
created_atstring (date-time)
creatorobjectTemplateCreator object
descriptionstring
guidesobjectTemplateGuide object
healthnumber
imagestring
is_approvedboolean
is_v2_templateboolean
is_verifiedboolean
languagesarray
maintainerobjectMaintainerWorkspace object
projectsinteger
readmestring
recent_projectsinteger
serialized_configobject
similar_templatesarrayList of SimilarTemplate objects
statusstring (HIDDEN, PUBLISHED, UNPUBLISHED)
support_health_metricsobject
tagsarray
total_payoutnumber
updated_atstring (date-time)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectworkspace_idGet 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.

NameDatatypeDescription
workspace_idstring

SELECT examples​

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
;