Get Policies
Search Policies
Use the list policies request to get a list of all the policies in the system, from there you can search across all of your policies. to narrow down your policies by category or type use the get policies by category request or the get policies by type request.
Endpoint
Method: GET
URL: /policy/list
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | Contains the list of all the policies in the system, each policy may vary depending on the policy type however typically policies include the following parameters in this table. |
| Integer | The unique ID of the policy. |
| String | A useful name for the policy. |
| Integer | The priority of the policy, determines the order in which the policies are ran, |
| String | If the priority is active ( |
| String | The type of policy, this determines what the policy does, use the get policy types request to get a list of policy types, and see Policy Engine and Summary - APIs for a detailed explanation for each policy type. |
| String | The ID of your tenant, the tenant that the policy belongs to. |
| String | The user ID of the user that created the policy. |
| Date Time | When the policy was first created, in the format |
| Array | The filter that the policy uses to determine which conversations to process. See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses. |
| Array | A list of additional attributes that the policy uses to function, these include an |
Sample Response
Note
The below sample response has been shortened for document formatting purposes, where policy
only shows two policies, typically a system will have more policies.
{ "policy": [ { "id": "2736", "name": "Move Start Date 19-03", "priority": "3", "status": "DISABLED", "policyType": "move-media", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-03-19T06:54:08.396273Z", "groupFilter": { "leftFilter": { "fieldName": "callProperties.startDate", "operator": "CONVERSATION_FILTER_OPERATOR_GREATER_THAN", "timestampValue": "2024-03-17T18:30:00Z" } }, "policyAttribute": [ { "id": "2" }, { "id": "3" }, { "id": "4",z "s3EndpointDetailsId": "309" }, { "id": "5", "value": "WAV" } ] }, { "id": "15747", "name": "John realtime", "priority": "1", "status": "ENABLED", "policyType": "realtime-audio", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-07-25T10:41:12.485038Z", "groupFilter": { "leftFilter": { "fieldName": "agent.email", "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL", "stringValue": "johndoe@uniphore.com" } }, "policyAttribute": [ { "id": "7", "endpointDetailsId": "6527" } ] } ] }
Get Policies by Category
Use the get policies by category request to list all of your policies for a specific category.
Endpoint
Method: GET
URL: /policy/list-by-category/:policyCategory
Path Parameter
Parameter Name | Data Type | Description |
---|---|---|
| String | The Category of policies you would like to get a list of, use the get policy categories request to get a list of valid values. At the time of writing, valid values include |
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | Contains the list of all of the policies that match the specified category in the path parameter, each policy may vary depending on the policy type however typically policies include the following parameters in this table. |
| Integer | The unique ID of the policy. |
| String | A useful name for the policy. |
| Integer | The priority of the policy, determines the order in which the policies are ran, |
| String | If the priority is active ( |
| String | The type of policy, this determines what the policy does, use the get policy types request to get a list of policy types, and see Policy Engine and Summary - APIs for a detailed explanation for each policy type. |
| String | The ID of your tenant, the tenant that the policy belongs to. |
| String | The user ID of the user that created the policy. |
| Date Time | When the policy was first created, in the format |
| Array | The filter that the policy uses to determine which conversations to process. See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses. |
| Array | A list of additional attributes that the policy uses to function, these include an |
Sample Response
Note
The following example response is the response for a get policies by category request for the access-control
policies, access control policies use claims maps to determine which users get access to the conversations that match the filter in the policy, use the get map for policy request to see the users/organization groups that the access control policy applies to.
{ "policy": [ { "id": "688", "name": "Access Johns Team", "priority": "1", "status": "ENABLED", "policyType": "metadata-and-media-playback-access", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-02-22T16:34:42.993377Z", "groupFilter": { "leftFilter": { "fieldName": "agent.manager", "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL", "stringValue": "John Doe" } } }, { "id": "14446", "name": "Access Johns Calls", "priority": "1", "status": "DISABLED", "policyType": "metadata-and-media-playback-access", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-07-09T07:30:39.625236Z", "groupFilter": { "leftFilter": { "fieldName": "agent.email", "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL", "stringValue": "johndoe@uniphore.com" } } } ] }
Get Policies by Type
Use the get policies by type request to list all of your policies for a specific type.
Endpoint
Method: GET
URL: /policy/list-by-category/:policyType
Path Parameter
Parameter Name | Data Type | Description |
---|---|---|
| String | The Category of policies you would like to get a list of, use the get policy types request to get a list of valid values. At the time of writing, valid values include |
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | Contains the list of all of the policies that match the specified type in the path parameter, each policy may vary depending on the policy type however typically policies include the following parameters in this table. |
| Integer | The unique ID of the policy. |
| String | A useful name for the policy. |
| Integer | The priority of the policy, determines the order in which the policies are ran, |
| String | If the priority is active ( |
| String | The type of policy, this determines what the policy does, use the get policy types request to get a list of policy types, and see Policy Engine and Summary - APIs for a detailed explanation for each policy type. |
| String | The ID of your tenant, the tenant that the policy belongs to. |
| String | The user ID of the user that created the policy. |
| Date Time | When the policy was first created, in the format |
| Array | The filter that the policy uses to determine which conversations to process. See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses. |
| Array | A list of additional attributes that the policy uses to function, these include an |
Sample Response
Note
The following example response is the response for a get policies by type request for the metadata-and-media-playback-access
policies, this is a type of access control policy - access control policies use claims maps to determine which users get access to the conversations that match the filter in the policy, use the get map for policy request to see the users/organization groups that the access control policy applies to.
{ "policy": [ { "id": "688", "name": "Access Johns Team", "priority": "1", "status": "ENABLED", "policyType": "metadata-and-media-playback-access", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-02-22T16:34:42.993377Z", "groupFilter": { "leftFilter": { "fieldName": "agent.manager", "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL", "stringValue": "John Doe" } } }, { "id": "14446", "name": "Access Johns Calls", "priority": "1", "status": "DISABLED", "policyType": "metadata-and-media-playback-access", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-07-09T07:30:39.625236Z", "groupFilter": { "leftFilter": { "fieldName": "agent.email", "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL", "stringValue": "johndoe@uniphore.com" } } } ] }
Get Policies by Endpoint ID
Use the get policies by endpoint ID request to list all of your policies with a specific endpoint, this is applicable to export and storage policies as these policies require an endpoint to function.
Endpoint
Method: GET
URL: /policy/list-by-endpoint
Request Parameter
Parameter Name | Data Type | Description | Required/Optional |
---|---|---|---|
| Array | Details of the endpoint to use to get the policies that use that endpoint to function. | Required |
| Number | The ID of the endpoint to get the policies for. Depending on the export channel use either | Required |
For an example request, see Sample Request.
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | Contains the list of all of the policies that match the specified endpoint in the request body, each policy may vary however typically policies include the following parameters in this table. |
| Integer | The unique ID of the policy. |
| String | A useful name for the policy. |
| Integer | The priority of the policy, determines the order in which the policies are ran, |
| String | If the priority is active ( |
| String | The type of policy, this determines what the policy does, use the get policy types request to get a list of policy types, and see Policy Engine and Summary - APIs for a detailed explanation for each policy type. |
| String | The ID of your tenant, the tenant that the policy belongs to. |
| String | The user ID of the user that created the policy. |
| Date Time | When the policy was first created, in the format |
| Array | The filter that the policy uses to determine which conversations to process. See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses. |
| Array | A list of additional attributes that the policy uses to function, these include an |
For an example response, see Sample Response.
Sample request
{ "endpointId": [ { "s3_endpoint_details_id": 309 } ] }
Sample Response
Note
The following example response is the response for a get policies by category request for the metadata-and-media-playback-access
policies, access control policies use claims maps to determine which users get access to the conversations that match the filter in the policy, use the get map for policy request to see the users/organization groups that the access control policy applies to.
{ "policy": [ { "id": "18339", "name": "MovemediaJohnDoe", "priority": "9", "status": "DISABLED", "policyType": "move-media", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-08-16T15:01:34.905595Z", "groupFilter": { "leftFilter": { "fieldName": "agent.id", "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL", "stringValue": "johndoe@uniphore.com" } }, "policyAttribute": [ { "id": "2", "value": "days" }, { "id": "3", "value": "days" }, { "id": "1", "value": "media" }, { "id": "4", "s3EndpointDetailsId": "309" }, { "id": "12:. "scheduleId": "94" } ] } ] }
Get Policies for Schedules
Use the get policies for schedules request to list all of your policies for specific Schedules.
Endpoint
Method: GET
URL: /policy/list-by-schedule
Request Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | List the IDs of the Schedules that you want to receive the affected Policies for. |
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of the Schedules specified in the request and their affected policies (and policy details), any Schedule without affected policies will not be included in the list. Each list item contains the |
| Number | The ID of one of the Schedules listed in the request. |
| Array | The list of all of the policies affected by the schedule specified in the above |
| Integer | The unique ID of the policy. |
| String | A useful name for the policy. |
| Integer | The priority of the policy, determines the order in which the policies are ran, |
| String | If the priority is active ( |
| String | The type of policy, this determines what the policy does, use the get policy types request to get a list of policy types, and see Policy Engine and Summary - APIs for a detailed explanation for each policy type. |
| String | The ID of your tenant, the tenant that the policy belongs to. |
| String | The user ID of the user that created the policy. |
| Date Time | When the policy was first created, in the format |
| Array | The filter that the policy uses to determine which conversations to process. See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses. |
| Array | A list of additional attributes that the policy uses to function, these include an |
Sample Response
{ "schedulePolicies": [ { "scheduleId": "94", "policy": [ { "id": "21213", "name": "Archive Example", "priority": "1", "status": "DISABLED", "policyType": "archive-metadata", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-09-17T11:07:04.085286Z", "groupFilter": { "leftFilter": { "fieldName": "conversationId", "operator": "CONVERSATION_FILTER_OPERATOR_CONTAINS", "stringValue": "a9ede7fe-6881-4ee4-8453-1b6c36a9f578" } }, "policyAttribute": [ { "id": "5", "value": "JSON" }, { "id": "2", "value": "1" }, { "id": "12", "scheduleId": "94" }, { "id": "4", "s3EndpointDetailsId": "309" }, { "id": "3", "value": "weeks" } ] }, { "id": "21355", "name": "Archive Example 2", "priority": "1", "status": "DISABLED", "policyType": "archive-metadata", "tenantId": "67hg8362-g3d2-7g92-9273-d9h02kr83736", "createdBy": "auth0|735ujf53h235bn09835d984h", "createdDate": "2024-09-19T09:16:26.985936Z", "groupFilter": { "leftFilter": { "fieldName": "conversationId", "operator": "CONVERSATION_FILTER_OPERATOR_CONTAINS", "stringValue": "2708eea3-7b81-4c77-9ce9-959fb9237364" } }, "policyAttribute": [ { "id": "2", "value": "1" }, { "id": "4", "s3EndpointDetailsId": "309" }, { "id": "5", "value": "JSON" }, { "id": "3", "value": "weeks" }, { "id": "12", "scheduleId": "94" } ] } ] } ] }
Get the Claims Map for a Policy
Use the get claims map request to check the existing claims map on an access control policy and therefore see which users and organization groups are granted access permissions by an access control policy.
Note
The users and groups specified in the claims map may not be an extensive list of the users and groups with access permissions to the specific calls, other access control policies may apply to conversations matching the filters in the access control policy specified.
For example the director of sales may have access to all sales calls as part of a policy (policy 1), then a separate policy (policy 2) may grant access to a specific sales team's calls, checking the claims of policy 2 would not show that the director of sales has access to the calls of the specific sales team.
In addition, User Roles can also grant access to captured conversations (for example a user with the Manager role would have access to their agents calls, and a user with the System Administrator role would have access to all captured calls).
Endpoint
Method: GET
URL: /policy/policy-map/get/:policyId
Path Parameter
Parameter Name | Data Type | Description | Required/Optional |
---|---|---|---|
| Number | The ID of the access control policy to check the claims for, use the get policies by category request to get a list of access control policies and their IDs. | Required |
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Number | The ID of the access control policy that the below claims apply to. |
| Array | A list of the users and organization groups that are granted access permissions by the access control policy, consisting of |
| Array | A list of user emails for the individual users that are granted access to the conversations matching the filters of the access control policy, by the policy stated in |
| Array | A list of organization group IDs for the groups that are granted access to the conversations matching the filters of the access control policy, by the policy stated in |
| String | The user ID of the use who last updated the claims map. |
| Date Time | The date and time of when the claims map was last updated, in the format |
Sample Response
{ "policyId": "19081", "claims": { "userEmails": [ "amy@uniphore.com", "barry@uniphore.com", "ben@uniphore.com" ], "organizationGroupIds": [ "80", "82" ] }, "updatedBy": "auth0|735ujf53h235bn09835d984h", "updatedTime": "2024-08-23T08:55:09.506980Z" }
Get Organization Groups
Use the get organization groups request to get a basic list of the organization groups in your organization hierarchy, each with their ID and name.
Endpoint
Method: GET
URL: /policy/organization-groups/get
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of organization groups in the system, each with their ID and name. |
| Number | The ID of the organization group. |
| String | A friendly name for the organization group. |
Sample Response
{ "organizationGroups": [ { "id": "80", "name": "Sales Department" }, { "id": "173", "name": "Support Department" }, { "id": "81", "name": "Finance Department" }, { "id": "83", "name": "Managers" } ] }
Get Users
Use the get users request get a basic list of users in your system (their email, ID, and user name).
Endpoint
Method: GET
URL: /policy/users/get
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of the users in your system, each user has the following details: |
| String | The email address of the user. |
userID | String | The ID of the user |
userName | String | The full name of the user. |
Sample Response
The following example only shows three users, typically your system will have more users.
{ "userInfo": [ { "userEmail": "vikash@captureqa.com", "userId": "auth0|65c5b0c8472d152333580207", "userName": "Vikash Mahabir" }, { "userEmail": "csa1@apitest.com", "userId": "auth0|66026c25f86a5e615f8a6b6d", "userName": "CSA1 apiUser" }, { "userEmail": "zaff@apitest2.com", "userId": "auth0|6601a5c9bc1cf46aeea39c95", "userName": "zaff sample1 user1" } ] }
Get Policy Count
Use the get policy count request to get a total number of policies in your system, including both disabled and enabled policies.
Endpoint
Method: GET
URL: /policy/count
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Number | How many policies are in the system, including both disabled and enabled policies. |
Sample Response
{ "count": "78" }
Get Policy Count by Category
Use the get policy count request to get a total number of policies in your system for each category of policy, including both disabled and enabled policies.
Endpoint
Method: GET
URL: /policy/count-by-category
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of policy categories and how many there are of each in the system. |
| String | Which category of policy the subsequent |
| Number | How many policies are in the system, including both disabled and enabled policies. |
Sample Response
{ "policyCount": [ { "name": "storage", "count": "25" }, { "name": "recording-control", "count": "24" }, { "name": "transcription", "count": "4" }, { "name": "export", "count": "17" }, { "name": "access-control", "count": "6" }, { "name": "lock", "count": "2" } ] }
Get Policy Count by Type
Use the get policy count by type request to get a total number of policies in your system for each type of policy, including both disabled and enabled policies.
Endpoint
Method: GET
URL: /policy/count-by-type
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of policy types and how many there are of each in the system. |
| String | Which type of policy the subsequent |
| Number | How many policies are in the system for the type of policy, including both disabled and enabled policies. |
Sample Response
{ "policyCount": [ { "name": "purge", "count": "8" }, { "name": "move-media", "count": "12" }, { "name": "archive-metadata", "count": "5" }, { "name": "blocklist", "count": "12" }, { "name": "allowlist", "count": "12" }, { "name": "transcribe", "count": "4" }, { "name": "realtime-audio", "count": "5" }, { "name": "callpush", "count": "12" }, { "name": "metadata-and-media-playback-access", "count": "6" }, { "name": "lock", "count": "2" } ] }
Get Policy Categories
U-Capture Policies are split into categories for different tasks, then there are different types of policy in each category. When managing your policies it's important to understand the categories and types of policies available, use the get policy categories request to find information about the U-Capture policy categories. This topic details the get policy categories request however for a detailed overview of the U-Capture policy categories and types, see Policy Engine and Summary - APIs.
Endpoint
Method: GET
URL: /policy/categories
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of U-Capture policy categories, each with an |
| Integer | The ID of the policy category. |
| String | The name of the policy category. |
| String | A description for the policy category. |
Sample Response
{ "category": [ { "id": "1", "name": "storage", "description": "storage policies" }, { "id": "2", "name": "recording-control", "description": "recording control policies" }, { "id": "3", "name": "transcription", "description": "transcription policies" }, { "id": "4", "name": "export", "description": "export policies" }, { "id": "5", "name": "access-control", "description": "access control policies" }, { "id": "6", "name": "lock", "description": "lock policies" } ] }
Get Policy Types
U-Capture Policies are split into categories for different tasks, then there different are types of policy in each category. When managing your policies it's important to understand the categories and types of policies available, use the get policy types request to find information about the U-Capture policy types. This topic details the get policy types request however for a detailed overview of the U-Capture policy categories and types, see Policy Engine and Summary - APIs.
Endpoint
Method: GET
URL: /policy/types
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | A list of U-Capture policy types, each with an |
| Integer | The ID of the policy type. |
| String | The name of the policy type. |
| String | A description for the policy type. |
Sample Response
{ "type": [ { "id": "1", "name": "purge", "description": "Purge" }, { "id": "2", "name": "move-media", "description": "Move Media" }, { "id": "3", "name": "archive-metadata", "description": "Archive Metadata" }, { "id": "4", "name": "blocklist", "description": "Blocklist" }, { "id": "5", "name": "allowlist", "description": "Allowlist" }, { "id": "6", "name": "transcribe", "description": "Transcribe" }, { "id": "8", "name": "realtime-audio", "description": "Real-Time Audio" }, { "id": "9", "name": "callpush", "description": "Call Push" }, { "id": "12", "name": "metadata-and-media-playback-access", "description": "Metadata and Media Playback Access" }, { "id": "13", "name": "lock", "description": "Lock" } ] }
Get Policy Attributes
Use the get policy attributes request to get information on the available policy attributes. Policies use attributes to function but not all policy types require policy attributes and some attributes are optional, see the specific create policy request article for details on which attributes are needed for specific policy types alongside policy type specific request and response information.
In a policy's configuration use the policy_attribute
parameter to set the attributes for the policy, these include an id
that indicates which attribute to use and then a qualifier. The response of a get policy attributes request shows the ID to use for each attribute along with the type of attribute and any other applicable information.
Below describes the attributes currently available at the time of writing, while best efforts will be made to keep this list up to date it's worth running the request to check the attributes currently available in your system.
Endpoint
Method: GET
URL: /policy/attributes
Response and Error Code
Response Code | Condition |
---|---|
200 | OK |
Response Parameter
Parameter Name | Data Type | Description |
---|---|---|
| Array | The list of currently available policy attributes in the system. |
| Number | The ID of the attribute, this is used in policy configuration when creating policies. |
| String | The short description of the policy attribute. |
| String | The type of data the attribute uses to function. |
Note
Examples of each attribute are available in the relevant create policy request articles.
Sample Response
{ "attribute": [ { "id": "1", "name": "Data To Purge", "dataType": "enum" }, { "id": "2", "name": "Call Age Filter", "dataType": "numeric", }, { "id": "3", "name": "Call Age Unit", "dataType": "enum", }, { "id": "4", "name": "Storage Location", "dataType": "text" }, { "id": "5", "name": "Output Format", "dataType": "enum" }, { "id": "6", "name": "Call push Endpoint", "dataType": "text" }, { "id": "7", "name": "Realtime Endpoint", "dataType": "text" }, s { "id": "9", "name": "Data To Callpush", "dataType": "enum" }, { "id": "10", "name": "Callpush Metadata Format", "dataType": "enum" }, { "id": "11", "name": "Lock Reason", "dataType": "text" } ] }