Skip to content
Get started

List organizations with pagination

OrgListPage orgs().list(OrgListParamsparams = OrgListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
get/v1/orgs

Retrieves a paginated list of organizations with optional filtering by name. Returns up to 100 organizations per request.

ParametersExpand Collapse
OrgListParams params
Optional<String> cursor

Base64 encoded cursor from previous response

Optional<Double> limit

Number of results to return (1-100)

minimum1
maximum100
ReturnsExpand Collapse
class OrgListResponse:

An organization entity that groups users and studies

Optional<LocalDateTime> createdAt

Timestamp when the organization was created

formatdate-time
boolean isActive

Whether the organization is currently active

String orgId

Unique organization identifier. Format: org_{32-hex-chars}

String orgName

Name of the organization

minLength1
Optional<LocalDateTime> updatedAt

Timestamp when the organization was last updated

formatdate-time
long userCount

Number of users currently in this organization

minimum0
Optional<String> createdByApiKeyId

UUID of the API key used to create this organization, for audit tracking

formatuuid
Optional<String> createdByUserId

User ID who created this organization via dashboard, null if created via API key

Optional<Metadata> metadata

Custom key-value metadata for the organization. Maximum 50 pairs, keys up to 100 chars, values up to 1000 chars

List organizations with pagination
package com.avara.example;

import com.avara.client.AvaraClient;
import com.avara.client.okhttp.AvaraOkHttpClient;
import com.avara.models.orgs.OrgListPage;
import com.avara.models.orgs.OrgListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AvaraClient client = AvaraOkHttpClient.fromEnv();

        OrgListPage page = client.orgs().list();
    }
}
{
  "hasMore": true,
  "organizations": [
    {
      "createdAt": "2024-01-15T09:00:00Z",
      "isActive": true,
      "orgId": "org_1234567890abcdef1234567890abcdef",
      "orgName": "City Medical Center - Radiology Department",
      "updatedAt": "2024-03-15T14:20:00Z",
      "userCount": 15,
      "createdByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
      "createdByUserId": "usr_1234567890abcdef1234567890abcdef",
      "metadata": {
        "department": "radiology",
        "region": "northeast"
      }
    }
  ],
  "cursor": "cursor"
}
Returns Examples
{
  "hasMore": true,
  "organizations": [
    {
      "createdAt": "2024-01-15T09:00:00Z",
      "isActive": true,
      "orgId": "org_1234567890abcdef1234567890abcdef",
      "orgName": "City Medical Center - Radiology Department",
      "updatedAt": "2024-03-15T14:20:00Z",
      "userCount": 15,
      "createdByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
      "createdByUserId": "usr_1234567890abcdef1234567890abcdef",
      "metadata": {
        "department": "radiology",
        "region": "northeast"
      }
    }
  ],
  "cursor": "cursor"
}