---
title: ObjectsApi
---
## PureCloud::ObjectsApi
All URIs are relative to *https://api.mypurecloud.com*
Method | Description
------------- | ------------- | -------------
[**delete_authorization_division**](ObjectsApi.html#delete_authorization_division) | Delete a division.
[**get_authorization_division**](ObjectsApi.html#get_authorization_division) | Returns an authorization division.
[**get_authorization_divisions**](ObjectsApi.html#get_authorization_divisions) | Retrieve a list of all divisions defined for the organization
[**get_authorization_divisions_home**](ObjectsApi.html#get_authorization_divisions_home) | Retrieve the home division for the organization.
[**get_authorization_divisions_limit**](ObjectsApi.html#get_authorization_divisions_limit) | Returns the maximum allowed number of divisions.
[**post_authorization_division_object**](ObjectsApi.html#post_authorization_division_object) | Assign a list of objects to a division
[**post_authorization_divisions**](ObjectsApi.html#post_authorization_divisions) | Create a division.
[**put_authorization_division**](ObjectsApi.html#put_authorization_division) | Update a division.
{: class="table table-striped"}
## delete_authorization_division(division_id, opts)
Delete a division.
Wraps DELETE /api/v2/authorization/divisions/{divisionId}
Requires ANY permissions:
* authorization:division:delete
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::ObjectsApi.new
division_id = "division_id_example" # String | Division ID
opts = {
force: false # BOOLEAN | Force delete this division as well as the grants and objects associated with it
}
begin
#Delete a division.
api_instance.delete_authorization_division(division_id, opts)
rescue PureCloud::ApiError => e
puts "Exception when calling ObjectsApi->delete_authorization_division: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**division_id** | **String**| Division ID | |
**force** | **BOOLEAN**| Force delete this division as well as the grants and objects associated with it | [optional] [default to false] |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**AuthzDivision**](AuthzDivision.html) get_authorization_division(division_id, opts)
Returns an authorization division.
Wraps GET /api/v2/authorization/divisions/{divisionId}
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::ObjectsApi.new
division_id = "division_id_example" # String | Division ID
opts = {
object_count: false # BOOLEAN | Get count of objects in this division, grouped by type
}
begin
#Returns an authorization division.
result = api_instance.get_authorization_division(division_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ObjectsApi->get_authorization_division: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**division_id** | **String**| Division ID | |
**object_count** | **BOOLEAN**| Get count of objects in this division, grouped by type | [optional] [default to false] |
{: class="table table-striped"}
### Return type
[**AuthzDivision**](AuthzDivision.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**AuthzDivisionEntityListing**](AuthzDivisionEntityListing.html) get_authorization_divisions(opts)
Retrieve a list of all divisions defined for the organization
Request specific divisions by id using a query param \"id\", e.g. ?id=5f777167-63be-4c24-ad41-374155d9e28b&id=72e9fb25-c484-488d-9312-7acba82435b3
Wraps GET /api/v2/authorization/divisions
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::ObjectsApi.new
opts = {
page_size: 25, # Integer | The total page size requested
page_number: 1, # Integer | The page number requested
sort_by: "sort_by_example", # String | variable name requested to sort by
expand: nil, # Array