API Stability Long-Term

The organization() GraphQL query is used to get the current organization.

For more information on organization settings, see the Organization Settings documentation page.

Syntax

Below is the syntax for the organization() query field:

graphql
organization: Organization!

Enter organization followed by which values you want returned in a comma-separated list within curly-brackets as shown in the example below:

Show:
graphql
query {
  organization {
    id, name, 
    stats{userCount}
  }
}
Example Responses
Show:
json
{
  "data": {
    "organization": {
      "id": "SINGLE_ORGANIZATION_ID",
      "name": "SingleOrganization",
      "stats": {
        "userCount": 13
      }
    }
  }
}

Notice in the example above, besides calling for the id and Name of the organization, stats is given, with the sub-choice userCount to get the number of users.

Returned Datatypes

The datatype organization() has several parameters. Below is a list of them, along with a description of each:

Table: Organization

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 27, 2024
cidstring  Short-TermThe CID corresponding to the organization.
configsOrganizationConfigsyes Short-TermOrganization configurations and settings. See OrganizationDetails.
createdAtlong  Short-TermDate organization was created.
defaultCachePolicyCachePolicy  PreviewThe default cache policy of the organization. See CachePolicy. This is a preview and subject to change.
descriptionstring  Short-TermThe description for the Organization. Can be null.
detailsOrganizationDetailsyes Short-TermAny additional details related to the organization. See OrganizationDetails.
externalGroupSynchronizationbooleanyes Short-TermWhether there is group synchronization.
externalPermissionsbooleanyes Short-TermWhether permissions are managed externally.
idstringyes Short-TermThe unique id for the Organization.
ingestUrlstring  Short-TermThe ingest URL for the organization.
isActionAllowedmultipleyes Short-TermCheck if user has a permission in organization. The datatype consists of (action: OrganizationAction): boolean. For OrganizationAction, give the action to check if a user is allowed to perform on the organization. See OrganizationAction.
limits[Limit]yes Short-TermLimits assigned to the organization. See Limit.
limitsV2[LimitV2]yes Short-TermLimits assigned to the organization. See LimitV2.
namestringyes Short-TermThe name for the Organization.
publicUrlstring  Short-TermThe public URL for the organization.
readonlyDashboardIPFilterstring  Short-TermIP filter for readonly dashboard links.
searchDomains[SearchDomain]yes Short-TermSearch domains within the organization. See SearchDomain.
statsOrganizationStatsyes Short-TermStatistics of the organization. See OrganizationStats.
trialStartedAtlong  Short-TermDate organization's trial started.