Files
sentinel/api-docs/paths/releases/project-release-files.json
2024-02-15 17:01:50 +00:00

177 lines
4.5 KiB
JSON

{
"get": {
"tags": ["Releases"],
"description": "Return a list of files for a given release.",
"operationId": "List a Project's Release Files",
"parameters": [
{
"name": "organization_slug",
"in": "path",
"description": "The slug of the organization.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "project_slug",
"in": "path",
"description": "The slug of the project.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "version",
"in": "path",
"description": "The version identifier of the release.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
}
},
"example": [
{
"dateCreated": "2018-11-06T21:20:22.894Z",
"dist": null,
"headers": {
"Content-Type": "text/plain; encoding=utf-8"
},
"id": "3",
"name": "/demo/goodbye.txt",
"sha1": "94d6b21e962a9fc65889617ec1f17a1e2fe11b65",
"size": 15
}
]
}
}
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"security": [
{
"auth_token": ["project:releases"]
}
]
},
"post": {
"tags": ["Releases"],
"description": "Upload a new project release file.",
"operationId": "Upload a New Project Release File",
"parameters": [
{
"name": "organization_slug",
"in": "path",
"description": "The slug of the organization.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "project_slug",
"in": "path",
"description": "The slug of the project.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "version",
"in": "path",
"description": "The version identifier of the release.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": ["file"],
"properties": {
"name": {
"type": "string",
"description": "The name (full path) of the file."
},
"file": {
"type": "string",
"format": "binary",
"description": "The multipart encoded file."
},
"dist": {
"type": "string",
"description": "The name of the dist."
},
"header": {
"type": "string",
"description": "This parameter can be supplied multiple times to attach headers to the file. Each header is a string in the format `key:value`. For instance it can be used to define a content type."
}
}
},
"example": {
"name": "/demo/hello.min.js.map",
"file": "@hello.min.js.map"
}
}
}
},
"responses": {
"201": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
},
"example": {
"dateCreated": "2018-11-06T21:20:22.894Z",
"dist": null,
"headers": {
"Content-Type": "text/plain; encoding=utf-8"
},
"id": "3",
"name": "/demo/goodbye.txt",
"sha1": "94d6b21e962a9fc65889617ec1f17a1e2fe11b65",
"size": 15
}
}
}
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"security": [
{
"auth_token": ["project:releases"]
}
]
}
}