Skip to content

Organizations API

Access with client.organizations().

Read organization

DynamicResource org = client.organizations().get(organizationId);

Required scope: organization:read.

The supplied OpenAPI file does not define the organization response schema, so the SDK returns DynamicResource.

List projects

List<Project> projects = client.organizations().listProjects(organizationId);

Required scope: projects:read.

Create project

Project project = client.organizations().createProject(
    organizationId,
    new CreateProjectRequest("Platform", "PLAT")
        .description("Platform engineering work")
);

Required scope: projects:write.

name and key are required. Maximum lengths are 180 and 12 characters. description is optional, nullable, and limited to 5,000 characters.

A new project currently receives the default Open, Hold, In-progress, Pull Request, and Deployed boards.

List documents

OkatanaPage<Document> documents = client.organizations().listDocuments(
    organizationId,
    new ListDocumentsOptions()
        .projectId(projectId)
        .status(DocumentStatus.PUBLISHED)
        .query("runbook")
        .tags(List.of("production", "runbook"))
        .perPage(100)
);

Required scope: documents:read.

Create document

Document document = client.organizations().createDocument(
    organizationId,
    new CreateDocumentRequest("Production runbook")
        .projectId(projectId)
        .status(DocumentStatus.DRAFT)
);

Required scope: documents:write.

Send notification

DynamicResource result = client.organizations().sendNotification(
    organizationId,
    new SendNotificationRequest(userIds, "Deployment changed", "The window starts at 18:00.")
        .url("/app/projects/" + projectId)
);

Required scope: notifications:write. Up to 100 recipients are accepted. url, when set, must be an internal /app path.