Skip to main content
Users
Updated over 2 weeks ago

The users API methods allow you to update a few simple user attributes as well as fetch the details of users who are relevant to DX.

API Methods

users.update

This API allows you to update the start_date, github_username, or gitlab_username of a given user based on their email address.

Required Arguments

Name

Description

email

String - The email address of the user ID you want to update

Optional Arguments

Name

Description

start_date

Date - Formatted in YYYY-MM-DD

github_username

String - The Github username of the user

additional_github_username

String - Useful in the case that a user has an additional github username

gitlab_username

String - The Gitlab username of the user

curl -X POST https://api.getdx.com/users.update -H 'Authorization: Bearer <API_TOKEN_HERE>'

{
"email": "[email protected]",
"start_date": "2024-10-07", // optional
"github_username": "myuser" // optional
"gitlab_username": "myuser" // optional
}

users.listAttributable

This API allows you to retrieve details about the users in your organization. The concept of an "attributable" user means that they are relevant to DX in some way. If any one of the following is true, then a user will be considered "attributable":

  1. They manage a team

  2. They manage someone who belongs to a team

  3. They belong to a team themselves

  4. They’re an admin/observer/interviewer

  5. They have a github/gitlab username

  6. They have is_developer set to true (collected at the time of snapshot)

  7. They have a start_date set

  8. They have any amount of existing attributes assigned to them

Response

Name

Description

users.id

ID - Formatted in YYYY-MM-DD

users.name

String - The Github username of the user

users.github_username

String - The Gitlab username of the user

users.additional_github_username

String - The Github username of the user

users.gitlab_username

String - The Github username of the user

users.developer

Boolean - Whether or not the user is considered someone who 'writes code regularly'

users.tags

Array - List of tags (attributes) that are assigned to a given user

users.deleted_at

Date - When/if the user was deleted

users.start_date

Date - When the user began employment

users.avatar

String - URL of the user's avatar image

Example

curl -X GET https://api.getdx.com/users.listAttributable -H 'Authorization: Bearer <API_TOKEN_HERE>'

{
"ok": true,
"users": [
{
"id": "NTEycDM4",
"name": "Martin Lopez",
"email": "[email protected]",
"github_username": "developer123",
"gitlab_username": null,
"additional_github_username": null,
"developer": false,
"tags": [],
"deleted_at": null,
"start_date": "2008-03-24",
"avatar": null
}
]
}
Did this answer your question?