User API
URL Base:
https://service.devstats.com/api/v1Autorização
Token Bearer obrigatório. Incluir no header:
Authorization: Bearer <token>GET
/usersList Users
Retrieves a list of users.
Parâmetros de Query
| Name | Type | In | Required | Description |
|---|---|---|---|---|
per_page | number | query | No | Min: 1 |
page | number | query | No | Min: 1 |
squad | string | query | No | Min length: 1Max length: 255 |
name | string | query | No | Min length: 1Max length: 255 |
email | string | query | No | Min length: 1Max length: 255 |
GET /api/v1/users HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/jsonRespostas
POST
/usersCreate User
Creates a new user for the workspace.
Corpo da Requisição
| Name | Type | In | Required | Description |
|---|---|---|---|---|
name | string | body | Yes | The name of the user.Min length: 2Max length: 255 |
email | string (email) | body | Yes | The email address of the user.Max length: 255 |
password | string | body | Yes | The 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. |
role | string | body | Yes | The role of the user in the workspace. Should be one of the following: Admin, Member, Viewer.Enum: Admin, Member, Viewer |
squads | array | body | No | The 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
| Name | Type | In | Required | Description |
|---|---|---|---|---|
user | string | path | Yes | The user UUID |
Corpo da Requisição
| Name | Type | In | Required | Description |
|---|---|---|---|---|
name | string | body | Yes | The name of the user.Min length: 2Max length: 255 |
role | string | body | Yes | The role of the user in the workspace. Should be one of the following: Admin, Member, Viewer.Enum: Admin, Member, Viewer |
squads | array | body | No | The 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
| Name | Type | In | Required | Description |
|---|---|---|---|---|
user | string | path | Yes | The user UUID |
DELETE /api/v1/users/<user> HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/jsonRespostas