Scaffolder
Use these operations to interact with Scaffolder templates in Cortex.
Required permissions
List or retrieve Scaffolder templates: no additional permission is required.
Create, update, or delete Scaffolder templates: your API key must have the
Configure Scaffolderpermission.
Identifying a template
Every Scaffolder template has a tag: a stable, human-readable identifier that is unique within your workspace. Tags may contain lowercase letters, numbers, and dashes, and may not start or end with a dash. If you omit the tag when creating a template, Cortex derives one from the template's name. An existing template keeps its tag unless you supply a new one.
Operations that take a tagOrId path parameter accept either the tag or the unique, auto-generated Cortex ID. Prefer the tag: it is the identifier you choose, so it stays readable and portable across workspaces.
Creating and updating
POST /api/v1/scaffolders is an upsert. If a template with the same tag already exists, that template is updated instead of a new one being created. Use PUT /api/v1/scaffolders/{tagOrId} when you want to update a specific template and have the request fail if it does not exist.
Operations
List Scaffolder templates.
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Number of results to return per page, between 1 and 1000. Default 250.
250Page number to return, 0-indexed. Default 0.
0Successfully found Scaffolder templates
Current page number, 0-indexed
Total number of results
Total number of pages
Access denied
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/scaffolders?pageSize=250&page=0 HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"page": 1,
"scaffolders": [
{
"createYamlFile": true,
"createdAt": "text",
"description": "text",
"id": "text",
"labels": [
"text"
],
"name": "text",
"publisherOptions": {
"provider": "GITHUB"
},
"repoLocator": {
"provider": "GITHUB"
},
"requireNewService": true,
"requirePullRequest": true,
"showReadme": true,
"strictAliasUsage": true,
"tag": "text",
"type": "COOKIECUTTER",
"updatedAt": "text"
}
],
"total": 1,
"totalPages": 1
}Retrieve a Scaffolder template by tag or Cortex ID.
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Entity identifier - can be a tag or CID
Successfully found the Scaffolder template
Whether a cortex.yaml is generated for the created entity
ISO-8601 timestamp at which the template was registered
Description of the Scaffolder template
Unique, auto-generated Cortex ID of the Scaffolder template
Descriptive labels used to group templates in the UI
Display name of the Scaffolder template
Whether running the template must create a new entity
Whether the template publishes via a pull request to an existing repository
Whether the template repository's README is shown before a run
Whether runs are restricted to the git configuration alias the template names
Stable, human-readable identifier, unique within the workspace
The templating engine of the template
ISO-8601 timestamp at which the template was last updated
Access denied
Scaffolder template not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/scaffolders/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"createYamlFile": true,
"createdAt": "text",
"description": "text",
"id": "text",
"labels": [
"text"
],
"name": "text",
"publisherOptions": {
"provider": "GITHUB"
},
"repoLocator": {
"provider": "GITHUB"
},
"requireNewService": true,
"requirePullRequest": true,
"showReadme": true,
"strictAliasUsage": true,
"tag": "text",
"type": "COOKIECUTTER",
"updatedAt": "text"
}Create or update a Scaffolder template.
API key must have the Configure Scaffolder permission.
Note: If a Scaffolder template with the same tag already exists, it will be updated.
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Whether a cortex.yaml is generated for the created entity. Defaults to true
Description of the Scaffolder template
Descriptive labels used to group templates in the UI
Display name of the Scaffolder template
Whether running the template must create a new entity. Defaults to true
Whether the template publishes via a pull request to an existing repository. Defaults to false
Whether the template repository's README is shown before a run. Defaults to false
Whether runs are restricted to the git configuration alias the template names. Defaults to true
Stable, human-readable identifier, unique within the workspace. Lowercase letters, numbers, and dashes; may not start or end with a dash. Derived from the name when omitted on creation; an existing template keeps its tag unless a new one is provided.
The templating engine of the template
Scaffolder template created or updated successfully
Whether a cortex.yaml is generated for the created entity
ISO-8601 timestamp at which the template was registered
Description of the Scaffolder template
Unique, auto-generated Cortex ID of the Scaffolder template
Descriptive labels used to group templates in the UI
Display name of the Scaffolder template
Whether running the template must create a new entity
Whether the template publishes via a pull request to an existing repository
Whether the template repository's README is shown before a run
Whether runs are restricted to the git configuration alias the template names
Stable, human-readable identifier, unique within the workspace
The templating engine of the template
ISO-8601 timestamp at which the template was last updated
Bad request
Access denied
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/scaffolders HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 281
{
"createYamlFile": true,
"description": "text",
"labels": [
"text"
],
"name": "text",
"publisherOptions": {
"provider": "GITHUB"
},
"repoLocator": {
"provider": "GITHUB"
},
"requireNewService": true,
"requirePullRequest": true,
"showReadme": true,
"strictAliasUsage": true,
"tag": "text",
"type": "COOKIECUTTER"
}{
"createYamlFile": true,
"createdAt": "text",
"description": "text",
"id": "text",
"labels": [
"text"
],
"name": "text",
"publisherOptions": {
"provider": "GITHUB"
},
"repoLocator": {
"provider": "GITHUB"
},
"requireNewService": true,
"requirePullRequest": true,
"showReadme": true,
"strictAliasUsage": true,
"tag": "text",
"type": "COOKIECUTTER",
"updatedAt": "text"
}Update a Scaffolder template by tag or Cortex ID.
API key must have the Configure Scaffolder permission.
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Entity identifier - can be a tag or CID
Whether a cortex.yaml is generated for the created entity. Defaults to true
Description of the Scaffolder template
Descriptive labels used to group templates in the UI
Display name of the Scaffolder template
Whether running the template must create a new entity. Defaults to true
Whether the template publishes via a pull request to an existing repository. Defaults to false
Whether the template repository's README is shown before a run. Defaults to false
Whether runs are restricted to the git configuration alias the template names. Defaults to true
Stable, human-readable identifier, unique within the workspace. Lowercase letters, numbers, and dashes; may not start or end with a dash. Derived from the name when omitted on creation; an existing template keeps its tag unless a new one is provided.
The templating engine of the template
Scaffolder template updated successfully
Whether a cortex.yaml is generated for the created entity
ISO-8601 timestamp at which the template was registered
Description of the Scaffolder template
Unique, auto-generated Cortex ID of the Scaffolder template
Descriptive labels used to group templates in the UI
Display name of the Scaffolder template
Whether running the template must create a new entity
Whether the template publishes via a pull request to an existing repository
Whether the template repository's README is shown before a run
Whether runs are restricted to the git configuration alias the template names
Stable, human-readable identifier, unique within the workspace
The templating engine of the template
ISO-8601 timestamp at which the template was last updated
Bad request
Access denied
Scaffolder template not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
PUT /api/v1/scaffolders/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 281
{
"createYamlFile": true,
"description": "text",
"labels": [
"text"
],
"name": "text",
"publisherOptions": {
"provider": "GITHUB"
},
"repoLocator": {
"provider": "GITHUB"
},
"requireNewService": true,
"requirePullRequest": true,
"showReadme": true,
"strictAliasUsage": true,
"tag": "text",
"type": "COOKIECUTTER"
}{
"createYamlFile": true,
"createdAt": "text",
"description": "text",
"id": "text",
"labels": [
"text"
],
"name": "text",
"publisherOptions": {
"provider": "GITHUB"
},
"repoLocator": {
"provider": "GITHUB"
},
"requireNewService": true,
"requirePullRequest": true,
"showReadme": true,
"strictAliasUsage": true,
"tag": "text",
"type": "COOKIECUTTER",
"updatedAt": "text"
}Delete a Scaffolder template by tag or Cortex ID.
API key must have the Configure Scaffolder permission.
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Entity identifier - can be a tag or CID
Scaffolder template deleted successfully
No content
Access denied
Scaffolder template not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
DELETE /api/v1/scaffolders/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?