Docs/Tools/DevStats API/User

User API

Base URL:https://service.devstats.com/api/v1
Authorization

Bearer token required. Include in the header:

Authorization: Bearer <token>
GET/users

List Users

Retrieves a list of users.

Query Parameters
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
Responses
POST/users

Create User

Creates a new user for the workspace.

Request Body
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']"
}
Responses
PUT/users/{user}

Update User

Updates an existing user.

Path Parameters
NameTypeInRequiredDescription
userstringpathYesThe user UUID
Request Body
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']"
}
Responses
DELETE/users/{user}

Delete User Forever

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

Path Parameters
NameTypeInRequiredDescription
userstringpathYesThe user UUID
DELETE /api/v1/users/<user> HTTP/1.1
Host: service.devstats.com
Authorization: Bearer <token>
Accept: application/json
Responses