Create Managed Registry Credential

Create Managed Registry Credential
Creates a managed registry credential

Create a new credential for a hosted registry. The id of the organization is fetched from CSP token

Request
URI
POST
https://api.app-catalog.vmware.com/v1/registries/{registry_id}/credentials
COPY
Path Parameters
registry_id
Required

A string as the identifier of a registry


Request Body

It contains details about the registry credentials to be created

CreateManagedRegistryCredentialRequest of type(s) application/json
Required
{
    "description": "Credential for server A"
}
string
description
Required

Description of the credential requested

Authentication
This operation uses the following authentication methods.
Responses
201

The credentials have been created

Returns CreateManagedRegistryCredentialResponse of type(s) application/json
{
    "username": "_json_key",
    "password": "ad00r12ba154mm"
}
string
username
Required

Username of the registry credentials created

string
password
Required

Password of the registry credentials created

Response Headers

string
Location

URL to the created managed registry credentials


400

An error related to the request

Returns ConstraintsViolationsError of type(s) application/problem+json
This response body class contains all of the following: InlineConstraintsViolationsError0
{
    "type": "https://example.com/probs/validation-error",
    "title": "Validation error",
    "status": 400,
    "detail": "There was an error validating the request",
    "violations": [
        {
            "field": "amount",
            "message": "It should be greater than zero"
        }
    ]
}
array of object
violations
Required

It represents a constraints violation error


403

The requesting user is not authorized to create credentials

Returns Error403 of type(s) application/problem+json
This response body class contains all of the following: InlineError4030
{
    "type": "https://example.com/probs/out-of-credit",
    "title": "You do not have enough credit.",
    "status": 403,
    "detail": "Your current balance is 30, but that costs 50",
    "instance": "/account/2217eb9c-f042-11eb-9a03-0242ac130003/msgs/abc"
}

404

The registry is not found

Returns Error404 of type(s) application/problem+json
This response body class contains all of the following: InlineError4040
{
    "type": "https://example.com/probs/out-of-credit",
    "title": "You do not have enough credit.",
    "status": 403,
    "detail": "Your current balance is 30, but that costs 50",
    "instance": "/account/2217eb9c-f042-11eb-9a03-0242ac130003/msgs/abc"
}

500

An internal server error object

Returns Error500 of type(s) application/problem+json
This response body class contains all of the following: InlineError5000
{
    "type": "https://example.com/probs/out-of-credit",
    "title": "You do not have enough credit.",
    "status": 403,
    "detail": "Your current balance is 30, but that costs 50",
    "instance": "/account/2217eb9c-f042-11eb-9a03-0242ac130003/msgs/abc"
}

503

The server is temporarily unavailable

Returns Error503 of type(s) application/problem+json
This response body class contains all of the following: InlineError5030
{
    "type": "https://example.com/probs/out-of-credit",
    "title": "You do not have enough credit.",
    "status": 403,
    "detail": "Your current balance is 30, but that costs 50",
    "instance": "/account/2217eb9c-f042-11eb-9a03-0242ac130003/msgs/abc"
}

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"description:"string"}' https://{api_host}/v1/registries/{registry_id}/credentials