-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change endpoints for create and remove tags
- Loading branch information
Showing
4 changed files
with
60 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,26 +27,26 @@ server.register({ | |
|
||
### Routes | ||
|
||
#### Get all templates | ||
`page` and `count` optional | ||
#### Template | ||
##### Get all templates | ||
|
||
`GET /templates?page={pageNumber}&count={countNumber}` | ||
`GET /templates` | ||
|
||
#### Get a single template | ||
##### Get a single template | ||
|
||
You can get a single template by providing the template name and the specific version or the tag. | ||
|
||
`GET /templates/{name}/{tag}` or `GET /templates/{name}/{version}` | ||
|
||
**Arguments** | ||
###### Arguments | ||
|
||
'name', 'tag' or 'version' | ||
|
||
* `name` - Name of the template | ||
* `tag` - Tag of the template (e.g. `stable`, `latest`, etc) | ||
* `version` - Version of the template | ||
|
||
#### Create a template | ||
##### Create a template | ||
Creating a template will store the template data (`config`, `name`, `version`, `description`, `maintainer`, `labels`) into the datastore. | ||
|
||
If the exact template and version already exist, the only thing that can be changed is `labels`. | ||
|
@@ -57,7 +57,7 @@ If the template already exists but not the version, the new version will be stor | |
|
||
`POST /templates` | ||
|
||
**Arguments** | ||
###### Arguments | ||
|
||
'name', 'version', 'description', 'maintainer', labels | ||
|
||
|
@@ -84,25 +84,23 @@ Example payload: | |
} | ||
``` | ||
|
||
#### Create/Update a tag for a template version | ||
#### Template Tag | ||
Template tag allows fetching on template version by tag. For example, tag `[email protected]` as `stable`. | ||
|
||
Tagging a template version allows fetching on template version by tag. For example, tag `[email protected]` as `stable`. | ||
##### Create/Update a tag | ||
|
||
If the template tag already exists, it will update the tag with the new version. If the template tag doesn't exist yet, this endpoint will create the tag. | ||
|
||
*Note: This endpoint is only accessible in `build` scope and the permission is tied to the pipeline that creates the template.* | ||
|
||
`PUT /templates/tags` with the following payload | ||
`PUT /templates/{templateName}/tags/{tagName}` with the following payload | ||
|
||
* `name` - Name of the template (ex: `mytemplate`) | ||
* `version` - Version of the template (ex: `1.1.0`) | ||
* `tag` - Name of the tag (ex: `stable`) | ||
* `version` - Exact version of the template (ex: `1.1.0`) | ||
|
||
#### Delete a template tag | ||
##### Delete a tag | ||
|
||
Delete the template tag. This does not delete the template itself. | ||
|
||
*Note: This endpoint is only accessible in `build` scope and the permission is tied to the pipeline that creates the template.* | ||
|
||
`DELETE /templates/tags` with the following payload | ||
|
||
* `name` - Name of the template (ex: `mytemplate`) | ||
* `tag` - Name of the tag (ex: `stable`) | ||
`DELETE /templates/{templateName}/tags/{tagName}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters