This repository was archived by the owner on Jan 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Sub Organizations
Johnathan Ludwig edited this page Jan 27, 2015
·
1 revision
List a pageable response of 25 records per page.
api.sub_organizations.list
> [
{
"id" => 1,
"organization_id" => 1,
"name" => "Test",
"created_at" => "2014-06-23T18:53:25.531Z",
"updated_at" => "2014-09-03T12:32:50.472Z"
}
]Show a specific sub organization
| Name | Type | Description |
|---|---|---|
| id | integer | Required. The ID of the record. |
api.sub_organizations.show(id: 1)
> {
"id" => 1,
"organization_id" => 1,
"name" => "Test",
"created_at" => "2014-06-23T18:53:25.531Z",
"updated_at" => "2014-09-03T12:32:50.472Z"
}Update the name of a specific sub organization
| Name | Type | Description |
|---|---|---|
| id | integer | Required. The ID of the record. |
| name | string | Required. The new name for the record. |
api.sub_organizations.update(id: 1, name: 'Test')
> {
"id" => 1,
"organization_id" => 1,
"name" => "Test",
"created_at" => "2014-06-23T18:53:25.531Z",
"updated_at" => "2014-09-24T18:37:02.252Z"
}Create a new sub organization
| Name | Type | Description |
|---|---|---|
| name | string | Required. The name of the record. |
api.sub_organizations.create(name: 'Test')
> {
"id" => 3,
"organization_id" => 1,
"name" => "Test",
"created_at" => "2014-09-24T18:39:25.493Z",
"updated_at" => "2014-09-24T18:39:25.493Z"
}Destroy a sub organization
Note: This action will also destroy every team, external account, and report under the sub organization.
| Name | Type | Description |
|---|---|---|
| id | integer | Required. The ID of the record. |
api.sub_organizations.destroy(id: 3)
> {
"success" => "Test has been destroyed"
}