Manage containers with SCIM endpoints

This topic provides examples of requests supported by the Containers endpoint.

Send requests to the /scim/Containers endpoint to manage Safes in Privilege Cloud. This endpoint currently supports the following methods:

  • GET

  • POST

  • DELETE

  • PUT

SCIM endpoint query syntax

Use SCIM endpoints to enter queries that retrieve containers based on attributes. Each query contains an operator, an attribute, and an attribute value in the following format:

<baseURL>/scim/Containers?filter=<attribute> <operator> "<attributeValue>"

where <baseURL> is the tenant URL.

Example:

https://mytenant.my.idaptive.app/scim/Containers?filter=displayName eq "Example Display Name"

Query operators

SCIM endpoints for querying containers support the following operators (filters):

Container query operators

Operators

Meaning

eq

equals

sw

starts with

co

contains

ew

ends with

Query attributes

SCIM endpoints for querying containers support the following attributes:

Container query attributes

Attribute

Description

id

Uniquely identifies a container that matches the container ID

displayName

Uniquely identifies a container that matches the display name

name

Uniquely identifies a container that matches the name

owner.display

Returns a list of containers for which a user (identified by username) is an owner

owner.value

Returns a list of containers for which a user (identified by user ID) is an owner

privilegedData.display

Returns a list of containers that have a privileged account matching the search string

Sort a list of containers

You can sort a list of containers in ascending or descending order. The SCIM endpoint for sorting containers uses the following format:

<baseurl>/scim/Containers?sortBy=<attribute>&sortOrder=<ascending or descending>

where <baseURL> is the tenant URL.

Use the following attributes for sorting:

Attributes for sorting a list of containers

Attribute

Sort based on

name

Container name

displayName

Container display name

Example:

https://mytenant.my.idaptive.app/scim/Containers?sortBy=name&sortOrder=ascending

Enable pagination when querying containers

To enable pagination when querying containers, use the following format:

<baseurl>/scim/containers?startIndex=<number>&count=<number-of-items-to-retrieve>

where <baseURL> is the tenant URL.

Example:

https://mytenant.my.idaptive.app/scim/containers?startIndex=1&count=100

The parameter 1&count=100 retrieves the first 100 items in the results. To view additional results, send another request. For example, this request gets items 101 to 201:

https://mytenant.my.idaptive.app/scim/containers?startIndex=101&count=100

Examples

Refer to the following examples for common requests to Containers.

GET

GET a specific container using the container name. [Available only with the 12.2 version of PVWA].

GET https://mytenant.idaptive.app/scim/Containers/myContainer

{
	"name":"myContainer",
	"displayName":"myContainer",
	"description":"This is safe testing",
	"type":"safe",
	"owner":{
          
	},
	"schemas":[
		"urn:ietf:params:scim:schemas:pam:1.0:Container",
		"urn:ietf:params:scim:schemas:cyberark:1.0:Safe"
	],
	"id":"myContainer",
	"meta":{
		"resourceType":"Container",
		"location":"https://mytenant.idaptive.app/Scim/Containers/myContainer"
	},
		"urn:ietf:params:scim:schemas:cyberark:1.0:Safe"{
		"NumberOfDaysRetention": 7
		"ManagingCPM" :"PasswordManager"
	},		
							
}

GET all containers.

GET https://mytenant.idaptive.app/scim/Containers

{
	"schemas": [
		"urn:ietf:params:scim:api:messages:2.0:ListResponse"
	],
	"totalResults": 2,
	"itemsPerPage": 2,
	"startIndex": 1,
	"Resources": [
		{
			"name": "myContainer1",
			"displayName": "myContainer1",
			"description": "This is sample safe testing",
			"type": "safe",
			"owner": {
			"value": "1",
			"$ref": "https://mytenant.idaptive.app/Scim/v2/Users/1",
			"display": "identity-privilege-integration-user$"
		},
		"privilegedData": [
			{
				"value": "52_88",
				"$ref": "https://mytenant.idaptive.app/Scim/v2/PrivilegedData/52_88",
				"display": "myPrivilegeData1"
			},
			{
				"value": "52_17",
				"$ref": "https://mytenant.idaptive.app/Scim/v2/PrivilegedData/52_17",
				"display": "myPrivilegeData2"
			}
		],
		"schemas": [
			"urn:ietf:params:scim:schemas:pam:1.0:Container",
			"urn:ietf:params:scim:schemas:cyberark:1.0:Safe"
		],
		"id": "myContainer1",
		"meta": {
			"resourceType": "Container",
			"created": "2021-06-01T09:03:35.5Z",
			"lastModified": "2021-06-21T01:00:55.567Z",
			"location": "https://mytenant.idaptive.app/Scim/v2/Containers/myContainer1"
		},
			"urn:ietf:params:scim:schemas:cyberark:1.0:Safe": {
			"NumberOfDaysRetention": 8
		}
	},
	{
		"name": "myContainer2",
		"displayName": "myContainer2",
		"description": "This is sample safe testing",
		"type": "safe",
		"owner": {
			"value": "1",
			"$ref": "https://mytenant.idaptive.app/Scim/v2/Users/1",
			"display": "identity-privilege-integration-user$"
		},
		"privilegedData": [
			{
				"value": "52_88",
				"$ref": "https://mytenant.idaptive.app/Scim/v2/PrivilegedData/52_88",
				"display": "myPrivilegeData3"
			},
			{
				"value": "52_17",
				"$ref": "https://mytenant.idaptive.app/Scim/v2/PrivilegedData/52_17",
				"display": "myPrivilegeData4"
			}
		],
		"schemas": [
			"urn:ietf:params:scim:schemas:pam:1.0:Container",
			"urn:ietf:params:scim:schemas:cyberark:1.0:Safe"
		],
		"id": "myContainer2",
		"meta": {
			"resourceType": "Container",
			"created": "2021-06-01T09:17:55.5Z",
			"lastModified": "2021-06-21T01:00:55.57Z",
			"location": "https://mytenant.idaptive.app/Scim/v2/Containers/myContainer2"
		},
			"urn:ietf:params:scim:schemas:cyberark:1.0:Safe": {
			"NumberOfDaysRetention": 8
			}
		}
	]
}

Sort results when you GET all containers.

GET https://mytenant.idaptive.app/scim/Containers?sortby=name&sortorder=descending

GET https://mytenant.idaptive.app/scim/Containers?sortby=meta.created&sortorder=descending

GET https://mytenant.idaptive.app/scim/Containers?sortby=meta.created&sortorder=ascending

POST

POST https://mytenant.idaptive.app/scim/Containers

POST containers example request:

{
	"name":"myContainer",
	"description":"This is safe testing",
	"displayName":"myContainer",
	"schemas":[
		"urn:ietf:params:scim:schemas:pam:1.0:Container"
	]
}

payloadPOST containers example response:

{
	"name":"myContainer",
	"displayName":"myContainer",
	"description":"This is safe testing",
	"type":"safe",
	"owner":{
		"value":"1",
		"display":"identity-privilege-integration-user$"
	},
	"schemas":[
		"urn:ietf:params:scim:schemas:pam:1.0:Container",
		"urn:ietf:params:scim:schemas:cyberark:1.0:Safe"
	],
	"id":"myContainer",
	"meta":{
		"resourceType":"Container",
		"created":"2020-12-03T03:49:55.1521236Z",
		"lastModified":"2020-12-03T03:49:55.1521236Z",
		"location":"//mytenant.idaptive.app/Scim/Containers/myContainer"
	},
	"urn:ietf:params:scim:schemas:cyberark:1.0:Safe":{
		"NumberOfDaysRetention":7
	}
}

DELETE

DELETE https://mytenant.idaptive.app/scim/Containers/myContainer returns 1.

PUT

PUT https://mytenant.idaptive.app/scim/Containers [Available only with the 12.2 version of PVWA].

Change the name of the container https://mytenant.idaptive.app/scim/Containers/myContainer1

Request:

{
	"name": "myContainer",
	"displayName": "myContainer",
	"type": "safe",
	"owner": {
		"value": "1",
		"$ref": "https://mytenant.idaptive.app/Scim/v2/Users/1",
		"display": "identity-privilege-integration-user$"
	},
	"schemas": [
		"urn:ietf:params:scim:schemas:pam:1.0:Container",
		"urn:ietf:params:scim:schemas:cyberark:1.0:Safe"
	],
	"id": "myContainer",
	"meta": {
		"resourceType": "Container",
		"created": "2021-06-18T04:45:08.8Z",
		"lastModified": "2021-06-18T04:45:09.911Z",
		"location":"https://mytenant.idaptive.app/Scim/v2/Containers/myContainer"
	},
	"urn:ietf:params:scim:schemas:cyberark:1.0:Safe": {
		"NumberOfDaysRetention": 56
	}
}

Response:

{
	"name": "myContainer",
	"displayName": "myContainer",
	"type": "safe",
	"owner": {
		"value": "1",
		"$ref": "https://mytenant.idaptive.app/Scim/v2/Users/1",
		"display": "identity-privilege-integration-user$"
	},
	"schemas": [
		"urn:ietf:params:scim:schemas:pam:1.0:Container",
		"urn:ietf:params:scim:schemas:cyberark:1.0:Safe"
	],
	"id": "myContainer",
		"meta": {
			"resourceType": "Container",
			"created": "2021-06-18T04:45:08.8Z",
			"lastModified": "2021-06-21T07:53:27.755Z",
			"location":"https://mytenant.idaptive.app/Scim/v2/Containers/myContainer"
		},
		"urn:ietf:params:scim:schemas:cyberark:1.0:Safe": {
			"NumberOfDaysRetention": 56
		}
}