User Management API

The goal of the user management API is to allow authenticated users with appropriate permissions to manage new and existing users.

Get Users

GET /users/

This endpoint allows you to get a list of users.

Headers

Name
Type
Description

Authentication

string

Authentication token from Cognito

Get User

GET /users/:id

This endpoint allows you to get a user's details.

Path Parameters

Name
Type
Description

id

string

User Cognito ID

Headers

Name
Type
Description

Authenticaion

string

Authentication token from Cognito

Create User

POST /users/

This endpoint allows you to create a new user. *Requires admin role

Headers

Name
Type
Description

Authentication

string

Authentication token from Cognito

Request Body

Name
Type
Description

date_added

string

An iso date to be provided if you want to override the date the user was created. ISO format: "YYYY-MM-DD HH-MM-SS"

email

string

The users email address. Min. length: 8, max. length: 128

first_name

string

The first name of the user. Only alphanumeric characters, white spaces and hyphens. Min. Length: 1, Max Length: 128

last_name

string

The last name of the user. Only alphanumeric characters, white spaces and hyphens. Min. Length: 1, Max Length: 128

is_coa_staff

boolean

True if the user is part of the City of Austin, False otherwise. If this field is not provided, this is automatically set to True if the email ends with "@austintexas.gov"

status_id

integer

The status of the user, 0 for inactive, 1 for active.

title

string

The job position title of the user.

workgroup

string

The workgroup name. Not empty, min length: 3, max length: 128. Allowed characters: a-z, A-Z, 0-9, and any of these special characters: _-!@%^~?.:&()[]$

workgroup_id

integer

The workgroup_id in the moped_workgroup table in the database.

password

string

The new user's password. Allowed characters: a-z, A-Z, 0-9, and any of these special characters: _-!@%^~?.:&()[]$

roles

array

Array of strings, must be at least one value. It must be at least one of these values: "moped-admin", "moped-editor" or "moped-viewer"

Edit User

PUT /users/:id

This endpoint allows you to create a new user. *Requires admin role

Path Parameters

Name
Type
Description

id

string

Cognito ID (UUID) of the user to be updated.

Headers

Name
Type
Description

Authentication

string

Authentication token from Cognito

Request Body

Name
Type
Description

date_added

string

An iso date to be provided if you want to override the date the user was created. ISO format: "YYYY-MM-DD HH-MM-SS"

email

string

The users email address. Min. length: 8, max. length: 128

first_name

string

The first name of the user. Only alphanumeric characters, white spaces and hyphens. Min. Length: 1, Max Length: 128

last_name

string

The last name of the user. Only alphanumeric characters, white spaces and hyphens. Min. Length: 1, Max Length: 128

is_coa_staff

boolean

True if the user is part of the City of Austin, False otherwise. If this field is not provided, this is automatically set to True if the email ends with "@austintexas.gov"

status_id

integer

The status of the user, 0 for inactive, 1 for active.

title

string

The job position title of the user.

workgroup

string

The workgroup name. Not empty, min length: 3, max length: 128. Allowed characters: a-z, A-Z, 0-9, and any of these special characters: _-!@%^~?.:&()[]$

workgroup_id

integer

The workgroup_id in the moped_workgroup table in the database.

password

string

The new user's password. Allowed characters: a-z, A-Z, 0-9, and any of these special characters: _-!@%^~?.:&()[]$

roles

array

Array of strings, must be at least one value. It must be at least one of these values: "moped-admin", "moped-editor" or "moped-viewer"

Delete User

DELETE /users/:id

This endpoint allows you to delete a user. *Requires admin role

Path Parameters

Name
Type
Description

id

string

User Cognito ID

Headers

Name
Type
Description

Authentication

string

Authentication token from Cognito

Update User Password

PUT /users/:id/password

Path Parameters

Name
Type
Description

id

string

User Cognito ID

Headers

Name
Type
Description

Authentication

string

Authentication token from Cognito

Request Body

Name
Type
Description

password

string

The new user's password. Allowed characters: a-z, A-Z, 0-9, and any of these special characters: _-!@%^~?.:&()[]$

Last updated

Was this helpful?