package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppResource.SearchAppEntitlementResourceBindings(ctx, operations.C1APIAppV1AppResourceServiceSearchAppEntitlementResourceBindingsRequest{
AppID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.SearchAppEntitlementResourceBindingsResponse != nil {
// handle response
}
}curl --request POST \
--url https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"appEntitlementId": "<string>",
"appResourceId": "<string>",
"appResourceTypeId": "<string>",
"pageSize": 123,
"pageToken": "<string>",
"query": "<string>",
"resourceTypeIds": [
"<string>"
]
}
'import requests
url = "https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search"
payload = {
"appEntitlementId": "<string>",
"appResourceId": "<string>",
"appResourceTypeId": "<string>",
"pageSize": 123,
"pageToken": "<string>",
"query": "<string>",
"resourceTypeIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appEntitlementId: '<string>',
appResourceId: '<string>',
appResourceTypeId: '<string>',
pageSize: 123,
pageToken: '<string>',
query: '<string>',
resourceTypeIds: ['<string>']
})
};
fetch('https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'appEntitlementId' => '<string>',
'appResourceId' => '<string>',
'appResourceTypeId' => '<string>',
'pageSize' => 123,
'pageToken' => '<string>',
'query' => '<string>',
'resourceTypeIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"appEntitlementId\": \"<string>\",\n \"appResourceId\": \"<string>\",\n \"appResourceTypeId\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"query\": \"<string>\",\n \"resourceTypeIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appEntitlementId\": \"<string>\",\n \"appResourceId\": \"<string>\",\n \"appResourceTypeId\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"query\": \"<string>\",\n \"resourceTypeIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"list": [
{
"appEntitlement": {
"alias": "<string>",
"annotations": {},
"appId": "<string>",
"appResourceId": "<string>",
"appResourceTypeId": "<string>",
"certifyPolicyId": "<string>",
"complianceFrameworkValueIds": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"defaultValuesApplied": true,
"deletedAt": "2023-11-07T05:31:56Z",
"deprovisionerPolicy": {
"action": {
"actionName": "<string>",
"appId": "<string>",
"connectorId": "<string>",
"displayName": "<string>"
},
"connector": {
"account": {
"config": {},
"connectorId": "<string>",
"doNotSave": {},
"saveToVault": {
"vaultIds": [
"<string>"
]
},
"schemaId": "<string>"
},
"defaultBehavior": {
"connectorId": "<string>"
},
"deleteAccount": {
"connectorId": "<string>"
}
},
"delegated": {
"appId": "<string>",
"entitlementId": "<string>",
"implicit": true
},
"devicePlacement": {
"vaultBoundaryId": "<string>"
},
"externalTicket": {
"appId": "<string>",
"connectorId": "<string>",
"externalTicketProvisionerConfigId": "<string>",
"instructions": "<string>"
},
"manual": {
"assignee": {
"appOwners": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"entitlementOwners": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"expression": {
"allowReassignment": true,
"expressions": [
"<string>"
],
"fallbackUserIds": [
"<string>"
]
},
"group": {
"allowReassignment": true,
"appGroupId": "<string>",
"appId": "<string>",
"fallbackUserIds": [
"<string>"
]
},
"manager": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"users": {
"allowReassignment": true,
"userIds": [
"<string>"
]
}
},
"instructions": "<string>",
"userIds": [
"<string>"
]
},
"multiStep": {
"provisionSteps": "<array>"
},
"unconfigured": {},
"webhook": {
"webhookId": "<string>"
}
},
"description": "<string>",
"displayName": "<string>",
"durationGrant": "<string>",
"durationUnset": {},
"emergencyGrantEnabled": true,
"emergencyGrantPolicyId": "<string>",
"externalId": "<string>",
"grantCount": "<string>",
"grantPolicyId": "<string>",
"id": "<string>",
"isAutomationEnabled": true,
"isManuallyManaged": true,
"matchBatonId": "<string>",
"overrideAccessRequestsDefaults": true,
"provisionerPolicy": {
"action": {
"actionName": "<string>",
"appId": "<string>",
"connectorId": "<string>",
"displayName": "<string>"
},
"connector": {
"account": {
"config": {},
"connectorId": "<string>",
"doNotSave": {},
"saveToVault": {
"vaultIds": [
"<string>"
]
},
"schemaId": "<string>"
},
"defaultBehavior": {
"connectorId": "<string>"
},
"deleteAccount": {
"connectorId": "<string>"
}
},
"delegated": {
"appId": "<string>",
"entitlementId": "<string>",
"implicit": true
},
"devicePlacement": {
"vaultBoundaryId": "<string>"
},
"externalTicket": {
"appId": "<string>",
"connectorId": "<string>",
"externalTicketProvisionerConfigId": "<string>",
"instructions": "<string>"
},
"manual": {
"assignee": {
"appOwners": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"entitlementOwners": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"expression": {
"allowReassignment": true,
"expressions": [
"<string>"
],
"fallbackUserIds": [
"<string>"
]
},
"group": {
"allowReassignment": true,
"appGroupId": "<string>",
"appId": "<string>",
"fallbackUserIds": [
"<string>"
]
},
"manager": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"users": {
"allowReassignment": true,
"userIds": [
"<string>"
]
}
},
"instructions": "<string>",
"userIds": [
"<string>"
]
},
"multiStep": {
"provisionSteps": "<array>"
},
"unconfigured": {},
"webhook": {
"webhookId": "<string>"
}
},
"purpose": "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED",
"requestSchemaId": "<string>",
"revokePolicyId": "<string>",
"riskLevelValueId": "<string>",
"slug": "<string>",
"sourceConnectorIds": {},
"systemBuiltin": true,
"updatedAt": "2023-11-07T05:31:56Z",
"userEditedMask": "<string>"
},
"appResource": {
"accessConfigId": "<string>",
"agentTrait": {
"identityAppUserId": "<string>",
"status": "AGENT_STATUS_UNSPECIFIED"
},
"annotations": {},
"appId": "<string>",
"appResourceTypeId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"customDescription": "<string>",
"deletedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"displayName": "<string>",
"externalId": "<string>",
"grantCount": "<string>",
"id": "<string>",
"isManuallyManaged": true,
"matchBatonId": "<string>",
"nhiDetail": "<string>",
"nhiType": "NHI_TYPE_UNSPECIFIED",
"parentAppResourceId": "<string>",
"parentAppResourceTypeId": "<string>",
"profile": {},
"secretTrait": {
"createdByAppUserId": "<string>",
"credentialDetail": "<string>",
"identityAppUserId": "<string>",
"lastUsedAt": "2023-11-07T05:31:56Z",
"secretCreatedAt": "2023-11-07T05:31:56Z",
"secretExpiresAt": "2023-11-07T05:31:56Z"
},
"updatedAt": "2023-11-07T05:31:56Z"
},
"appResourceType": {
"appId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"id": "<string>",
"traitIds": [
"<string>"
],
"updatedAt": "2023-11-07T05:31:56Z"
},
"deprovisionAt": "2023-11-07T05:31:56Z"
}
],
"nextPageToken": "<string>"
}Search App Entitlement Resource Bindings
Search the non-user grantees of an app entitlement, such as groups granted the entitlement, or the entitlements an app resource is granted. User grantees are returned by the grants search.
package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppResource.SearchAppEntitlementResourceBindings(ctx, operations.C1APIAppV1AppResourceServiceSearchAppEntitlementResourceBindingsRequest{
AppID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.SearchAppEntitlementResourceBindingsResponse != nil {
// handle response
}
}curl --request POST \
--url https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"appEntitlementId": "<string>",
"appResourceId": "<string>",
"appResourceTypeId": "<string>",
"pageSize": 123,
"pageToken": "<string>",
"query": "<string>",
"resourceTypeIds": [
"<string>"
]
}
'import requests
url = "https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search"
payload = {
"appEntitlementId": "<string>",
"appResourceId": "<string>",
"appResourceTypeId": "<string>",
"pageSize": 123,
"pageToken": "<string>",
"query": "<string>",
"resourceTypeIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appEntitlementId: '<string>',
appResourceId: '<string>',
appResourceTypeId: '<string>',
pageSize: 123,
pageToken: '<string>',
query: '<string>',
resourceTypeIds: ['<string>']
})
};
fetch('https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'appEntitlementId' => '<string>',
'appResourceId' => '<string>',
'appResourceTypeId' => '<string>',
'pageSize' => 123,
'pageToken' => '<string>',
'query' => '<string>',
'resourceTypeIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"appEntitlementId\": \"<string>\",\n \"appResourceId\": \"<string>\",\n \"appResourceTypeId\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"query\": \"<string>\",\n \"resourceTypeIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}.conductor.one/api/v1/apps/{app_id}/entitlement_resource_bindings/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appEntitlementId\": \"<string>\",\n \"appResourceId\": \"<string>\",\n \"appResourceTypeId\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"query\": \"<string>\",\n \"resourceTypeIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"list": [
{
"appEntitlement": {
"alias": "<string>",
"annotations": {},
"appId": "<string>",
"appResourceId": "<string>",
"appResourceTypeId": "<string>",
"certifyPolicyId": "<string>",
"complianceFrameworkValueIds": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"defaultValuesApplied": true,
"deletedAt": "2023-11-07T05:31:56Z",
"deprovisionerPolicy": {
"action": {
"actionName": "<string>",
"appId": "<string>",
"connectorId": "<string>",
"displayName": "<string>"
},
"connector": {
"account": {
"config": {},
"connectorId": "<string>",
"doNotSave": {},
"saveToVault": {
"vaultIds": [
"<string>"
]
},
"schemaId": "<string>"
},
"defaultBehavior": {
"connectorId": "<string>"
},
"deleteAccount": {
"connectorId": "<string>"
}
},
"delegated": {
"appId": "<string>",
"entitlementId": "<string>",
"implicit": true
},
"devicePlacement": {
"vaultBoundaryId": "<string>"
},
"externalTicket": {
"appId": "<string>",
"connectorId": "<string>",
"externalTicketProvisionerConfigId": "<string>",
"instructions": "<string>"
},
"manual": {
"assignee": {
"appOwners": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"entitlementOwners": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"expression": {
"allowReassignment": true,
"expressions": [
"<string>"
],
"fallbackUserIds": [
"<string>"
]
},
"group": {
"allowReassignment": true,
"appGroupId": "<string>",
"appId": "<string>",
"fallbackUserIds": [
"<string>"
]
},
"manager": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"users": {
"allowReassignment": true,
"userIds": [
"<string>"
]
}
},
"instructions": "<string>",
"userIds": [
"<string>"
]
},
"multiStep": {
"provisionSteps": "<array>"
},
"unconfigured": {},
"webhook": {
"webhookId": "<string>"
}
},
"description": "<string>",
"displayName": "<string>",
"durationGrant": "<string>",
"durationUnset": {},
"emergencyGrantEnabled": true,
"emergencyGrantPolicyId": "<string>",
"externalId": "<string>",
"grantCount": "<string>",
"grantPolicyId": "<string>",
"id": "<string>",
"isAutomationEnabled": true,
"isManuallyManaged": true,
"matchBatonId": "<string>",
"overrideAccessRequestsDefaults": true,
"provisionerPolicy": {
"action": {
"actionName": "<string>",
"appId": "<string>",
"connectorId": "<string>",
"displayName": "<string>"
},
"connector": {
"account": {
"config": {},
"connectorId": "<string>",
"doNotSave": {},
"saveToVault": {
"vaultIds": [
"<string>"
]
},
"schemaId": "<string>"
},
"defaultBehavior": {
"connectorId": "<string>"
},
"deleteAccount": {
"connectorId": "<string>"
}
},
"delegated": {
"appId": "<string>",
"entitlementId": "<string>",
"implicit": true
},
"devicePlacement": {
"vaultBoundaryId": "<string>"
},
"externalTicket": {
"appId": "<string>",
"connectorId": "<string>",
"externalTicketProvisionerConfigId": "<string>",
"instructions": "<string>"
},
"manual": {
"assignee": {
"appOwners": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"entitlementOwners": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"expression": {
"allowReassignment": true,
"expressions": [
"<string>"
],
"fallbackUserIds": [
"<string>"
]
},
"group": {
"allowReassignment": true,
"appGroupId": "<string>",
"appId": "<string>",
"fallbackUserIds": [
"<string>"
]
},
"manager": {
"allowReassignment": true,
"fallbackUserIds": [
"<string>"
]
},
"users": {
"allowReassignment": true,
"userIds": [
"<string>"
]
}
},
"instructions": "<string>",
"userIds": [
"<string>"
]
},
"multiStep": {
"provisionSteps": "<array>"
},
"unconfigured": {},
"webhook": {
"webhookId": "<string>"
}
},
"purpose": "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED",
"requestSchemaId": "<string>",
"revokePolicyId": "<string>",
"riskLevelValueId": "<string>",
"slug": "<string>",
"sourceConnectorIds": {},
"systemBuiltin": true,
"updatedAt": "2023-11-07T05:31:56Z",
"userEditedMask": "<string>"
},
"appResource": {
"accessConfigId": "<string>",
"agentTrait": {
"identityAppUserId": "<string>",
"status": "AGENT_STATUS_UNSPECIFIED"
},
"annotations": {},
"appId": "<string>",
"appResourceTypeId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"customDescription": "<string>",
"deletedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"displayName": "<string>",
"externalId": "<string>",
"grantCount": "<string>",
"id": "<string>",
"isManuallyManaged": true,
"matchBatonId": "<string>",
"nhiDetail": "<string>",
"nhiType": "NHI_TYPE_UNSPECIFIED",
"parentAppResourceId": "<string>",
"parentAppResourceTypeId": "<string>",
"profile": {},
"secretTrait": {
"createdByAppUserId": "<string>",
"credentialDetail": "<string>",
"identityAppUserId": "<string>",
"lastUsedAt": "2023-11-07T05:31:56Z",
"secretCreatedAt": "2023-11-07T05:31:56Z",
"secretExpiresAt": "2023-11-07T05:31:56Z"
},
"updatedAt": "2023-11-07T05:31:56Z"
},
"appResourceType": {
"appId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"id": "<string>",
"traitIds": [
"<string>"
],
"updatedAt": "2023-11-07T05:31:56Z"
},
"deprovisionAt": "2023-11-07T05:31:56Z"
}
],
"nextPageToken": "<string>"
}Authorizations
This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.
Path Parameters
Body
The request message for searching app entitlement resource bindings, the grants of an entitlement to a non-user app resource such as a group. Search from either end: set app_entitlement_id to list the resources granted an entitlement, or set app_resource_type_id and app_resource_id to list the entitlements granted to a resource. Exactly one of the two must be provided.
Response
The response message containing the matching app entitlement resource bindings.
The response message containing the matching app entitlement resource bindings.
The nextPageToken is shown for the next page if the number of results is larger than the max page size. The server returns one page of results and the nextPageToken until all results are retrieved. To retrieve the next page, use the same request and append a pageToken field with the value of nextPageToken shown on the previous page.
Was this page helpful?