Show a resource

The response to this method is a JSON document describing a single resource.

Permissions required

read privilege on the resource.

Kinds of resources

Kind

Description

User

One unique human

Host

A single logical machine (in the broad sense, not just physical)

Layer

A collection of hosts that have the same privileges

Group

A collection of users and groups that have the same privileges

Policy

Privileges on policies enable a user to create and modify objects and permissions

Variable

A secret such as a password, API key, SSH key, etc.

Webservice

An HTTP(S) web service which performs sensitive operations

 

Entity IDs must be URL-encoded.

URI

 
GET /resources/{account}/{kind}/{identifier}

URI Parameters

Parameter

Type

Mandatory

Description

account

String

Yes

Organization account name

Example: myorg

kind

String

Yes

The kind of resource requested

Example: variable

identifier

String

Yes

The identifier of the resource

Example: db/password

Any identifier included in the URL must be URL-encoded to be recognized by the Conjur API.

Examples:

Identifier

URL-Encoded

myapp-01

myapp-01(no change)

alice@devops

alice%40devops

prod/aws/db-password

prod%2Faws%2Fdb-password

research+development

research%2Bdevelopment

sales&marketing

sales%26marketing

Example URI

For example, to show the variable “db/password”:

 
GET /resources/myorg/variable/db/password

Request

Headers

Field

Description

Example

Authorization

Conjur access token

Token token=“eyJkYX…Rhb=”

 
Authorization: Token token="eyJkYX...Rhb="

Example with curl

 
curl -H "$(conjur authn authenticate -H)" \
    https://eval.conjur.org/resources/myorg/policy/app-prod

Response

Code

Description

200

Role memberships returned as a JSON list

401

The request lacks valid authentication credentials

403

The authenticated user lacks the necessary privilege

404

The requested resource does not exist

Response 200

Headers

 
Content-Type: application/json

Body

 
{
    "created_at": "2017-07-25T06:30:38.768+00:00",
    "id": "myorg:variable:db/password",
    "owner": "myorg:user:admin",
    "policy": "myorg:policy:root",
    "permissions": [],
    "annotations": [],
    "policy_versions": []
  }
]