Bootstrap FreeKB - Venafi (Certificate Management) - List credentials using REST API
Venafi (Certificate Management) - List credentials using REST API


This assumes you have already obtained a Bearer Token using the Venafi REST API

AVOID TROUBLE

In order to list credentials, you will need to have the security:manage scope when obtaining a Bearer Token using the Venafi REST API.

The following curl command can be used to return the credentials that have been created. In this example, the credentials created at \\VED\\Policy\\Credentials will be returned.

curl
--insecure
--request POST
--header "Authorization: Bearer abc123"
--header "Content-Type: application/json"
--data '{ "CredentialPath": "\\VED\\Policy\\Credentials" }'
--url https://tpp.example.com/vedsdk/Credentials/enumerate

 

Something like this should be returned. The details of a credential can be returned.

{
    "CredentialInfos": [
        {
            "ClassName": "Certificate Credential",
            "FullName": "foo"
        },
        {
            "ClassName": "CyberArk Password Credential",
            "FullName": "bar"
        },
        {
            "ClassName": "Password Credential",
            "FullName": "foobar"
        }
    ],
    "Result": 1
}

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 2eb987 in the box below so that we can be sure you are a human.