Docs/Tools/DevStats API/User

User API

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

Token Bearer obrigatório. Incluir no header:

Authorization: Bearer <token>
GET/users

List Users

Retrieves a list of users.

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

Create User

Creates a new user for the workspace.

Corpo da Requisição
NameTypeInRequiredDescription
namestringbodyYesThe name of the user.Min length: 2Max length: 255
emailstring (email)bodyYesThe email address of the user.Max length: 255
passwordstringbodyYesThe password of the user. Should be at least 12 characters long, contain at least one uppercase letter, one lowercase letter, one number, and one special character.
rolestringbodyYesThe role of the user in the workspace. Should be one of the following: Admin, Member, Viewer.Enum: Admin, Member, Viewer
squadsarraybodyNoThe squads the user belongs to. Should be an array of squad names. Can be empty if the user is an admin.
POST /api/v1/users HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/json
Content-Type: application/json

{
  "name": "John Doe",
  "email": "john@doe.com",
  "password": "P@ssw0rd123!",
  "role": "<role>",
  "squads": "['My Squad 1', 'My Squad 2']"
}
Respostas
PUT/users/{user}

Update User

Updates an existing user.

Parâmetros de Path
NameTypeInRequiredDescription
userstringpathYesThe user UUID
Corpo da Requisição
NameTypeInRequiredDescription
namestringbodyYesThe name of the user.Min length: 2Max length: 255
rolestringbodyYesThe role of the user in the workspace. Should be one of the following: Admin, Member, Viewer.Enum: Admin, Member, Viewer
squadsarraybodyNoThe squads the user belongs to. Should be an array of squad names. Can be empty if the user is an admin.
PUT /api/v1/users/<user> HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/json
Content-Type: application/json

{
  "name": "John Doe",
  "role": "<role>",
  "squads": "['My Squad 1', 'My Squad 2']"
}
Respostas
DELETE/users/{user}

Delete User Forever

Deletes an existing user. Be careful, this action is irreversible.

Parâmetros de Path
NameTypeInRequiredDescription
userstringpathYesThe user UUID
DELETE /api/v1/users/<user> HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/json
Respostas