---
title: ContentManagementApi
---
## PureCloud::ContentManagementApi
All URIs are relative to *https://api.mypurecloud.com*
Method | HTTP request | Description
------------- | ------------- | -------------
|[**delete_documents_document_id**](ContentManagementApi.html#delete_documents_document_id) | **DELETE** /api/v2/contentmanagement/documents/{documentId} | Delete a document.|
|[**delete_shares_share_id**](ContentManagementApi.html#delete_shares_share_id) | **DELETE** /api/v2/contentmanagement/shares/{shareId} | Deletes an existing share.|
|[**delete_status_status_id**](ContentManagementApi.html#delete_status_status_id) | **DELETE** /api/v2/contentmanagement/status/{statusId} | Cancel the command for this status|
|[**delete_workspaces_workspace_id**](ContentManagementApi.html#delete_workspaces_workspace_id) | **DELETE** /api/v2/contentmanagement/workspaces/{workspaceId} | Delete a workspace|
|[**delete_workspaces_workspace_id_members_member_id**](ContentManagementApi.html#delete_workspaces_workspace_id_members_member_id) | **DELETE** /api/v2/contentmanagement/workspaces/{workspaceId}/members/{memberId} | Delete a member from a workspace|
|[**delete_workspaces_workspace_id_tagvalues_tag_id**](ContentManagementApi.html#delete_workspaces_workspace_id_tagvalues_tag_id) | **DELETE** /api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId} | Delete workspace tag|
|[**get_documents**](ContentManagementApi.html#get_documents) | **GET** /api/v2/contentmanagement/documents | Get a list of documents.|
|[**get_documents_document_id**](ContentManagementApi.html#get_documents_document_id) | **GET** /api/v2/contentmanagement/documents/{documentId} | Get a document.|
|[**get_documents_document_id_audits**](ContentManagementApi.html#get_documents_document_id_audits) | **GET** /api/v2/contentmanagement/documents/{documentId}/audits | Get a list of audits for a document.|
|[**get_documents_document_id_content**](ContentManagementApi.html#get_documents_document_id_content) | **GET** /api/v2/contentmanagement/documents/{documentId}/content | Download a document.|
|[**get_query**](ContentManagementApi.html#get_query) | **GET** /api/v2/contentmanagement/query | Query content|
|[**get_securityprofiles**](ContentManagementApi.html#get_securityprofiles) | **GET** /api/v2/contentmanagement/securityprofiles | Get a List of Security Profiles|
|[**get_securityprofiles_securityprofile_id**](ContentManagementApi.html#get_securityprofiles_securityprofile_id) | **GET** /api/v2/contentmanagement/securityprofiles/{securityProfileId} | Get a Security Profile|
|[**get_shared_shared_id**](ContentManagementApi.html#get_shared_shared_id) | **GET** /api/v2/contentmanagement/shared/{sharedId} | Get shared documents. Securely download a shared document.|
|[**get_shares**](ContentManagementApi.html#get_shares) | **GET** /api/v2/contentmanagement/shares | Gets a list of shares. You must specify at least one filter (e.g. entityId).|
|[**get_shares_share_id**](ContentManagementApi.html#get_shares_share_id) | **GET** /api/v2/contentmanagement/shares/{shareId} | Retrieve details about an existing share.|
|[**get_status**](ContentManagementApi.html#get_status) | **GET** /api/v2/contentmanagement/status | Get a list of statuses for pending operations|
|[**get_status_status_id**](ContentManagementApi.html#get_status_status_id) | **GET** /api/v2/contentmanagement/status/{statusId} | Get a status.|
|[**get_usage**](ContentManagementApi.html#get_usage) | **GET** /api/v2/contentmanagement/usage | Get usage details.|
|[**get_workspaces**](ContentManagementApi.html#get_workspaces) | **GET** /api/v2/contentmanagement/workspaces | Get a list of workspaces.|
|[**get_workspaces_workspace_id**](ContentManagementApi.html#get_workspaces_workspace_id) | **GET** /api/v2/contentmanagement/workspaces/{workspaceId} | Get a workspace.|
|[**get_workspaces_workspace_id_members**](ContentManagementApi.html#get_workspaces_workspace_id_members) | **GET** /api/v2/contentmanagement/workspaces/{workspaceId}/members | Get a list workspace members|
|[**get_workspaces_workspace_id_members_member_id**](ContentManagementApi.html#get_workspaces_workspace_id_members_member_id) | **GET** /api/v2/contentmanagement/workspaces/{workspaceId}/members/{memberId} | Get a workspace member|
|[**get_workspaces_workspace_id_tagvalues**](ContentManagementApi.html#get_workspaces_workspace_id_tagvalues) | **GET** /api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues | Get a list of workspace tags|
|[**get_workspaces_workspace_id_tagvalues_tag_id**](ContentManagementApi.html#get_workspaces_workspace_id_tagvalues_tag_id) | **GET** /api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId} | Get a workspace tag|
|[**post_auditquery**](ContentManagementApi.html#post_auditquery) | **POST** /api/v2/contentmanagement/auditquery | Query audits|
|[**post_documents**](ContentManagementApi.html#post_documents) | **POST** /api/v2/contentmanagement/documents | Add a document.|
|[**post_documents_document_id**](ContentManagementApi.html#post_documents_document_id) | **POST** /api/v2/contentmanagement/documents/{documentId} | Update a document.|
|[**post_documents_document_id_content**](ContentManagementApi.html#post_documents_document_id_content) | **POST** /api/v2/contentmanagement/documents/{documentId}/content | Replace the contents of a document.|
|[**post_query**](ContentManagementApi.html#post_query) | **POST** /api/v2/contentmanagement/query | Query content|
|[**post_shares**](ContentManagementApi.html#post_shares) | **POST** /api/v2/contentmanagement/shares | Creates a new share or updates an existing share if the entity has already been shared|
|[**post_workspaces**](ContentManagementApi.html#post_workspaces) | **POST** /api/v2/contentmanagement/workspaces | Create a group workspace|
|[**post_workspaces_workspace_id_tagvalues**](ContentManagementApi.html#post_workspaces_workspace_id_tagvalues) | **POST** /api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues | Create a workspace tag|
|[**post_workspaces_workspace_id_tagvalues_query**](ContentManagementApi.html#post_workspaces_workspace_id_tagvalues_query) | **POST** /api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/query | Perform a prefix query on tags in the workspace|
|[**put_workspaces_workspace_id**](ContentManagementApi.html#put_workspaces_workspace_id) | **PUT** /api/v2/contentmanagement/workspaces/{workspaceId} | Update a workspace|
|[**put_workspaces_workspace_id_members_member_id**](ContentManagementApi.html#put_workspaces_workspace_id_members_member_id) | **PUT** /api/v2/contentmanagement/workspaces/{workspaceId}/members/{memberId} | Add a member to a workspace|
|[**put_workspaces_workspace_id_tagvalues_tag_id**](ContentManagementApi.html#put_workspaces_workspace_id_tagvalues_tag_id) | **PUT** /api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId} | Update a workspace tag. Will update all documents with the new tag value.|
{: class="table table-striped"}
## - delete_documents_document_id(document_id, opts)
Delete a document.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
document_id = "document_id_example" # String | Document ID
opts = {
override: true # BOOLEAN | Override any lock on the document
}
begin
#Delete a document.
api_instance.delete_documents_document_id(document_id, opts)
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->delete_documents_document_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**document_id** | **String**| Document ID |
**override** | **BOOLEAN**| Override any lock on the document | [optional]
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## - delete_shares_share_id(share_id)
Deletes an existing share.
This revokes sharing rights specified in the share record
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
share_id = "share_id_example" # String | Share ID
begin
#Deletes an existing share.
api_instance.delete_shares_share_id(share_id)
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->delete_shares_share_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**share_id** | **String**| Share ID |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## - delete_status_status_id(status_id)
Cancel the command for this status
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
status_id = "status_id_example" # String | Status ID
begin
#Cancel the command for this status
api_instance.delete_status_status_id(status_id)
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->delete_status_status_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status_id** | **String**| Status ID |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## - delete_workspaces_workspace_id(workspace_id, opts)
Delete a workspace
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
opts = {
move_children_to_workspace_id: "move_children_to_workspace_id_example" # String | New location for objects in deleted workspace.
}
begin
#Delete a workspace
api_instance.delete_workspaces_workspace_id(workspace_id, opts)
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->delete_workspaces_workspace_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**move_children_to_workspace_id** | **String**| New location for objects in deleted workspace. | [optional]
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## - delete_workspaces_workspace_id_members_member_id(workspace_id, member_id)
Delete a member from a workspace
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
member_id = "member_id_example" # String | Member ID
begin
#Delete a member from a workspace
api_instance.delete_workspaces_workspace_id_members_member_id(workspace_id, member_id)
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->delete_workspaces_workspace_id_members_member_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**member_id** | **String**| Member ID |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## - delete_workspaces_workspace_id_tagvalues_tag_id(workspace_id, tag_id)
Delete workspace tag
Delete a tag from a workspace. Will remove this tag from all documents.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
tag_id = "tag_id_example" # String | Tag ID
begin
#Delete workspace tag
api_instance.delete_workspaces_workspace_id_tagvalues_tag_id(workspace_id, tag_id)
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->delete_workspaces_workspace_id_tagvalues_tag_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**tag_id** | **String**| Tag ID |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DocumentEntityListing**](DocumentEntityListing.html) get_documents(workspace_id, opts)
Get a list of documents.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
opts = {
name: "name_example", # String | Name
expand: "expand_example", # String | Expand some document fields
page_size: 25, # Integer | Page size
page_number: 1, # Integer | Page number
sort_by: "sort_by_example", # String | name or dateCreated
sort_order: "ascending" # String | ascending or descending
}
begin
#Get a list of documents.
result = api_instance.get_documents(workspace_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_documents: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**name** | **String**| Name | [optional]
**expand** | **String**| Expand some document fields | [optional]
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
**sort_by** | **String**| name or dateCreated | [optional]
**sort_order** | **String**| ascending or descending | [optional] [default to ascending]
{: class="table table-striped"}
### Return type
[**DocumentEntityListing**](DocumentEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Document**](Document.html) get_documents_document_id(document_id, opts)
Get a document.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
document_id = "document_id_example" # String | Document ID
opts = {
expand: "expand_example" # String | Expand some document fields
}
begin
#Get a document.
result = api_instance.get_documents_document_id(document_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_documents_document_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**document_id** | **String**| Document ID |
**expand** | **String**| Expand some document fields | [optional]
{: class="table table-striped"}
### Return type
[**Document**](Document.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DocumentAuditEntityListing**](DocumentAuditEntityListing.html) get_documents_document_id_audits(document_id, opts)
Get a list of audits for a document.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
document_id = "document_id_example" # String | Document ID
opts = {
page_size: 25, # Integer | Page size
page_number: 1, # Integer | Page number
transaction_filter: "transaction_filter_example", # String | Transaction filter
level: "USER", # String | level
sort_by: "sort_by_example", # String | Sort by
sort_order: "ascending" # String | Sort order
}
begin
#Get a list of audits for a document.
result = api_instance.get_documents_document_id_audits(document_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_documents_document_id_audits: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**document_id** | **String**| Document ID |
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
**transaction_filter** | **String**| Transaction filter | [optional]
**level** | **String**| level | [optional] [default to USER]
**sort_by** | **String**| Sort by | [optional]
**sort_order** | **String**| Sort order | [optional] [default to ascending]
{: class="table table-striped"}
### Return type
[**DocumentAuditEntityListing**](DocumentAuditEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## - get_documents_document_id_content(document_id, opts)
Download a document.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
document_id = "document_id_example" # String | Document ID
opts = {
disposition: "disposition_example", # String | Request how the content will be downloaded: attached as a file or inline. Default is attachment.
content_type: "content_type_example" # String | The requested format for the specified document. If supported, the document will be returned in that format. Example contentType=audio/wav
}
begin
#Download a document.
api_instance.get_documents_document_id_content(document_id, opts)
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_documents_document_id_content: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**document_id** | **String**| Document ID |
**disposition** | **String**| Request how the content will be downloaded: attached as a file or inline. Default is attachment. | [optional]
**content_type** | **String**| The requested format for the specified document. If supported, the document will be returned in that format. Example contentType=audio/wav | [optional]
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**QueryResults**](QueryResults.html) get_query(query_phrase, opts)
Query content
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
query_phrase = "query_phrase_example" # String | Phrase tokens are ANDed together over all searchable fields
opts = {
page_size: 25, # Integer | Page size
page_number: 1, # Integer | Page number
sort_by: "name", # String | name or dateCreated
sort_order: "ascending", # String | ascending or descending
expand: "expand_example" # String | Expand some document fields
}
begin
#Query content
result = api_instance.get_query(query_phrase, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_query: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query_phrase** | **String**| Phrase tokens are ANDed together over all searchable fields |
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
**sort_by** | **String**| name or dateCreated | [optional] [default to name]
**sort_order** | **String**| ascending or descending | [optional] [default to ascending]
**expand** | **String**| Expand some document fields | [optional]
{: class="table table-striped"}
### Return type
[**QueryResults**](QueryResults.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**SecurityProfileEntityListing**](SecurityProfileEntityListing.html) get_securityprofiles
Get a List of Security Profiles
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
begin
#Get a List of Security Profiles
result = api_instance.get_securityprofiles
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_securityprofiles: #{e}"
end
~~~
### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}
### Return type
[**SecurityProfileEntityListing**](SecurityProfileEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**SecurityProfile**](SecurityProfile.html) get_securityprofiles_securityprofile_id(security_profile_id)
Get a Security Profile
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
security_profile_id = "security_profile_id_example" # String | Security Profile Id
begin
#Get a Security Profile
result = api_instance.get_securityprofiles_securityprofile_id(security_profile_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_securityprofiles_securityprofile_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**security_profile_id** | **String**| Security Profile Id |
{: class="table table-striped"}
### Return type
[**SecurityProfile**](SecurityProfile.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## - get_shared_shared_id(shared_id, opts)
Get shared documents. Securely download a shared document.
This method requires the download sharing URI obtained in the get document response (downloadSharingUri). Documents may be shared between users in the same workspace. Documents may also be shared between any user by creating a content management share.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
shared_id = "shared_id_example" # String | Shared ID
opts = {
redirect: true, # BOOLEAN | Turn on or off redirect
disposition: "attachment", # String | Request how the share content will be downloaded: attached as a file or inline. Default is attachment.
content_type: "content_type_example", # String | The requested format for the specified document. If supported, the document will be returned in that format. Example contentType=audio/wav
expand: "expand_example" # String | Expand some document fields
}
begin
#Get shared documents. Securely download a shared document.
api_instance.get_shared_shared_id(shared_id, opts)
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_shared_shared_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**shared_id** | **String**| Shared ID |
**redirect** | **BOOLEAN**| Turn on or off redirect | [optional] [default to true]
**disposition** | **String**| Request how the share content will be downloaded: attached as a file or inline. Default is attachment. | [optional] [default to attachment]
**content_type** | **String**| The requested format for the specified document. If supported, the document will be returned in that format. Example contentType=audio/wav | [optional]
**expand** | **String**| Expand some document fields | [optional]
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**ShareEntityListing**](ShareEntityListing.html) get_shares(opts)
Gets a list of shares. You must specify at least one filter (e.g. entityId).
Failing to specify a filter will return 400.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
opts = {
entity_id: "entity_id_example", # String | Filters the shares returned to only the entity specified by the value of this parameter.
expand: "expand_example", # String | Expand share fields
page_size: 25, # Integer | Page size
page_number: 1 # Integer | Page number
}
begin
#Gets a list of shares. You must specify at least one filter (e.g. entityId).
result = api_instance.get_shares(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_shares: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**entity_id** | **String**| Filters the shares returned to only the entity specified by the value of this parameter. | [optional]
**expand** | **String**| Expand share fields | [optional]
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
{: class="table table-striped"}
### Return type
[**ShareEntityListing**](ShareEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Share**](Share.html) get_shares_share_id(share_id, opts)
Retrieve details about an existing share.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
share_id = "share_id_example" # String | Share ID
opts = {
expand: "expand_example" # String | Expand share fields
}
begin
#Retrieve details about an existing share.
result = api_instance.get_shares_share_id(share_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_shares_share_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**share_id** | **String**| Share ID |
**expand** | **String**| Expand share fields | [optional]
{: class="table table-striped"}
### Return type
[**Share**](Share.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**CommandStatusEntityListing**](CommandStatusEntityListing.html) get_status(opts)
Get a list of statuses for pending operations
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
opts = {
page_size: 25, # Integer | Page size
page_number: 1 # Integer | Page number
}
begin
#Get a list of statuses for pending operations
result = api_instance.get_status(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_status: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
{: class="table table-striped"}
### Return type
[**CommandStatusEntityListing**](CommandStatusEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**CommandStatus**](CommandStatus.html) get_status_status_id(status_id)
Get a status.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
status_id = "status_id_example" # String | Status ID
begin
#Get a status.
result = api_instance.get_status_status_id(status_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_status_status_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status_id** | **String**| Status ID |
{: class="table table-striped"}
### Return type
[**CommandStatus**](CommandStatus.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Usage**](Usage.html) get_usage
Get usage details.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
begin
#Get usage details.
result = api_instance.get_usage
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_usage: #{e}"
end
~~~
### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}
### Return type
[**Usage**](Usage.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**WorkspaceEntityListing**](WorkspaceEntityListing.html) get_workspaces(opts)
Get a list of workspaces.
Specifying 'content' access will return all workspaces the user has document access to, while 'admin' access will return all group workspaces the user has administrative rights to.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
opts = {
page_size: 25, # Integer | Page size
page_number: 1, # Integer | Page number
access: "document:viewmetadata", # String | Requested access level
expand: "expand_example" # String | Expand some workspace fields
}
begin
#Get a list of workspaces.
result = api_instance.get_workspaces(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_workspaces: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
**access** | **String**| Requested access level | [optional] [default to document:viewmetadata]
**expand** | **String**| Expand some workspace fields | [optional]
{: class="table table-striped"}
### Return type
[**WorkspaceEntityListing**](WorkspaceEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Workspace**](Workspace.html) get_workspaces_workspace_id(workspace_id, opts)
Get a workspace.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
opts = {
expand: "expand_example" # String | Expand some workspace fields
}
begin
#Get a workspace.
result = api_instance.get_workspaces_workspace_id(workspace_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_workspaces_workspace_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**expand** | **String**| Expand some workspace fields | [optional]
{: class="table table-striped"}
### Return type
[**Workspace**](Workspace.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**WorkspaceMemberEntityListing**](WorkspaceMemberEntityListing.html) get_workspaces_workspace_id_members(workspace_id, opts)
Get a list workspace members
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
opts = {
page_size: 25, # Integer | Page size
page_number: 1, # Integer | Page number
expand: "expand_example" # String | Expand workspace member fields
}
begin
#Get a list workspace members
result = api_instance.get_workspaces_workspace_id_members(workspace_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_workspaces_workspace_id_members: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
**expand** | **String**| Expand workspace member fields | [optional]
{: class="table table-striped"}
### Return type
[**WorkspaceMemberEntityListing**](WorkspaceMemberEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**WorkspaceMember**](WorkspaceMember.html) get_workspaces_workspace_id_members_member_id(workspace_id, member_id, opts)
Get a workspace member
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
member_id = "member_id_example" # String | Member ID
opts = {
expand: "expand_example" # String | Expand workspace member fields
}
begin
#Get a workspace member
result = api_instance.get_workspaces_workspace_id_members_member_id(workspace_id, member_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_workspaces_workspace_id_members_member_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**member_id** | **String**| Member ID |
**expand** | **String**| Expand workspace member fields | [optional]
{: class="table table-striped"}
### Return type
[**WorkspaceMember**](WorkspaceMember.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**TagValueEntityListing**](TagValueEntityListing.html) get_workspaces_workspace_id_tagvalues(workspace_id, opts)
Get a list of workspace tags
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
opts = {
value: "value_example", # String | filter the list of tags returned
page_size: 25, # Integer | Page size
page_number: 1, # Integer | Page number
expand: "expand_example" # String | Expand some document fields
}
begin
#Get a list of workspace tags
result = api_instance.get_workspaces_workspace_id_tagvalues(workspace_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_workspaces_workspace_id_tagvalues: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**value** | **String**| filter the list of tags returned | [optional]
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
**expand** | **String**| Expand some document fields | [optional]
{: class="table table-striped"}
### Return type
[**TagValueEntityListing**](TagValueEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**TagValue**](TagValue.html) get_workspaces_workspace_id_tagvalues_tag_id(workspace_id, tag_id, opts)
Get a workspace tag
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
tag_id = "tag_id_example" # String | Tag ID
opts = {
expand: "expand_example" # String | Expand some document fields
}
begin
#Get a workspace tag
result = api_instance.get_workspaces_workspace_id_tagvalues_tag_id(workspace_id, tag_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->get_workspaces_workspace_id_tagvalues_tag_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**tag_id** | **String**| Tag ID |
**expand** | **String**| Expand some document fields | [optional]
{: class="table table-striped"}
### Return type
[**TagValue**](TagValue.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**QueryResults**](QueryResults.html) post_auditquery(body)
Query audits
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
body = PureCloud::ContentQueryRequest.new # ContentQueryRequest | Allows for a filtered query returning facet information
begin
#Query audits
result = api_instance.post_auditquery(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_auditquery: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**ContentQueryRequest**](ContentQueryRequest.html)| Allows for a filtered query returning facet information |
{: class="table table-striped"}
### Return type
[**QueryResults**](QueryResults.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Document**](Document.html) post_documents(opts)
Add a document.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
opts = {
body: PureCloud::DocumentUpload.new, # DocumentUpload | Document
copy_source: "copy_source_example", # String | Copy a document within a workspace or to a new workspace. Provide a document ID as the copy source.
move_source: "move_source_example", # String | Move a document to a new workspace. Provide a document ID as the move source.
override: true # BOOLEAN | Override any lock on the source document
}
begin
#Add a document.
result = api_instance.post_documents(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_documents: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**DocumentUpload**](DocumentUpload.html)| Document | [optional]
**copy_source** | **String**| Copy a document within a workspace or to a new workspace. Provide a document ID as the copy source. | [optional]
**move_source** | **String**| Move a document to a new workspace. Provide a document ID as the move source. | [optional]
**override** | **BOOLEAN**| Override any lock on the source document | [optional]
{: class="table table-striped"}
### Return type
[**Document**](Document.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Document**](Document.html) post_documents_document_id(document_id, opts)
Update a document.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
document_id = "document_id_example" # String | Document ID
opts = {
body: PureCloud::DocumentUpdate.new, # DocumentUpdate | Document
expand: "expand_example", # String | Expand some document fields
override: true # BOOLEAN | Override any lock on the document
}
begin
#Update a document.
result = api_instance.post_documents_document_id(document_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_documents_document_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**document_id** | **String**| Document ID |
**body** | [**DocumentUpdate**](DocumentUpdate.html)| Document | [optional]
**expand** | **String**| Expand some document fields | [optional]
**override** | **BOOLEAN**| Override any lock on the document | [optional]
{: class="table table-striped"}
### Return type
[**Document**](Document.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**ReplaceResponse**](ReplaceResponse.html) post_documents_document_id_content(document_id, opts)
Replace the contents of a document.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
document_id = "document_id_example" # String | Document ID
opts = {
body: PureCloud::ReplaceRequest.new, # ReplaceRequest | Replace Request
override: true # BOOLEAN | Override any lock on the document
}
begin
#Replace the contents of a document.
result = api_instance.post_documents_document_id_content(document_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_documents_document_id_content: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**document_id** | **String**| Document ID |
**body** | [**ReplaceRequest**](ReplaceRequest.html)| Replace Request | [optional]
**override** | **BOOLEAN**| Override any lock on the document | [optional]
{: class="table table-striped"}
### Return type
[**ReplaceResponse**](ReplaceResponse.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**QueryResults**](QueryResults.html) post_query(body, opts)
Query content
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
body = PureCloud::QueryRequest.new # QueryRequest | Allows for a filtered query returning facet information
opts = {
expand: "expand_example" # String | Expand some document fields
}
begin
#Query content
result = api_instance.post_query(body, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_query: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**QueryRequest**](QueryRequest.html)| Allows for a filtered query returning facet information |
**expand** | **String**| Expand some document fields | [optional]
{: class="table table-striped"}
### Return type
[**QueryResults**](QueryResults.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**CreateShareResponse**](CreateShareResponse.html) post_shares(opts)
Creates a new share or updates an existing share if the entity has already been shared
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
opts = {
body: PureCloud::CreateShareRequest.new # CreateShareRequest | CreateShareRequest - entity id and type and a single member or list of members are required
}
begin
#Creates a new share or updates an existing share if the entity has already been shared
result = api_instance.post_shares(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_shares: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**CreateShareRequest**](CreateShareRequest.html)| CreateShareRequest - entity id and type and a single member or list of members are required | [optional]
{: class="table table-striped"}
### Return type
[**CreateShareResponse**](CreateShareResponse.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Workspace**](Workspace.html) post_workspaces(opts)
Create a group workspace
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
opts = {
body: PureCloud::WorkspaceCreate.new # WorkspaceCreate | Workspace
}
begin
#Create a group workspace
result = api_instance.post_workspaces(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_workspaces: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**WorkspaceCreate**](WorkspaceCreate.html)| Workspace | [optional]
{: class="table table-striped"}
### Return type
[**Workspace**](Workspace.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**TagValue**](TagValue.html) post_workspaces_workspace_id_tagvalues(workspace_id, opts)
Create a workspace tag
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
opts = {
body: PureCloud::TagValue.new # TagValue | tag
}
begin
#Create a workspace tag
result = api_instance.post_workspaces_workspace_id_tagvalues(workspace_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_workspaces_workspace_id_tagvalues: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**body** | [**TagValue**](TagValue.html)| tag | [optional]
{: class="table table-striped"}
### Return type
[**TagValue**](TagValue.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**TagValueEntityListing**](TagValueEntityListing.html) post_workspaces_workspace_id_tagvalues_query(workspace_id, opts)
Perform a prefix query on tags in the workspace
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
opts = {
body: PureCloud::TagQueryRequest.new, # TagQueryRequest | query
expand: "expand_example" # String | Expand some document fields
}
begin
#Perform a prefix query on tags in the workspace
result = api_instance.post_workspaces_workspace_id_tagvalues_query(workspace_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->post_workspaces_workspace_id_tagvalues_query: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**body** | [**TagQueryRequest**](TagQueryRequest.html)| query | [optional]
**expand** | **String**| Expand some document fields | [optional]
{: class="table table-striped"}
### Return type
[**TagValueEntityListing**](TagValueEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Workspace**](Workspace.html) put_workspaces_workspace_id(workspace_id, opts)
Update a workspace
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
opts = {
body: PureCloud::Workspace.new # Workspace | Workspace
}
begin
#Update a workspace
result = api_instance.put_workspaces_workspace_id(workspace_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->put_workspaces_workspace_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**body** | [**Workspace**](Workspace.html)| Workspace | [optional]
{: class="table table-striped"}
### Return type
[**Workspace**](Workspace.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**WorkspaceMember**](WorkspaceMember.html) put_workspaces_workspace_id_members_member_id(workspace_id, member_id, opts)
Add a member to a workspace
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
member_id = "member_id_example" # String | Member ID
opts = {
body: PureCloud::WorkspaceMember.new # WorkspaceMember | Workspace
}
begin
#Add a member to a workspace
result = api_instance.put_workspaces_workspace_id_members_member_id(workspace_id, member_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->put_workspaces_workspace_id_members_member_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**member_id** | **String**| Member ID |
**body** | [**WorkspaceMember**](WorkspaceMember.html)| Workspace | [optional]
{: class="table table-striped"}
### Return type
[**WorkspaceMember**](WorkspaceMember.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**TagValue**](TagValue.html) put_workspaces_workspace_id_tagvalues_tag_id(workspace_id, tag_id, opts)
Update a workspace tag. Will update all documents with the new tag value.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::ContentManagementApi.new
workspace_id = "workspace_id_example" # String | Workspace ID
tag_id = "tag_id_example" # String | Tag ID
opts = {
body: PureCloud::TagValue.new # TagValue | Workspace
}
begin
#Update a workspace tag. Will update all documents with the new tag value.
result = api_instance.put_workspaces_workspace_id_tagvalues_tag_id(workspace_id, tag_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling ContentManagementApi->put_workspaces_workspace_id_tagvalues_tag_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workspace_id** | **String**| Workspace ID |
**tag_id** | **String**| Tag ID |
**body** | [**TagValue**](TagValue.html)| Workspace | [optional]
{: class="table table-striped"}
### Return type
[**TagValue**](TagValue.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json