V2

Get Credential

API getCredentialByType
Purpose: To
API URL: http://<APIURL>:<APIPort>/v2/ansibleAWX/getCredentialByType/orgentityid/{orgentityid}?toolId={toolid} &type={type}
Authentication Type Basic
Method Type Get

Parameters Required for Request Body

Column Column Type Mandatory Expected/Sample Value Remarks
toolId Integer Yes 20 This field contains Runbook Tool Id, we will get configuration information based on Tool Id
type string Yes Machine/ Vault/ Container Registry This fields contains credential type, based on this we will get list of credentials
Output
{
  "Count": 1,
  "Result": {
    "count": 2,
    "next": null,
    "previos": null,
    "results": [
      {
        "id": 7,
        "name": "Credential_Test"
      },
      {
        "id": 1,
        "name": "Demo Credential"
      }
    ]
  },
  "Status": "Success",
  "Message": "Success"
}

Parameters Returned from Response of API

Column Column Type Value Remarks
Count Integer 1 This field provide 1 for success and 0 for Fail
Result-count Integer 2 Count of total credentials
Result-next Integer 1 This field provide how many next page is available
Result-previous Integer 1 This field provide how many previous page is available
Result-results Object
{
        "id": 1,
        "name": "Demo Credential"
      }
It contains the list of id and Credential name