Users

GET /users/me #

Get My User Info

Parameters

Name In Type Description
X-Mantis-Username header string Username to impersonate for this request. Requires an authorized API token.
select query string Comma-separated list of user fields to return. e.g. id,name,real_name,email,access_level

Responses

  • 200 Success ETag X-Mantis-Username X-Mantis-LoginMethod X-Mantis-Version
    "string"
  • 400 Bad Request
  • 401 Authentication is required or the supplied API token is invalid. WWW-Authenticate
  • 403 The authenticated user is not authorized for this operation, impersonation, or API access level.
  • 404 Entity not found
  • 503 MantisHub is temporarily unavailable and cannot process API requests.
cURL
curl -X GET \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/users/me
GET /users #

Get users

Returns users visible to the effective user.

Parameters

Name In Type Description
X-Mantis-Username header string Username to impersonate for this request. Requires an authorized API token.
select query string Comma-separated list of user fields to return. e.g. id,name,real_name,email,access_level

Responses

  • 200 Success ETag X-Mantis-Username X-Mantis-LoginMethod X-Mantis-Version
    "string"
  • 400 Bad Request
  • 401 Authentication is required or the supplied API token is invalid. WWW-Authenticate
  • 403 The authenticated user is not authorized for this operation, impersonation, or API access level.
  • 404 Entity not found
  • 503 MantisHub is temporarily unavailable and cannot process API requests.
cURL
curl -X GET \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/users
POST /users #

Create a user

Parameters

Name In Type Description
X-Mantis-Username header string Username to impersonate for this request. Requires an authorized API token.

Request body required

password string

Responses

  • 201 Resource created successfully X-Mantis-Username X-Mantis-LoginMethod X-Mantis-Version
    "string"
  • 400 Bad Request
  • 401 Authentication is required or the supplied API token is invalid. WWW-Authenticate
  • 403 The authenticated user is not authorized for this operation, impersonation, or API access level.
  • 404 Entity not found
  • 503 MantisHub is temporarily unavailable and cannot process API requests.
cURL
curl -X POST \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  -H "Content-Type: application/json" \
  https://yourmantishubname.mantishub.io/api/rest/users \
  -d '{
    "password": "string"
}'
Request body · application/json
{
    "password": "string"
}
GET /users/{user_id} #

Get User By Id

Parameters

Name In Type Description
user_id required path integer The user ID e.g. 5
X-Mantis-Username header string Username to impersonate for this request. Requires an authorized API token.
select query string e.g. id,name,real_name,email,access_level

Responses

  • 200 Success ETag X-Mantis-Username X-Mantis-LoginMethod X-Mantis-Version
    "string"
  • 400 Bad Request
  • 401 Authentication is required or the supplied API token is invalid. WWW-Authenticate
  • 403 The authenticated user is not authorized for this operation, impersonation, or API access level.
  • 404 Entity not found
  • 503 MantisHub is temporarily unavailable and cannot process API requests.
cURL
curl -X GET \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/users/5
PATCH /users/{user_id} #

Update User

Parameters

Name In Type Description
user_id required path integer The user ID e.g. 5
X-Mantis-Username header string Username to impersonate for this request. Requires an authorized API token.

Request body required

id integer
name string
real_name string
email string
access_level string
enabled boolean
protected boolean
language string
timezone string
created_at string · date-time

Responses

  • 200 Success ETag X-Mantis-Username X-Mantis-LoginMethod X-Mantis-Version
    "string"
  • 400 Bad Request
  • 401 Authentication is required or the supplied API token is invalid. WWW-Authenticate
  • 403 The authenticated user is not authorized for this operation, impersonation, or API access level.
  • 404 Entity not found
  • 503 MantisHub is temporarily unavailable and cannot process API requests.
cURL
curl -X PATCH \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  -H "Content-Type: application/json" \
  https://yourmantishubname.mantishub.io/api/rest/users/5 \
  -d '{
    "id": 1,
    "name": "string",
    "real_name": "string",
    "email": "string",
    "access_level": "string",
    "enabled": true,
    "protected": true,
    "language": "string",
    "timezone": "string",
    "created_at": "string"
}'
Request body · application/json
{
    "id": 1,
    "name": "string",
    "real_name": "string",
    "email": "string",
    "access_level": "string",
    "enabled": true,
    "protected": true,
    "language": "string",
    "timezone": "string",
    "created_at": "string"
}
DELETE /users/{user_id} #

Delete a user

Parameters

Name In Type Description
user_id required path integer The user ID e.g. 5
X-Mantis-Username header string Username to impersonate for this request. Requires an authorized API token.

Responses

  • 204 Operation completed successfully with no response body X-Mantis-Username X-Mantis-LoginMethod X-Mantis-Version
  • 400 Bad Request
  • 401 Authentication is required or the supplied API token is invalid. WWW-Authenticate
  • 403 The authenticated user is not authorized for this operation, impersonation, or API access level.
  • 404 Entity not found
  • 503 MantisHub is temporarily unavailable and cannot process API requests.
cURL
curl -X DELETE \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/users/5
GET /users/username/{username} #

Get User By Username

Parameters

Name In Type Description
username required path string
X-Mantis-Username header string Username to impersonate for this request. Requires an authorized API token.
select query string e.g. id,name,real_name,email

Responses

  • 200 Success ETag X-Mantis-Username X-Mantis-LoginMethod X-Mantis-Version
    "string"
  • 400 Bad Request
  • 401 Authentication is required or the supplied API token is invalid. WWW-Authenticate
  • 403 The authenticated user is not authorized for this operation, impersonation, or API access level.
  • 404 Entity not found
  • 503 MantisHub is temporarily unavailable and cannot process API requests.
cURL
curl -X GET \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/users/username/value
PUT /users/{id}/reset #

Reset user password

Parameters

Name In Type Description
id required path integer The user ID.
X-Mantis-Username header string Username to impersonate for this request. Requires an authorized API token.

Responses

  • 204 Operation completed successfully with no response body X-Mantis-Username X-Mantis-LoginMethod X-Mantis-Version
  • 400 Bad Request
  • 401 Authentication is required or the supplied API token is invalid. WWW-Authenticate
  • 403 The authenticated user is not authorized for this operation, impersonation, or API access level.
  • 404 Entity not found
  • 503 MantisHub is temporarily unavailable and cannot process API requests.
cURL
curl -X PUT \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/users/1/reset