Skip to content

ResourcesApi

Github Action edited this page Apr 10, 2021 · 6 revisions

ResourcesApi

All URIs are relative to http://localhost

Method HTTP request Description
showResource GET /resources/{account}/{kind}/{identifier} Shows a description of a single resource.
showResourcesForAccount GET /resources/{account} Lists resources within an organization account.
showResourcesForAllAccounts GET /resources Lists resources within an organization account.
showResourcesForKind GET /resources/{account}/{kind} Lists resources of the same kind within an organization account.

showResource

Resource showResource(account, kind, identifier, permittedRoles, privilege, check, role, xRequestId)

Shows a description of a single resource.

Details about a single resource. If permitted_roles and privilege are given, Conjur lists the roles with the specified privilege on the resource. If check, privilege and role are given, Conjur checks if the specified role has the privilege on the resource. If permitted_roles and check are both given, Conjur responds to the check call ONLY. ##### Permissions Required

Parameters

Name Type Description Notes
account String Organization account name [default to null]
kind String Type of resource [default to null]
identifier String ID of the resource for which to get the information about [default to null]
permittedRoles Boolean Lists the roles which have the named privilege on a resource. [optional] [default to null]
privilege String Level of privilege to filter on. Can only be used in combination with permitted_roles or check parameter. [optional] [default to null]
check Boolean Check whether a role has a privilege on a resource. [optional] [default to null]
role String Role to check privilege on. Can only be used in combination with check parameter. [optional] [default to null]
xRequestId String Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. [optional] [default to null]

Return type

Resource

Authorization

conjurAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

showResourcesForAccount

List showResourcesForAccount(account, kind, search, offset, limit, count, role, actingAs, xRequestId)

Lists resources within an organization account.

Lists resources within an organization account. If a kind query parameter is given, narrows results to only resources of that kind. If a limit is given, returns no more than that number of results. Providing an offset skips a number of resources before returning the rest. In addition, providing an offset will give limit a default value of 10 if none other is provided. These two parameters can be combined to page through results. If the parameter count is true, returns only the number of items in the list. ##### Text search If the search parameter is provided, narrows results to those pertaining to the search query. Search works across resource IDs and the values of annotations. It weighs results so that those with matching id or a matching value of an annotation called name appear first, then those with another matching annotation value, and finally those with a matching kind.

Parameters

Name Type Description Notes
account String Organization account name [default to null]
kind String Type of resource [optional] [default to null]
search String Filter resources based on this value by name [optional] [default to null]
offset Integer When listing resources, start at this item number. [optional] [default to null]
limit Integer When listing resources, return up to this many results. [optional] [default to null]
count Boolean When listing resources, if true, return only the count of the results. [optional] [default to null]
role String Retrieves the resources list for a different role if the authenticated role has access [optional] [default to null]
actingAs String Retrieves the resources list for a different role if the authenticated role has access [optional] [default to null]
xRequestId String Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. [optional] [default to null]

Return type

List

Authorization

conjurAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

showResourcesForAllAccounts

List showResourcesForAllAccounts(account, kind, search, offset, limit, count, role, actingAs, xRequestId)

Lists resources within an organization account.

Lists resources within an organization account. In the absence of an account query parameter, shows results for the account of the authorization token user. If an account query parameter is given, shows results for the specified account. If a kind query parameter is given, narrows results to only resources of that kind. If a limit is given, returns no more than that number of results. Providing an offset skips a number of resources before returning the rest. In addition, providing an offset will give limit a default value of 10 if none other is provided. These two parameters can be combined to page through results. If the parameter count is true, returns only the number of items in the list. ##### Text search If the search parameter is provided, narrows results to those pertaining to the search query. Search works across resource IDs and the values of annotations. It weighs results so that those with matching id or a matching value of an annotation called name appear first, then those with another matching annotation value, and finally those with a matching kind."

Parameters

Name Type Description Notes
account String Organization account name [optional] [default to null]
kind String Type of resource [optional] [default to null]
search String Filter resources based on this value by name [optional] [default to null]
offset Integer When listing resources, start at this item number. [optional] [default to null]
limit Integer When listing resources, return up to this many results. [optional] [default to null]
count Boolean When listing resources, if true, return only the count of the results. [optional] [default to null]
role String Retrieves the resources list for a different role if the authenticated role has access [optional] [default to null]
actingAs String Retrieves the resources list for a different role if the authenticated role has access [optional] [default to null]
xRequestId String Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. [optional] [default to null]

Return type

List

Authorization

conjurAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

showResourcesForKind

List showResourcesForKind(account, kind, search, offset, limit, count, role, actingAs, xRequestId)

Lists resources of the same kind within an organization account.

Lists resources of the same kind within an organization account. Kinds of resources include: policy, user, host, group, layer, or variable If a limit is given, returns no more than that number of results. Providing an offset skips a number of resources before returning the rest. In addition, providing an offset will give limit a default value of 10 if none other is provided. These two parameters can be combined to page through results. If the parameter count is true, returns only the number of items in the list. ##### Text search If the search parameter is provided, narrows results to those pertaining to the search query. Search works across resource IDs and the values of annotations. It weighs results so that those with matching id or a matching value of an annotation called name appear first, then those with another matching annotation value, and finally those with a matching kind.

Parameters

Name Type Description Notes
account String Organization account name [default to null]
kind String Type of resource [default to null]
search String Filter resources based on this value by name [optional] [default to null]
offset Integer When listing resources, start at this item number. [optional] [default to null]
limit Integer When listing resources, return up to this many results. [optional] [default to null]
count Boolean When listing resources, if true, return only the count of the results. [optional] [default to null]
role String Retrieves the resources list for a different role if the authenticated role has access [optional] [default to null]
actingAs String Retrieves the resources list for a different role if the authenticated role has access [optional] [default to null]
xRequestId String Add an ID to the request being made so it can be tracked in Conjur. If not provided the server will automatically generate one. [optional] [default to null]

Return type

List

Authorization

conjurAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json