Users
Public API (0.0.0)
2GIS GeoFlow Public API
Getting a list of users
Returns a page with a list of users.
Authorizations:
query Parameters
| limit required | integer Maximum number of users in the response, from 1 to 500. |
| cursor | string Cursor for getting the next or previous page of results. |
Responses
Response Schema: application/json
required | object (CursorResponse) Cursors for the next and previous result pages. |
required | Array of objects (UserResponse) Current page items. |
Response samples
- 200
- 400
- 401
- 500
{- "cursor": {
- "next": "string",
- "prev": "string"
}, - "items": [
- {
- "first_name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "last_name": "string",
- "phone": "string",
- "roles": [
- "super_admin"
], - "second_name": "string",
- "status": "active",
- "username": "string"
}
]
}Creating a user
Creates a mobile application user.
Authorizations:
Request Body schema: application/jsonrequired
Data for creating a user.
| first_name required | string User first name. |
| last_name required | string User last name. |
| phone_number | string non-empty Phone number. |
| second_name | string non-empty User middle name. |
| username required | string User login. |
Responses
Response Schema: application/json
| first_name | string User first name. |
| id required | string <uuid> User identifier. |
| last_name | string User last name. |
| phone | string Phone number. |
| roles required | Array of strings (RoleName) Items Enum: "super_admin" "admin" "dispatcher" "agent_group_admin" "user" User roles. |
| second_name | string User middle name. |
| status required | string (UserStatus) Enum: "active" "inactive" "pending" Account status: |
| username required | string User login. |
Request samples
- Payload
{- "first_name": "string",
- "last_name": "string",
- "phone_number": "string",
- "second_name": "string",
- "username": "string"
}Response samples
- 200
- 400
- 401
- 500
{- "first_name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "last_name": "string",
- "phone": "string",
- "roles": [
- "super_admin"
], - "second_name": "string",
- "status": "active",
- "username": "string"
}Getting a user
Returns user data by its identifier.
Authorizations:
path Parameters
| id required | string <uuid> User identifier. |
Responses
Response Schema: application/json
| first_name | string User first name. |
| id required | string <uuid> User identifier. |
| last_name | string User last name. |
| phone | string Phone number. |
| roles required | Array of strings (RoleName) Items Enum: "super_admin" "admin" "dispatcher" "agent_group_admin" "user" User roles. |
| second_name | string User middle name. |
| status required | string (UserStatus) Enum: "active" "inactive" "pending" Account status: |
| username required | string User login. |
Response samples
- 200
- 400
- 401
- 404
- 500
{- "first_name": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "last_name": "string",
- "phone": "string",
- "roles": [
- "super_admin"
], - "second_name": "string",
- "status": "active",
- "username": "string"
}Inviting a user
Sends an invitation to the user with a temporary password to log in to the mobile application.
Authorizations:
Request Body schema: application/jsonrequired
User login to which the invitation will be sent.
| username required | string User login. |
Responses
Response Schema: application/json
| id required | string <uuid> User identifier. |
| phone_number | string Phone number. |
| status required | string (UserStatus) Enum: "active" "inactive" "pending" Result of inviting a user by login. |
| temporary_password required | string Temporary password issued when inviting the user. |
| username required | string User login. |
Request samples
- Payload
{- "username": "string"
}Response samples
- 200
- 400
- 401
- 500
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "phone_number": "string",
- "status": "active",
- "temporary_password": "string",
- "username": "string"
}