Docs/Tools/DevStats API/Deploy

Deploy API

URL Base:https://service.devstats.com/api/v1
Autorização

Token Bearer obrigatório. Incluir no header:

Authorization: Bearer <token>
GET/deploys

List Deploys

Retrieves a list of deploys.

Parâmetros de Query
NameTypeInRequiredDescription
per_pagenumberqueryNoMin: 1
pagenumberqueryNoMin: 1
repositorystringqueryNoMin length: 1Max length: 255
GET /api/v1/deploys HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/json
Respostas
POST/deploys

Create Deploy

Creates a new deployment for the repository.

Corpo da Requisição
NameTypeInRequiredDescription
repositorystringbodyYesThe full name of the repository.
deployed_atstringbodyYesThe deployment date in the ISO 8601 format.
commit_shastringbodyNoThe commit SHA of the deployment.
POST /api/v1/deploys HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/json
Content-Type: application/json

{
  "repository": "organization/repository",
  "deployed_at": "2024-07-20T15:30:00-03:00",
  "commit_sha": "1234567890abcdef1234567890abcdef12345678"
}
Respostas
DELETE/deploys/{deploy}

Delete Deploy

Deletes an existing deploy.

Parâmetros de Path
NameTypeInRequiredDescription
deploystringpathYesThe deploy UUID
DELETE /api/v1/deploys/<deploy> HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/json
Respostas
PATCH/deploys/{deploy}

Update Deploy

Updates an existing deploy.

Parâmetros de Path
NameTypeInRequiredDescription
deploystringpathYesThe deploy UUID
Corpo da Requisição
NameTypeInRequiredDescription
deployed_atstringbodyNoThe deployment date in the ISO 8601 format.
commit_shastringbodyNoThe commit SHA of the deployment.
PATCH /api/v1/deploys/<deploy> HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/json
Content-Type: application/json

{
  "deployed_at": "2024-07-20T15:30:00-03:00",
  "commit_sha": "1234567890abcdef1234567890abcdef12345678"
}
Respostas