123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- {
- "get": {
- "tags": ["Releases"],
- "description": "Return a release for a given organization.",
- "operationId": "Retrieve an Organization's Releases",
- "parameters": [
- {
- "name": "organization_slug",
- "in": "path",
- "description": "The slug of the organization the release belongs to.",
- "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": {
- "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
- },
- "example": {
- "id": 2,
- "authors": [],
- "commitCount": 0,
- "data": {},
- "dateCreated": "2018-11-06T21:20:08.033Z",
- "dateReleased": null,
- "deployCount": 0,
- "firstEvent": null,
- "lastCommit": null,
- "lastDeploy": null,
- "lastEvent": null,
- "newGroups": 0,
- "owner": null,
- "projects": [
- {
- "name": "Pump Station",
- "slug": "pump-station"
- }
- ],
- "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
- "shortVersion": "2.0rc2",
- "url": null,
- "version": "2.0rc2"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden"
- },
- "404": {
- "description": "Not Found"
- }
- },
- "security": [
- {
- "auth_token": ["project:releases"]
- }
- ]
- },
- "put": {
- "tags": ["Releases"],
- "description": "Update a release for a given organization.",
- "operationId": "Update an Organization's Release",
- "parameters": [
- {
- "name": "organization_slug",
- "in": "path",
- "description": "The slug of the organization the release belongs to.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "version",
- "in": "path",
- "description": "The version identifier of the release.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "ref": {
- "type": "string",
- "description": "An optional commit reference. This is useful if a tagged version has been provided."
- },
- "url": {
- "type": "string",
- "description": "A URL that points to the release. This can be the path to an online interface to the source code for instance."
- },
- "dateReleased": {
- "type": "string",
- "format": "date-time",
- "description": "An optional date that indicates when the release went live. If not provided the current time is assumed."
- },
- "commits": {
- "type": "array",
- "items": {
- "type": "object"
- },
- "description": "An optional list of commit data to be associated with the release. Commits must include parameters `id` (the sha of the commit), and can optionally include `repository`, `message`, `author_name`, `author_email`, and `timestamp`."
- },
- "refs": {
- "type": "array",
- "items": {
- "type": "object"
- },
- "description": "An optional way to indicate the start and end commits for each repository included in a release. Head commits must include parameters `repository` and `commit` (the HEAD sha). They can optionally include `previousCommit` (the sha of the HEAD of the previous release), which should be specified if this is the first time you've sent commit data."
- }
- }
- },
- "example": {
- "ref": "freshtofu",
- "url": "https://vcshub.invalid/user/project/refs/freshtofu"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Success",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "../../components/schemas/releases/organization-release.json#/OrganizationRelease"
- },
- "example": {
- "id": 2,
- "authors": [],
- "commitCount": 0,
- "data": {},
- "dateCreated": "2019-01-03T00:12:55.109Z",
- "dateReleased": null,
- "deployCount": 0,
- "firstEvent": null,
- "lastCommit": null,
- "lastDeploy": null,
- "lastEvent": null,
- "newGroups": 0,
- "owner": null,
- "projects": [
- {
- "name": "Pump Station",
- "slug": "pump-station"
- }
- ],
- "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
- "shortVersion": "2.0rc2",
- "url": null,
- "version": "2.0rc2"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden"
- },
- "404": {
- "description": "Not Found"
- }
- },
- "security": [
- {
- "auth_token": ["project:releases"]
- }
- ]
- },
- "delete": {
- "tags": ["Releases"],
- "description": "Delete a release for a given organization.",
- "operationId": "Delete an Organization's Release",
- "parameters": [
- {
- "name": "organization_slug",
- "in": "path",
- "description": "The slug of the organization the release belongs to.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "version",
- "in": "path",
- "description": "The version identifier of the release.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "204": {
- "description": "Success"
- }
- },
- "security": [
- {
- "auth_token": ["project:releases"]
- }
- ]
- }
- }
|