The searchOrganizations() GraphQL query is used to get paginated search results. This is a root operation.

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

Syntax

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

graphql
searchOrganizations(
      searchFilter: string
      limit: integer
      skip: integer
      typeFilter: [Organizations__SearchEntryType!]
      subscriptionFilter: [Organizations__Subscription!]
      sortBy: Organizations__SortBy!
      orderBy: OrderBy
   ): OrganizationSearchResultSet!

For the input, there are several parameters, with some choices for each special datatype. They're described in the Given Datatypes section below. What to use for the return, for OrganizationSearchResultSet is listed in the Results Datatypes section. Before reviewing those tables, look at this example:

Given Datatypes

The given datatypes are described in the table below:

Table: Mix of Input for searchOrganizations

ParameterTypeRequired[a]DefaultDescription
searchFilterstring  Text on which to search list of organizations for filtering.
limitinteger 50The maximum number of rows to return.
skipinteger 0The initial number of rows to skip; display only rows after number given.
typeFilterOrganizations__SearchEntryTypeyes Indicates the type of data entry by which to filter the organization data.
   Valid Values
   OrganizationFilter results returned on organizations.
   RepositoryFilter results on repository, returning organizations associated with the currently selected repository.
   UserReturn list of users with information on the organizations with which they're associated.
   ViewReturn list of views and the organization to which they belong.
subscriptionFilterOrganizations__Subscriptionyes Return data on organizations that have a given LogScale subscription (e.g., Paying, Trial).
   Valid Values
   Churned
   ClusterOwner
   CommunityLocked
   CommunityUnlocked
   Complementary
   Internal
   MissingTOSAcceptance
   OnPremMonitor
   Partner
   Paying
   PostTrial
   PreTrial
   Trial
   Unknown
   UnlimitedPoC
sortByOrganizations__SortByyes Indicates the field by which to sort the session data returned (e.g., organization names).
   Valid Values
   CreatedAtSort results returned by where organization was created.
   NameSort results by names of organizations.
   SubscriptionSort results by type of LogScale subscriptions.
   UserCountSort results by the total number of users in each organization.
   ViewCountSort results by the number of views associated with each organization.
   VolumeSort results by the volume used by the organization.
orderByOrderBy ASCWhether the results should be returned in ascending or descending order.
   Valid Values
   ASCIn ascending order.
   DESCIn descending order.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Returned Datatypes

The returned datatype OrganizationSearchResultSet has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: OrganizationSearchResultSet

ParameterTypeRequired[a]DefaultDescription
totalResultsintegeryes The total number of matching results.
results[OrganizationSearchResultEntry]yes The paginated result set (see OrganizationSearchResultEntry Table).

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.