Help Center/ Resource Access Manager/ API Reference/ APIs/ Principals/ Searching for Distinct Resource Users or Owners
Updated on 2025-08-20 GMT+08:00

Searching for Distinct Resource Users or Owners

Function

This API is used to search for distinct principals that you are sharing resources with or share resources with you.

URI

POST https://{endpoint}/v1/shared-principals/search-distinct-principal

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Security-Token

No

String

Security token (session token) for temporary security credentials. This parameter is mandatory when you make an API call using temporary security credentials.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Maximum number of entries that can be displayed on a page.

marker

No

String

Page marker.

principals

No

Array of strings

List of principals associated with the resource share.

resource_urn

No

String

URN of the resource.

resource_owner

Yes

String

Resource owner (self or other-accounts) of the resource share.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

distinct_shared_principals

Array of DistinctSharedPrincipal objects

List of distinct roles.

page_info

PageInfo object

Pagination details.

Table 4 DistinctSharedPrincipal

Parameter

Type

Description

id

String

Account ID of the principal or resource owner, or URN of the resource in the resource share.

updated_at

String

Time when the resource share was last updated.

Table 5 PageInfo

Parameter

Type

Description

previous_marker

String

Marker of the previous page.

next_marker

String

Marker of the next page.

current_count

Integer

Number of pages.

Example Requests

Searching for distinct principals that you are sharing resources with or share resources with you

POST https://{endpoint}/v1/shared-principals/search-distinct-principal

{
  "limit" : 2000,
  "marker" : "string",
  "principals" : [ "string" ],
  "resource_urn" : "string",
  "resource_owner" : "self"
}

Example Responses

Status code: 200

Request succeeded.

{
  "distinct_shared_principals" : [ {
    "id" : "string",
    "updated_at" : "2022-09-19T02:33:45.205Z"
  } ],
  "page_info" : {
    "previous_marker" : "string",
    "next_marker" : "string",
    "current_count" : 2000
  }
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.