Skip to main content

Users

This guide serves as an introduction to how account administrators can create and modify users.

Permissions level required:

Admin

Add a new user

POST https://api.maxar.com/account-service/api/v2/users/mgp

To add a new user, you need the user's first name, last name, and email address. You will also need your account_id and activationId. These two values can be found by submitting the "Get details for account" and "Get a list of available activations" calls respectively, and copying down the id value. Below is a table of all possible variables and their acceptable values.

fieldaccepted values
"email_address"The user's valid email address
"user_type""BASE_USER", "ACCOUNT_ADMIN"
"account_id"{{account_id}}
"id"{{activationId}}
"is_active"true, false
"first_name"Any first name
"last_name"Any last name
"daily_credit_limit_total"(Optional) Any positive number below "credit_limit" or -1. If left out or set to -1, it becomes Unlimited.
"credit_limit"(Optional) Any positive number above "daily_credit_limit_total". If left out or set to -1, it becomes Unlimited.
{
"email_address": "string",
"user_type": "BASE_USER",
"account_id": int,
"activations": [
{
"id": int,
"account_id": int
}
],
"is_active": true,
"first_name": "string",
"last_name": "string",
"daily_credit_limit_total": float,
"credit_limit": float
}

Update a user

PUT https://api.maxar.com/account-service/api/v2/users

Use the same information from the Add a New User call in the request body of a PUT request to update a user's details.

Get a list of users

GET https://api.maxar.com/account-service/api/v2/users

This request does not require any parameters or a body. It returns a list of all users associated with your account and their associated information.

Send a password reset email

PUT https://api.maxar.com/account-service/api/v2/users/{user_id}/credentials/reset

This request requires a user's user_id. To get their ID, submit a "Get a list of users" and find the user whose password needs to be reset. Copy down the desired user's user_id value and use it as a value in the request. After you submit the request, the user will immediately receive a password reset email. The link in this password reset email will expire after 3 days.

Get a user by username

GET https://api.maxar.com/account-service/api/v2/users/username/{username}

This call requires a user's username. To get their username, submit a "Get a list of users". Copy down the desired user's username value and use it as a value in the request. The username will be the user's email address. This returns all information associated with that user.

Delete a user

DEL https://api.maxar.com/account-service/api/v2/{user_id}

This request requires the user's user_id. Submit a "Get a list of users" request and copy down the desired user's user_id value. Input this value as the user_id and submit the request. This will immediately delete the user.

Get a list of users' usage

GET https://api.maxar.com/account-service/api/v2/users/usage

This request does not require any parameters or a body. It returns a list of all users' usage.

Get georestrictions

GET https://api.maxar.com/account-service/api/v2/users/{user_id}/georestrictions

This request requires a user's user_id. Submit a "Get a list of users" request and copy down the desired user's user_id value. Input this value as the user_id and submit the request. This returns a list of all georestrictions associated with that user.

Get georestriction masks

https://api.maxar.com/account-service/api/v2/users/georestrictions/mask?client_id=mgp

This requests returns all georestriction masks associated with your account.

Export user data

GET https://api.maxar.com/account-service/api/v2/users/export

This request exports all users' data associated with your account.

fieldaccepted values
"page"An integer
"page_size"An integer
"sort_by"Any list of strings, separated by a comma
"sort_direction""ASC" or "DESC"
"search"Any string to filter search
"include_soft_deleted"true or false
"email_verified"true or false

User roles (permissions)

User roles, also sometimes called User permissions, are inherited from the roles associated with the activation applied to the user's account. In the MGP Pro UI, these roles are called "Permissions". If you need to assign new roles to or remove roles associated with a user, you can do so by submitting an "Assign Roles to a User" or a "Remove Roles from a User" request.

Before submitting either of these calls, you can check what roles are already associated with a user by submitting the "Get All Roles available to a User" request request. For both of these calls, you will need the user's "user_id" which can be found by submit a "Get a list of users" and finding the user whose roles needs to be changed. Copy down the desired user's user_id value and use it as a value in these calls.

Get all assigned and available roles for a user

https://api.maxar.com/account-service/api/v2/users/roles/assigned-available/{user_id}

This request requires a user's "user_id". It returns a list of all roles that are currently assigned to that user and the roles that can be assigned to that user.

Assigning roles

POST https://api.maxar.com/account-service/api/v2/users/{user_id}/assign-roles

To assign a new role to a user you need to know the user's "user_id, the role's "RoleId", and the role's"AccountRoleName". You can find the user's "user_id" by submitting the "Get a list of users" request and copying down the correct "user_id". You can find the role's "RoleId" and "AccountRoleName" by submitting the "Get all Assigned and Available Roles" request and copying down the "id" and "name" values for the role you wish to assign.

Paste the user's "user_id" as a variable in the URL path and add the role's "RoleId" and "AccountRoleName" to the body of your POST request as shown in the example below. Submit your request and the user will now have updated roles assigned to them.

[
{
"id":"RoleID",
"name":"accountRoleName"
}

]

Removing roles

POST https://api.maxar.com/account-service/api/v2/users/{user_id}/remove-roles

To remove a role from a user you need to know the user's "user_id and the role's "RoleId" and "AccountRoleName". You can find the user's "user_id" by submitting the "Get a list of users" request and copying down the correct "user_id". You can find the role's "RoleId" and "AccountRoleName" by submitting the "Get Assigned Roles to a User" request and copying down the "id" and "name" values for the role you wish to remove.

Paste the user's "user_id" as a variable in the URL path and add the role's "RoleId" and "AccountRoleName" to the body of your POST request as shown in the example below. Submit your request and the user will now have updated roles assigned to them.

[
{
"id":"RoleID",
"name":"accountRoleName"
}

]