user
Gets or lists a user resource.
Overview​
| Name | user |
| Type | Resource |
| Id | gitlab.users.user |
Fields​
The following fields are returned by SELECT queries:
- get
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
id | string | Global ID of the user. |
name | string | Human-readable name of the user. Returns **** if the user is a project bot and the requester does not have permission to view the project. |
active | boolean | Indicates if the user is active. |
avatar_url | string | URL of the user's avatar. |
bio | string | Bio of the user. |
bot | boolean | Indicates if the user is a bot. |
commit_email | string | User's default commit email. |
composite_identity_enforced | boolean | Indicates if composite identity is enforced for the user. |
created_at | string | Timestamp of when the user was created. |
discord | string | Discord ID of the user. |
github | string | GitHub profile name of the user. |
gitpod_enabled | boolean | Whether Ona is enabled at the user level. |
group_count | integer | Group count for the user. |
human | boolean | Indicates if the user is a regular user. |
job_title | string | Job title of the user. |
last_activity_on | string | Date the user last performed any actions. |
linkedin | string | LinkedIn profile name of the user. |
location | string | Location of the user. |
namespace | object | Namespace identity (id, full_path, name) |
organization | string | Who the user represents or works for. |
preferences_gitpod_path | string | Web path to the Ona section within user preferences. |
profile_enable_gitpod_path | string | Web path to enable Ona for the user. |
project_count | integer | Project count for the user. |
pronouns | string | Pronouns of the user. |
public_email | string | User's public email. |
state | string | State of the user. (active, blocked, deactivated, banned, ldap_blocked, blocked_pending_approval) |
twitter | string | X (formerly Twitter) username of the user. |
type | string | Type of the user. (HUMAN, SUPPORT_BOT, ALERT_BOT, VISUAL_REVIEW_BOT, SERVICE_USER, GHOST, PROJECT_BOT, SECURITY_BOT, AUTOMATION_BOT, SECURITY_POLICY_BOT, ADMIN_BOT, SERVICE_ACCOUNT, PLACEHOLDER, DUO_CODE_REVIEW_BOT, IMPORT_USER) |
username | string | Username of the user. Unique within the instance of GitLab. |
web_path | string | Web path of the user. |
web_url | string | Web URL of the user. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | host | id, username | Find a user. Generated from the GitLab GraphQL schema field Query.user (UserCore). |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
host | string | GitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST) |
id | string | ID of the User. |
username | string | Username of the User. |
SELECT examples​
- get
Find a user. Generated from the GitLab GraphQL schema field Query.user (UserCore).
SELECT
id,
name,
active,
avatar_url,
bio,
bot,
commit_email,
composite_identity_enforced,
created_at,
discord,
github,
gitpod_enabled,
group_count,
human,
job_title,
last_activity_on,
linkedin,
location,
namespace,
organization,
preferences_gitpod_path,
profile_enable_gitpod_path,
project_count,
pronouns,
public_email,
state,
twitter,
type,
username,
web_path,
web_url
FROM gitlab.users.user
WHERE host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND id = '{{ id }}'
AND username = '{{ username }}'
;