Searching for Organizations

The GET method without any organization ID searches for organizations by ID, alias, or display name. If no search is specified, it returns a list of all organizations. Searches and listings start from but do not include the logged-in user’s organization or the specified base (rootTenantId).

Method

URL

GET

http://<host>:<port>/jasperserver-pro/rest_v2/organizations?<arguments>

Argument

Type

Description

q

Optional
String

Specify a string or substring to match the organization ID, alias, or name of any organization. The search is not case sensitive. Only the matching organizations are returned in the results, regardless of their hierarchy.

include<br />Parents

Optional
Boolean

When used with a search, the result will include the parent hierarchy of each matching organization. When not specified, this argument is false by default.

rootTenantId

Optional
String

Specifies an organization ID as a base for searching and listing child organizations. The base is not included in the results. Regardless of this base, the tenantFolderURI values in the result are always relative to the logged-in user’s organization. When not specified, the default base is the logged-in user’s organization.

Options

accept: application/xml (default)

accept: application/json

Return Value on Success

Typical Return Values on Failure

200 OK – The content is a set of descriptors for all organizations in the result.

204 No Content – The search did not return any organizations.

The following example shows a search for an organization and its parent hierarchy:

GET http://localhost:8080/jasperserver-pro/rest_v2/organizations?q=acc&inclu...

This request has the following response, as viewed by superuser at the root of the organization hierarchy:

<organizations>
  <organization>
    <alias>Finance</alias>
    <id>Finance</id>
    <parentId>organizations</parentId>
    <tenantDesc></tenantDesc>
    <tenantFolderUri>/organizations/Finance</tenantFolderUri>
    <tenantName>Finance</tenantName>
    <tenantUri>/Finance</tenantUri>
    <theme>default</theme>
  </organization>
  <organization>
    <alias>Accounts</alias>
    <id>Accounts</id>
    <parentId>Finance</parentId>
    <tenantDesc></tenantDesc>
    <tenantFolderUri>/organizations/Finance/organizations/Accounts</tenantFolderUri>
    <tenantName>Accounts</tenantName>
    <tenantUri>/Finance/Accounts</tenantUri>
    <theme>default</theme>
  </organization>
</organizations>
Feedback
randomness