Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Organizations

The Organizations feature in Kantata OX is composed of two independent trees: Department and Geography. Each has its own hierarchy structure. Users and Workspaces are associated to exact positions in these two trees via Organization Memberships. The corresponding API fields are geography_id and department_id.

A user's position in these two trees determines what objects they can see in Kantata OX—they can see objects associated with every department and geography going up the hierarchy from their selected department and geography.

Fetching a list of Organizations

This endpoint returns structured Organization objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the organizations top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
created_after
string <date-time>

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_before
string <date-time>

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

for_current_user
boolean

Filter for organizations the current user belongs to. The parameter value is ignored (i.e. regardless of the value you supply, including this filter will always filter by organizations the current user belongs to).

matching
string

Where organization name is like specified parameter.

only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

order
string
Default: "alphabetical:asc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: alphabetical:asc, alphabetical:desc, created_at:asc, and created_at:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
type
string

Where the organization is of a specified type.

updated_after
string <date-time>

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_before
string <date-time>

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

Responses
200

A list of Organizations have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/organizations
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "organizations": {
    }
}

Creating a new Organization

This endpoint returns structured Organization objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the organizations top-level JSON key. Please see our Response Format section for more information.

Request
Request Body schema: application/json
required
object
name
required
string

The name of the organization.

parent_id
required
integer <int32>

The id of the parent organization.

Responses
200

Organization has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/organizations
Request samples
application/json
{
  • "organization": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "organizations": {
    }
}

Fetching a single Organization

This endpoint returns structured Organization objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the organizations top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
200

The Organization has been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/organizations/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "organizations": {
    }
}

Updating an existing Organization

This endpoint returns structured Organization objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the organizations top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

Request Body schema: application/json
required
object
name
string

The name of the organization.

parent_id
integer <int32>

The id of the parent organization being created.

Responses
200

Organization has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/organizations/{id}
Request samples
application/json
{
  • "organization": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "organizations": {
    }
}

Deleting an existing Organization

The response will contain no content and an HTTP 204 status code if the request was successful, or a standard Kantata OX error message explaining why the object could not be deleted.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
204

Organization has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/organizations/{id}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}