Create a Credential for an Inventory Source
post
/api/v2/inventory_sources/{id}/credentials/
Make a POST request to this resource with the following credential fields to create a new credential associated with this inventory source.
name
: Name of this credential. (string, required)description
: Optional description of this credential. (string, default=""
)organization
: (id, default=None
)-
credential_type
: Specify the type of credential you want to create. Refer to the documentation for details on each type. (id, required) -
inputs
: Enter inputs using either JSON or YAML syntax. Refer to the documentation for example syntax. (json, default={}
)
Add Credentials for an Inventory Source:
Make a POST request to this resource with only an id
field to associate an
existing credential with this inventory source.
Remove Credentials from this Inventory Source:
Make a POST request to this resource with id
and disassociate
fields to
remove the credential from this inventory source
without deleting the credential.
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : schema
Type:
Show Source
object
-
credential_type(required):
integer
Specify the type of credential you want to create. Refer to the documentation for details on each type.
-
description:
string
-
inputs:
object inputs
Enter inputs using either JSON or YAML syntax. Refer to the documentation for example syntax.
-
name(required):
string
-
organization:
integer
Nested Schema : inputs
Type:
object
Enter inputs using either JSON or YAML syntax. Refer to the documentation for example syntax.
Response
Supported Media Types
- application/json
201 Response
400 Response
Example Response (application/json)
{
"msg":"Credentials of type insights and vault are disallowed for scm inventory sources."
}