Skip to main content

current_license

Gets or lists a current_license resource.

Overview​

Namecurrent_license
TypeResource
Idgitlab.metadata.current_license

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringID of the license extracted from the license data.
namestringName of the licensee.
activated_atstringDate when the license was activated.
billable_users_countintegerNumber of billable users on the system.
block_changes_atstringDate when licensed features will be blocked.
companystringCompany of the licensee.
created_atstringDate when the license was added.
emailstringEmail of the licensee.
expires_atstringDate when the license expires.
has_gitlab_credits_add_onbooleanWhether the license has an active GitLab Credits add-on.
last_syncstringDate when the license was last synced.
maximum_user_countintegerHighest number of billable users on the system during the term of the current license.
planstringName of the subscription plan.
starts_atstringDate when the license started.
trialbooleanIndicates if the license is a trial.
typestringType of the license.
users_in_license_countintegerNumber of paid users in the license.
users_over_license_countintegerNumber of users over the paid users in the license.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselecthostFields related to the current license. Generated from the GitLab GraphQL schema field Query.currentLicense (CurrentLicense).

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.

NameDatatypeDescription
hoststringGitLab 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)

SELECT examples​

Fields related to the current license. Generated from the GitLab GraphQL schema field Query.currentLicense (CurrentLicense).

SELECT
id,
name,
activated_at,
billable_users_count,
block_changes_at,
company,
created_at,
email,
expires_at,
has_gitlab_credits_add_on,
last_sync,
maximum_user_count,
plan,
starts_at,
trial,
type,
users_in_license_count,
users_over_license_count
FROM gitlab.metadata.current_license
WHERE host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;