Credentials APIs

Credentials APIs

APIs for managing Credentials

1. Get the Credentials

This API is used to fetch all credentials known to the system.

1.1. Prerequisites

The following data is required

  • Resource type, name, IP address, accountType or the domain name associated with the resource is required to filter the results. For allowable resource type values, refer : Get the Credentials API

  • "pageNumber" and "pageSize" filters are recommended to be additionally used for limiting response content and also improving response time.

Get All Credentials in Page

1.2. Steps

  • Invoke the API by specifying the "pageNumber" and "pageSize" filters.

Tip : Other filters like "resourceName" , "resourceIp" , "resourceType" and "domainName" can be additionally used as search criteria.

Tip : If no value for "pageNumber" and "pageSize" filters is specified, the API returns all known records in a single page.

Tip : Page number starts with 0.

Tip : A page size value equal to 0 will return all known records in a single page.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials?pageNumber=0&pageSize=15' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials?pageNumber=0&pageSize=15 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 7985

{
  "elements" : [ {
    "id" : "773d763d-84c2-41a4-a0dc-4f6ad610acaa",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "632162e6-bb74-48e4-a693-117d5ab10b8b",
      "resourceName" : "sfo01-m01-esx01.rainpole.io",
      "resourceIp" : "10.0.0.100",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "7065dbfb-91ab-49f5-89f7-7258c5df13db",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "5c872760-e020-40d2-aedd-62e8b8a71291",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceIp" : "10.0.0.101",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "879e49a5-f621-448a-aaab-48c39c633ffd",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "ea90b0ba-a7c7-4a0f-a9a3-a46738db33ed",
      "resourceName" : "sfo01-m01-esx03.rainpole.io",
      "resourceIp" : "10.0.0.102",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "28e60514-28d1-48d5-b1ec-28749466c2d1",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "5de0cca0-5218-4807-aa36-eb661f885d3e",
      "resourceName" : "sfo01-m01-esx04.rainpole.io",
      "resourceIp" : "10.0.0.103",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "5f12ff3e-64e1-457e-8ffb-97f59d584681",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "3fde8a66-5637-483d-b059-b552266345ff",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "VCENTER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "4beb100b-e355-434d-89d1-d102226abfb6",
    "credentialType" : "SSO",
    "accountType" : "USER",
    "username" : "[email protected]",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "94b0271e-faa3-4dd2-9318-fcf696a86a3e",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "PSC",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "599ca621-482f-44c5-a609-88c7df5b1264",
    "credentialType" : "SSO",
    "accountType" : "SERVICE",
    "username" : "[email protected]",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "90435bdc-e655-4e89-9c59-70008b35a2ad",
      "resourceName" : "sfo01m01vcenter01.sfo01.rainpole.local",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "VCENTER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "a3e03d23-bfc0-4e87-8f26-2991020ae5c4",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "dcca292f-b193-449a-a7e5-1749b47bfbca",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceIp" : "10.0.0.9",
      "resourceType" : "NSXT_MANAGER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "ace7c7a5-86c5-43eb-b69c-cc9a39b564a0",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "4ab56d23-357d-4a94-8dfc-a056d68f1fac",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceIp" : "10.0.0.9",
      "resourceType" : "NSXT_MANAGER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "34f87652-331c-4ab9-9b50-64b3b28db8f0",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "8b939cbc-257f-45c0-985d-a1dd9607ea86",
      "resourceName" : "sfo-vrli01.rainpole.io",
      "resourceIp" : "10.0.0.15",
      "resourceType" : "VRLI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "d56c4428-8860-4559-9231-bd98b27b53ce",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "3d011451-4f0f-4f82-926c-2f60b02ca80b",
      "resourceName" : "sfo-vrli01b.rainpole.io",
      "resourceIp" : "10.0.0.16",
      "resourceType" : "VRLI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "d2428518-d687-4db8-8a6c-8e22367fc9c7",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "75f32f35-a2c2-4751-a7d4-20a4e65bb9cc",
      "resourceName" : "xreg-vrops01a.rainpole.io",
      "resourceIp" : "10.0.1.33",
      "resourceType" : "VROPS",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "01ac9800-1084-40a8-8aa6-60fdb51a3b1a",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "183e1846-3421-4355-86db-6d326c608d6f",
      "resourceName" : "xreg-vrops01.rainpole.io",
      "resourceIp" : "10.0.0.31",
      "resourceType" : "VROPS",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "10277185-fbe9-46b4-ad9d-86ae51e9e657",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "72fc4dd5-83ae-4ace-8e53-3bb0aa35637b",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceIp" : "10.0.0.32",
      "resourceType" : "VRSLCM",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "b8b7e1fc-c122-46a6-b394-bf453cf4f1ca",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin@localhost",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.873Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.873Z",
    "resource" : {
      "resourceId" : "7973fa4c-9647-4848-9e4c-9e085f4b9d3c",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceIp" : "10.0.0.32",
      "resourceType" : "VRSLCM",
      "domainName" : "MGMT"
    }
  } ],
  "pageMetadata" : {
    "pageNumber" : 0,
    "pageSize" : 15,
    "totalElements" : 15,
    "totalPages" : 1
  }
}

Get All Credentials

1.3. Steps

  • Invoke the API.

Tip : For a scaled environment, it is always recommended to provide "resourceType" filter for avoiding timeouts.

Tip : "pageNumber" and "pageSize" filters are recommended to be additionally used for limiting response content and also improving response time.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 7985

{
  "elements" : [ {
    "id" : "1bcd24e3-8be1-4072-a03f-d153483a2ab9",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "146e3cdc-9680-47ca-8a2d-808a10caa14b",
      "resourceName" : "sfo01-m01-esx01.rainpole.io",
      "resourceIp" : "10.0.0.100",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "7065dbfb-91ab-49f5-89f7-7258c5df13db",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "5c872760-e020-40d2-aedd-62e8b8a71291",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceIp" : "10.0.0.101",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "de871a77-1199-4208-abae-f4816dd33e65",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "a451d548-6b47-4fce-8811-9315cf2a117b",
      "resourceName" : "sfo01-m01-esx03.rainpole.io",
      "resourceIp" : "10.0.0.102",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "2ab58cfa-52ae-4586-9723-75d5cfecabc7",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "0069209d-0016-46ae-9876-358e77bb3d0b",
      "resourceName" : "sfo01-m01-esx04.rainpole.io",
      "resourceIp" : "10.0.0.103",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "682b168e-ced6-41a7-909c-6331ef9f4421",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "3fde8a66-5637-483d-b059-b552266345ff",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "VCENTER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "ef483471-8444-4921-a3e5-7803671568ca",
    "credentialType" : "SSO",
    "accountType" : "USER",
    "username" : "[email protected]",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "83d8ae1c-de51-4151-8306-f390d4f0c6a2",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "PSC",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "c012592e-eac1-44f2-bc0c-83e35bf9950a",
    "credentialType" : "SSO",
    "accountType" : "SERVICE",
    "username" : "[email protected]",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "6633a358-dbde-43c8-a0a5-9f033a76d141",
      "resourceName" : "sfo01m01vcenter01.sfo01.rainpole.local",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "VCENTER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "8b6c14c1-6a1e-4de4-8a07-8b8ac257f344",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "14455491-f9f3-4bba-b65a-0ea0d7660e1e",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceIp" : "10.0.0.9",
      "resourceType" : "NSXT_MANAGER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "3b78b147-99d9-4d1c-af88-91db27102512",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "f49094cd-ba37-4bd3-871b-c4975adf7c54",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceIp" : "10.0.0.9",
      "resourceType" : "NSXT_MANAGER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "2b609d03-3657-4d50-b2b7-9ef53def1e6a",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "b500a722-293b-4195-a562-c80d322f579e",
      "resourceName" : "sfo-vrli01.rainpole.io",
      "resourceIp" : "10.0.0.15",
      "resourceType" : "VRLI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "55efde07-2644-46fd-b31c-6651e1887d7c",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "4e0e4cb7-39ce-4c59-a4e5-b4b898e473f5",
      "resourceName" : "sfo-vrli01b.rainpole.io",
      "resourceIp" : "10.0.0.16",
      "resourceType" : "VRLI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "e9035495-459a-4f95-8983-4a9c2c44f329",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "d2586f33-fdfb-4178-a465-0bf73b3c375b",
      "resourceName" : "xreg-vrops01a.rainpole.io",
      "resourceIp" : "10.0.1.33",
      "resourceType" : "VROPS",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "f120ca1a-ddff-4ab2-873e-a5ec2ce72c54",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "6da77965-8c7f-4ff8-8242-188137b02812",
      "resourceName" : "xreg-vrops01.rainpole.io",
      "resourceIp" : "10.0.0.31",
      "resourceType" : "VROPS",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "b95ad183-63d4-45c9-a792-7220f11fd623",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "41641fe0-5337-4f0a-af33-12713a0f423d",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceIp" : "10.0.0.32",
      "resourceType" : "VRSLCM",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "865b577f-d8b0-4cec-b1e2-725717e1b9b2",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin@localhost",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.958Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.958Z",
    "resource" : {
      "resourceId" : "d7da58fa-56cf-467d-8c91-9d3c6935e075",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceIp" : "10.0.0.32",
      "resourceType" : "VRSLCM",
      "domainName" : "MGMT"
    }
  } ],
  "pageMetadata" : {
    "pageNumber" : 0,
    "pageSize" : 15,
    "totalElements" : 15,
    "totalPages" : 1
  }
}

Get Credentials by "resourceName"
This API can be used to fetch the credentials associated with a resource with a specific name.

1.4. Steps

  • Invoke the API by specifying the "resourceName".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials?resourceName=sfo01-mo1-esx02.rainpole.io' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials?resourceName=sfo01-mo1-esx02.rainpole.io HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 656

{
  "elements" : [ {
    "id" : "7065dbfb-91ab-49f5-89f7-7258c5df13db",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.795Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.795Z",
    "resource" : {
      "resourceId" : "5c872760-e020-40d2-aedd-62e8b8a71291",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceIp" : "10.0.0.101",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  } ],
  "pageMetadata" : {
    "pageNumber" : 0,
    "pageSize" : 1,
    "totalElements" : 1,
    "totalPages" : 1
  }
}

Get Credentials by "resourceIp"
This API can be used to fetch the credentials associated with a resource with a specific IP address.

1.5. Steps

  • Invoke the API by specifying the "resourceIp".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials?resourceIp=10.0.0.101' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials?resourceIp=10.0.0.101 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 656

{
  "elements" : [ {
    "id" : "7065dbfb-91ab-49f5-89f7-7258c5df13db",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:15.493Z",
    "modificationTimestamp" : "2022-01-24T14:06:15.493Z",
    "resource" : {
      "resourceId" : "5c872760-e020-40d2-aedd-62e8b8a71291",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceIp" : "10.0.0.101",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  } ],
  "pageMetadata" : {
    "pageNumber" : 0,
    "pageSize" : 1,
    "totalElements" : 1,
    "totalPages" : 1
  }
}

Get Credentials by "resourceType"
This API can be used to fetch the credentials associated with all the resources with a specific resource type.

1.6. Steps

  • Invoke the API by specifying the "resourceType".

Tip : "pageNumber" and "pageSize" filters are recommended to be additionally used for limiting response content and also improving response time.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials?resourceType=ESXI' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials?resourceType=ESXI HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2219

{
  "elements" : [ {
    "id" : "99a0ec11-dbba-4b2d-af66-78fdfc986e6f",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.821Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.821Z",
    "resource" : {
      "resourceId" : "f0191224-979c-4ca8-bd78-17cc7809991a",
      "resourceName" : "sfo01-m01-esx01.rainpole.io",
      "resourceIp" : "10.0.0.100",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "7065dbfb-91ab-49f5-89f7-7258c5df13db",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.821Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.821Z",
    "resource" : {
      "resourceId" : "5c872760-e020-40d2-aedd-62e8b8a71291",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceIp" : "10.0.0.101",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "bee987d1-3a4e-481e-a12c-419eb55475c0",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.821Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.821Z",
    "resource" : {
      "resourceId" : "67b642a1-f8fc-4369-bfd2-d3e1e6402aa9",
      "resourceName" : "sfo01-m01-esx03.rainpole.io",
      "resourceIp" : "10.0.0.102",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "988171f5-d12f-47d3-a0a5-a0dceb4bf832",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:14.821Z",
    "modificationTimestamp" : "2022-01-24T14:06:14.821Z",
    "resource" : {
      "resourceId" : "98c48521-672a-44cf-b01e-9188f63c491d",
      "resourceName" : "sfo01-m01-esx04.rainpole.io",
      "resourceIp" : "10.0.0.103",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  } ],
  "pageMetadata" : {
    "pageNumber" : 0,
    "pageSize" : 4,
    "totalElements" : 4,
    "totalPages" : 1
  }
}

Get Credentials by "domainName"
This API can be used to fetch the credentials associated with all the resources belonging to a specific domain.

1.7. Steps

  • Invoke the API by specifying the "domainName".

Tip : "pageNumber" and "pageSize" filters are recommended to be additionally used for limiting response content and also improving response time.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials?domainName=MGMT' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials?domainName=MGMT HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 7985

{
  "elements" : [ {
    "id" : "cef992a0-3603-4892-85ba-9d30f5d0206d",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "8f736802-9d73-4aa9-b272-cf1d6695ed74",
      "resourceName" : "sfo01-m01-esx01.rainpole.io",
      "resourceIp" : "10.0.0.100",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "7065dbfb-91ab-49f5-89f7-7258c5df13db",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "5c872760-e020-40d2-aedd-62e8b8a71291",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceIp" : "10.0.0.101",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "84f2dd27-833c-4659-86b3-23ee0e7e8d2f",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "04421801-2793-4ae1-bc8e-867f51df85cb",
      "resourceName" : "sfo01-m01-esx03.rainpole.io",
      "resourceIp" : "10.0.0.102",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "dd993567-4994-417d-b364-3b4d020880db",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "3e303f5d-5db9-442d-8cfc-1aa23e96f135",
      "resourceName" : "sfo01-m01-esx04.rainpole.io",
      "resourceIp" : "10.0.0.103",
      "resourceType" : "ESXI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "659d612a-d186-43f6-b86e-7214da35ea84",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "3fde8a66-5637-483d-b059-b552266345ff",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "VCENTER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "40138cdb-bf64-4578-98d1-2c444bfd5b2b",
    "credentialType" : "SSO",
    "accountType" : "USER",
    "username" : "[email protected]",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "a735d28d-58e9-48c2-98f8-1586e7431143",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "PSC",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "2a337613-f835-4259-91ee-cbc922703069",
    "credentialType" : "SSO",
    "accountType" : "SERVICE",
    "username" : "[email protected]",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "3d0c806d-df1c-452c-b203-f4c6f703eeeb",
      "resourceName" : "sfo01m01vcenter01.sfo01.rainpole.local",
      "resourceIp" : "10.0.0.6",
      "resourceType" : "VCENTER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "29fd6d4b-60a9-4f9a-9fe7-1baddd09663d",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "164a1723-d85e-4fd7-a0fc-2d88021475ee",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceIp" : "10.0.0.9",
      "resourceType" : "NSXT_MANAGER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "4c9a1aec-30e8-4c72-9f0d-f0ea367acaab",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "6e950cb0-2539-4af7-9ab4-42fab100c9f8",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceIp" : "10.0.0.9",
      "resourceType" : "NSXT_MANAGER",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "fded0b16-2764-4cf8-92fb-8c14df34955b",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "b1d1582d-7b66-4452-befd-272f644e9f0c",
      "resourceName" : "sfo-vrli01.rainpole.io",
      "resourceIp" : "10.0.0.15",
      "resourceType" : "VRLI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "4c849a14-6479-4ff6-a215-8c952a23d1da",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "870d56c9-73b5-49f9-b0be-a4a5520161e9",
      "resourceName" : "sfo-vrli01b.rainpole.io",
      "resourceIp" : "10.0.0.16",
      "resourceType" : "VRLI",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "ee0de33a-49f1-4a62-bbe8-b87459c40ee1",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "62cdc69a-478b-4a0c-880a-1a88fcfe72e7",
      "resourceName" : "xreg-vrops01a.rainpole.io",
      "resourceIp" : "10.0.1.33",
      "resourceType" : "VROPS",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "db9e099b-a20c-43a8-90d0-70debcc3c2cc",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "0041a138-e645-4a5c-8176-1be19ecc89fc",
      "resourceName" : "xreg-vrops01.rainpole.io",
      "resourceIp" : "10.0.0.31",
      "resourceType" : "VROPS",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "9549ce6f-5380-4643-8ba5-89a26969e798",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "2f29fb8c-c7b8-4693-b8fc-d989ab6c176f",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceIp" : "10.0.0.32",
      "resourceType" : "VRSLCM",
      "domainName" : "MGMT"
    }
  }, {
    "id" : "84f31334-0782-4923-91a5-e6dce3515c3f",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin@localhost",
    "password" : "VMwareInfra@1",
    "creationTimestamp" : "2022-01-24T14:06:16.702Z",
    "modificationTimestamp" : "2022-01-24T14:06:16.702Z",
    "resource" : {
      "resourceId" : "a8b4f26d-3f76-40a4-8834-f9339efea6f3",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceIp" : "10.0.0.32",
      "resourceType" : "VRSLCM",
      "domainName" : "MGMT"
    }
  } ],
  "pageMetadata" : {
    "pageNumber" : 0,
    "pageSize" : 15,
    "totalElements" : 15,
    "totalPages" : 1
  }
}

Note : SSH services might be disabled for a few accounts. The user needs to enable SSH service in the product in order to use SSH credentials. In order to connect to the "enable" user of NSX_MANAGER, firstly enable SSH services using API credentials, connect to the API user and then enter enable mode using "enable" user credentials.

2. Get a Credential

This API is used to fetch credential for an ID.

2.1. Prerequisites

The following data is required

  • ID of the credential

2.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/7065dbfb-91ab-49f5-89f7-7258c5df13db' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials/7065dbfb-91ab-49f5-89f7-7258c5df13db HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 489

{
  "id" : "7065dbfb-91ab-49f5-89f7-7258c5df13db",
  "credentialType" : "SSH",
  "accountType" : "USER",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "creationTimestamp" : "2022-01-24T14:06:16.537Z",
  "modificationTimestamp" : "2022-01-24T14:06:16.537Z",
  "resource" : {
    "resourceId" : "5c872760-e020-40d2-aedd-62e8b8a71291",
    "resourceName" : "sfo01-m01-esx02.rainpole.io",
    "resourceIp" : "10.0.0.101",
    "resourceType" : "ESXI",
    "domainName" : "MGMT"
  }
}

3. Update the Passwords

This API is used to update passwords for list of resources by supplying new passwords.

3.1. Prerequisites

  • The following data is required

    • Name or ID of the resource

    • Type of the resource

    • Credential type of the resource

    • Username of the resource

Tip : Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource.

  • New password must be in compliance with these password policies.

    Password requirements:

    • Length: 8-20 characters

    • Allowed special characters: ! @ # $ ^ *

    • At least 1 small letter, capital letter, number and special character should be present

    • Cannot include: Three same consecutive characters

3.2. Steps

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "operationType" : "UPDATE",
  "elements" : [ {
    "resourceName" : "sfo01-mo1-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root",
      "password" : "VMwareInfra@1"
    } ]
  } ]
}'

HTTP Request

PATCH /v1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 265
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "operationType" : "UPDATE",
  "elements" : [ {
    "resourceName" : "sfo01-mo1-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root",
      "password" : "VMwareInfra@1"
    } ]
  } ]
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/320ae9a0-060a-41a5-853e-17e9752f4821
Content-Type: application/json
Content-Length: 100

{
  "id" : "320ae9a0-060a-41a5-853e-17e9752f4821",
  "name" : "UPDATE",
  "status" : "IN_PROGRESS"
}
  • Poll the status of the task using the task API with the ID from the response of the previous API.

Tip : Refer to: Get a Task or Get a Credentials Task.

  • Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.

Tip : Refer to: Get a Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed.

Tip : Refer to: Retry the Update Passwords Task.

Warning : The password once updated cannot be rolled back.

Note : The password is updated in the order of the input.

Note : The passwords of the dependent resources of the requested resources will also get updated.

4. Rotate the Passwords

This API is used to rotate passwords for list of resources using system generated passwords.

4.1. Prerequisites

The following data is required

  • Name or ID of the resource

  • Type of the resource

  • Credential type of the resource

  • Username of the resource

Tip : Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource.

4.2. Steps

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "operationType" : "ROTATE",
  "elements" : [ {
    "resourceName" : "sfo01-mo1-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root"
    } ]
  } ]
}'

HTTP Request

PATCH /v1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 229
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "operationType" : "ROTATE",
  "elements" : [ {
    "resourceName" : "sfo01-mo1-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root"
    } ]
  } ]
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/d9722693-45df-4b10-aa8f-06530001143d
Content-Type: application/json
Content-Length: 100

{
  "id" : "d9722693-45df-4b10-aa8f-06530001143d",
  "name" : "ROTATE",
  "status" : "IN_PROGRESS"
}
  • Poll the status of the task using the task API with the ID from the response of the previous API.

Tip : Refer to: Get a Task or Get a Credentials Task.

  • Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.

Tip : Refer to: Get a Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed.

Tip : Refer to: Retry the Rotate Passwords Task.

Warning : The password once rotated cannot be rolled back.

Note : The password is rotated in the order of the input.

Note : The generated password adheres to the password compliance. Refer to: Password Compliance Guide.

Note : The passwords of the dependent resources of the requested resources will also get rotated.

5. Retry the Update Passwords Task

This API is used to retry a failed update passwords task.

5.1. Prerequisites

  • The following data is required

    • ID of the last triggered failed update passwords task

    • Name or ID of the resource

    • Type of the resource

    • Credential type of the resource

    • Username of the resource

Tip : Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource and ID of the failed task.

  • New password must be in compliance with the password policies.

Tip : Refer to: Password Compliance Guide.

5.2. Steps

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/8439086a-6331-4bf5-a4f0-45e28f211271' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "operationType" : "UPDATE",
  "elements" : [ {
    "resourceName" : "sfo01-mo1-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root",
      "password" : "VMwareInfra@1"
    } ]
  } ]
}'

HTTP Request

PATCH /v1/credentials/tasks/8439086a-6331-4bf5-a4f0-45e28f211271 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 265
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "operationType" : "UPDATE",
  "elements" : [ {
    "resourceName" : "sfo01-mo1-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root",
      "password" : "VMwareInfra@1"
    } ]
  } ]
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/8439086a-6331-4bf5-a4f0-45e28f211271
Content-Type: application/json
Content-Length: 100

{
  "id" : "8439086a-6331-4bf5-a4f0-45e28f211271",
  "name" : "UPDATE",
  "status" : "IN_PROGRESS"
}
  • Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.

Tip : Refer to: Get a Task or Get a Credentials Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed by providing previous credentials rotate specification or by amending the credentials rotate specification for FAILED resources.

Tip : Refer to: Retry the Update Passwords Task.

  • The failed task can be cancelled.

Tip : Refer to: Cancel the Update/Rotate Passwords Task.

Warning : The password once updated cannot be rolled back.

Note : The password is updated in the order of the input.

Note : Retry should be performed if updating passwords task has failed.

Note : Retry should be performed on the same list of resources as in the failed operation specification.

Tip : Refer to: Get the Resource Credentials for Credentials Task for the list of resources in the failed task.

Note : The passwords of the dependent resources of the requested resources will also get updated.

6. Retry the Rotate Passwords Task

This API is used to retry a failed rotate passwords task.

6.1. Prerequisites

The following data is required

  • ID of the last triggered failed rotate passwords task

  • Name or ID of the resource

  • Type of the resource

  • Credential type of the resource

  • Username of the resource

Tip : Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource and ID of the failed task.

6.2. Steps

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/fab1ad79-b0ca-4301-a68c-7df32a1c5121' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "operationType" : "ROTATE",
  "elements" : [ {
    "resourceName" : "sfo01-mo1-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root"
    } ]
  } ]
}'

HTTP Request

PATCH /v1/credentials/tasks/fab1ad79-b0ca-4301-a68c-7df32a1c5121 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 229
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "operationType" : "ROTATE",
  "elements" : [ {
    "resourceName" : "sfo01-mo1-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root"
    } ]
  } ]
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/fab1ad79-b0ca-4301-a68c-7df32a1c5121
Content-Type: application/json
Content-Length: 100

{
  "id" : "fab1ad79-b0ca-4301-a68c-7df32a1c5121",
  "name" : "ROTATE",
  "status" : "IN_PROGRESS"
}
  • Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.

Tip : Refer to: Get a Task or Get a Credentials Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed by providing previous credentials rotate specification or by amending the credentials rotate specification for FAILED resources.

Tip : Refer to: Retry the Rotate Passwords Task.

  • The failed task can be cancelled.

Tip : Refer to: Cancel the Update/Rotate Passwords Task.

Warning : The password once rotated cannot be rolled back.

Note : The password is rotated in the order of the input.

Note : The generated password adheres to the password compliance. Refer to: Password Compliance Guide.

Note : Retry should be performed if some password rotation task has failed.

Note : Retry should be performed on the same list of resources as in the failed operation specification.

Tip : Refer to: Get the Resource Credentials for Credentials Task for the list of resources in the failed task.

Note : The passwords of the dependent resources of the requested resources will also get rotated.

7. Cancel the Update/Rotate Passwords Task

  • This API is used to cancel a failed update or rotate passwords task.

7.1. Prerequisites

The following data is required

  • ID of the last triggered failed update/rotate passwords task

Tip : Refer to: Get the Credentials Tasks section to get the ID of the failed task.

7.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/c59f4615-effe-4baa-9946-aab85b8e8b84' -i -X DELETE \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

DELETE /v1/credentials/tasks/c59f4615-effe-4baa-9946-aab85b8e8b84 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 74

{
  "id" : "c59f4615-effe-4baa-9946-aab85b8e8b84",
  "status" : "FAILED"
}

Warning : The password once updated or rotated cannot be rolled back.

Note : The password is updated or rotated in the order of the input.

Note : Cancel should be performed to release the internal global lock held at VCF instance level if some password updation or rotation task has failed after several retries.

8. Get the Credentials Tasks

This API is used to fetch all credentials tasks in reverse chronological order.

Note : "oldPassword " and "newPassword " fields won't be listed and will come as empty string. Refer Get a Credentials Subtask for fetching passwords details.

8.1. Prerequisites

None

8.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials/tasks HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1597

{
  "elements" : [ {
    "id" : "186d891f-aac3-4501-ae52-afb89eb7e32f",
    "name" : "Credentials rotate operation",
    "type" : "ROTATE",
    "creationTimestamp" : "2018-11-05T05:15:32.864Z",
    "status" : "SUCCESSFUL",
    "subTasks" : [ {
      "id" : "acb6fa7b-a81b-41d8-bb53-0c1611609dd7",
      "resourceName" : "vra01svr01a.rainpole.io",
      "name" : "Password rotate for resource : vra01svr01a.rainpole.io, user : root and credential type : SSH",
      "creationTimestamp" : "2018-11-05T05:15:32.864Z",
      "status" : "SUCCESSFUL",
      "oldPassword" : "",
      "newPassword" : "",
      "entityType" : "VRA",
      "username" : "root",
      "credentialType" : "SSH"
    }, {
      "id" : "900e8ce0-4ff4-4a76-a7e0-8e44748aa46e",
      "resourceName" : "vra01svr01b.rainpole.io",
      "name" : "Password rotate for resource : vra01svr01b.rainpole.io, user : root and credential type : SSH",
      "creationTimestamp" : "2018-11-05T05:15:32.864Z",
      "status" : "SUCCESSFUL",
      "oldPassword" : "",
      "newPassword" : "",
      "entityType" : "VRA",
      "username" : "root",
      "credentialType" : "SSH"
    }, {
      "id" : "1b3b962d-fff7-4dcc-98ed-0a15b495afa5",
      "resourceName" : "vra01svr01c.rainpole.io",
      "name" : "Password rotate for resource : vra01svr01c.rainpole.io, user : root and credential type : SSH",
      "creationTimestamp" : "2018-11-05T05:15:32.864Z",
      "status" : "SUCCESSFUL",
      "oldPassword" : "",
      "newPassword" : "",
      "entityType" : "VRA",
      "username" : "root",
      "credentialType" : "SSH"
    } ]
  } ]
}

9. Get a Credentials Task

This API is used to fetch a credentials task for an ID.

Note : "oldPassword " and "newPassword " fields won't be listed and will come as empty string. Refer Get a Credentials Subtask for fetching passwords details.

9.1. Prerequisites

The following data is required

  • ID of the credentials task

9.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1494

{
  "id" : "186d891f-aac3-4501-ae52-afb89eb7e32f",
  "name" : "Credentials rotate operation",
  "type" : "ROTATE",
  "creationTimestamp" : "2018-11-05T05:15:32.864Z",
  "status" : "SUCCESSFUL",
  "subTasks" : [ {
    "id" : "acb6fa7b-a81b-41d8-bb53-0c1611609dd7",
    "resourceName" : "vra01svr01a.rainpole.io",
    "name" : "Password rotate for resource : vra01svr01a.rainpole.io, user : root and credential type : SSH",
    "creationTimestamp" : "2018-11-05T05:15:32.864Z",
    "status" : "SUCCESSFUL",
    "oldPassword" : "",
    "newPassword" : "",
    "entityType" : "VRA",
    "username" : "root",
    "credentialType" : "SSH"
  }, {
    "id" : "900e8ce0-4ff4-4a76-a7e0-8e44748aa46e",
    "resourceName" : "vra01svr01b.rainpole.io",
    "name" : "Password rotate for resource : vra01svr01b.rainpole.io, user : root and credential type : SSH",
    "creationTimestamp" : "2018-11-05T05:15:32.864Z",
    "status" : "SUCCESSFUL",
    "oldPassword" : "",
    "newPassword" : "",
    "entityType" : "VRA",
    "username" : "root",
    "credentialType" : "SSH"
  }, {
    "id" : "1b3b962d-fff7-4dcc-98ed-0a15b495afa5",
    "resourceName" : "vra01svr01c.rainpole.io",
    "name" : "Password rotate for resource : vra01svr01c.rainpole.io, user : root and credential type : SSH",
    "creationTimestamp" : "2018-11-05T05:15:32.864Z",
    "status" : "SUCCESSFUL",
    "oldPassword" : "",
    "newPassword" : "",
    "entityType" : "VRA",
    "username" : "root",
    "credentialType" : "SSH"
  } ]
}

10. Get the Resource Credentials for Credentials Task

This API is used to fetch resource credentials for a credentials task ID.

10.1. Prerequisites

The following data is required

  • ID of the credentials task

Tip : Refer to: Get the Credentials Tasks to get the ID of credentials tasks.

10.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f/resource-credentials' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f/resource-credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 578

[ {
  "resourceName" : "vra01svr01a.rainpole.io",
  "resourceType" : "VRA",
  "credentials" : [ {
    "credentialType" : "SSH",
    "username" : "root",
    "password" : "EvoSDDC2020!"
  } ]
}, {
  "resourceName" : "vra01svr01b.rainpole.io",
  "resourceType" : "VRA",
  "credentials" : [ {
    "credentialType" : "SSH",
    "username" : "root",
    "password" : "EvoSDDC2018!"
  } ]
}, {
  "resourceName" : "vra01svr01c.rainpole.io",
  "resourceType" : "VRA",
  "credentials" : [ {
    "credentialType" : "SSH",
    "username" : "root",
    "password" : "EvoSDDC2017!"
  } ]
} ]

11. Get a Credentials Subtask

This API is used to fetch details of a subtask corresponding to a credentials task ID and subtask ID.

11.1. Prerequisites

The following data is required

  • ID of the credentials task

  • ID of the credentials subtask

11.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f/subtasks/acb6fa7b-a81b-41d8-bb53-0c1611609dd7' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials/tasks/186d891f-aac3-4501-ae52-afb89eb7e32f/subtasks/acb6fa7b-a81b-41d8-bb53-0c1611609dd7 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 664

{
  "id" : "186d891f-aac3-4501-ae52-afb89eb7e32f",
  "name" : "Credentials rotate operation",
  "type" : "ROTATE",
  "creationTimestamp" : "2018-11-05T05:15:32.864Z",
  "status" : "SUCCESSFUL",
  "subTasks" : [ {
    "id" : "acb6fa7b-a81b-41d8-bb53-0c1611609dd7",
    "resourceName" : "vra01svr01a.rainpole.io",
    "name" : "Password rotate for resource : vra01svr01a.rainpole.io, user : root and credential type : SSH",
    "creationTimestamp" : "2018-11-05T05:15:32.864Z",
    "status" : "SUCCESSFUL",
    "oldPassword" : "EvoSDDC2019!",
    "newPassword" : "EvoSDDC2020!",
    "entityType" : "VRA",
    "username" : "root",
    "credentialType" : "SSH"
  } ]
}

12. Remediate expired Passwords

If the password is expired, then the customer requires to manually reset the account in the product and then reach out to GSS to sync credentials store of VCF with new password for the product.
Hence this new API will accept the new password from the client, validates by testing the connectivity and then performs credentials store update. This API is generalized so that the same API can be used for both service accounts and user accounts.
For service accounts, Password will be auto rotated post rememdiaton with correct password.
Please note: Credentials store sync is irreversible operation, ie when credentials store sync is successful and password rotation failed due to other issues, then we wont be reverting credentials store with older non working password.

12.1. Prerequisites

The following data is required

  • Name or ID of the resource

  • Type of the resource

  • Username of the resource

  • Working password of the resource

Tip : Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource.

12.2. Steps

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "operationType" : "REMEDIATE",
  "elements" : [ {
    "resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "username" : "root",
      "password" : "VMwareInfra@1"
    } ]
  } ]
}'

HTTP Request

PATCH /v1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 243
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "operationType" : "REMEDIATE",
  "elements" : [ {
    "resourceName" : "sfo01m01esx02.sfo01.rainpole.local",
    "resourceType" : "ESXI",
    "credentials" : [ {
      "username" : "root",
      "password" : "VMwareInfra@1"
    } ]
  } ]
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/a5544dce-ae02-427b-bc21-b1b1714b0f3f
Content-Type: application/json
Content-Length: 103

{
  "id" : "a5544dce-ae02-427b-bc21-b1b1714b0f3f",
  "name" : "REMEDIATE",
  "status" : "IN_PROGRESS"
}
  • Poll the status of the task using the task API with the ID from the response of the previous API.

Tip : Refer to: Get a Task or Get a Credentials Task.

  • Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.

Tip : Refer to: Get a Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed.

Tip : Refer to: Retry the Rotate Passwords Task.

Warning : The password once rotated cannot be rolled back.

Note : Currently we support only one credential at a time for remediation.

Note : The password is rotated in the order of the input.

Note : The generated password adheres to the password compliance. Refer to: Password Compliance Guide.

Note : The passwords of the dependent resources of the requested resources will also get rotated.

13. Configure auto-rotate schedule for Credentials

This API is used to configure schedule for auto-rotate of the passwords for the list of selected credentials.

13.1. Prerequisites

The following data is required

  • Name or ID of the resource

  • Type of the resource

  • Credential type of the resource

  • Username of the resource

  • enableAutoRotatePolicy refers to property for enable/disable the auto-rotate schedule

  • frequencyInDays refers to frequency in number of days for auto-rotate schedule

Tip : Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource.

13.2. Steps

  • Trigger the task using the valid input specification.

    set enableAutoRotatePolicy to True

    set frequencyInDays to number of days auto-rotate schedule should execute.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "operationType" : "UPDATE_AUTO_ROTATE_POLICY",
  "elements" : [ {
    "resourceName" : "sfo01-m01-vc01.rainpole.io",
    "resourceType" : "VCENTER",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root"
    } ]
  } ],
  "autoRotatePolicy" : {
    "frequencyInDays" : 30,
    "enableAutoRotatePolicy" : true
  }
}'

HTTP Request

PATCH /v1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 344
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "operationType" : "UPDATE_AUTO_ROTATE_POLICY",
  "elements" : [ {
    "resourceName" : "sfo01-m01-vc01.rainpole.io",
    "resourceType" : "VCENTER",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root"
    } ]
  } ],
  "autoRotatePolicy" : {
    "frequencyInDays" : 30,
    "enableAutoRotatePolicy" : true
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/7bf0612f-57f4-4cba-bce2-4abd470f5ce0
Content-Type: application/json
Content-Length: 119

{
  "id" : "7bf0612f-57f4-4cba-bce2-4abd470f5ce0",
  "name" : "UPDATE_AUTO_ROTATE_POLICY",
  "status" : "IN_PROGRESS"
}
  • Poll the status of the task using the task API with the ID from the response of the previous API.

Tip : Refer to: Get a Task or Get a Credentials Task.

  • Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.

Tip : Refer to: Get a Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed.

Tip : Refer to: Retry the Rotate Passwords Task.

14. Disable auto-rotate schedule for credentials

This API is used to disable configured schedule for auto-rotate of passwords for the list of selected credentials.

14.1. Prerequisites

The following data is required

  • Name or ID of the resource

  • Type of the resource

  • Credential type of the resource

  • Username of the resource

  • enableAutoRotatePolicy refers to property for enable/disable the auto-rotate schedule

Tip : Refer to: Get the Credentials to get the credential type, username, name, ID and type of the resource.

14.2. Steps

  • Trigger the task using the valid input specification.

    set enableAutoRotatePolicy to True

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "operationType" : "UPDATE_AUTO_ROTATE_POLICY",
  "elements" : [ {
    "resourceName" : "sfo01-m01-vc01.rainpole.io",
    "resourceType" : "VCENTER",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root"
    } ]
  } ],
  "autoRotatePolicy" : {
    "enableAutoRotatePolicy" : false
  }
}'

HTTP Request

PATCH /v1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 317
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "operationType" : "UPDATE_AUTO_ROTATE_POLICY",
  "elements" : [ {
    "resourceName" : "sfo01-m01-vc01.rainpole.io",
    "resourceType" : "VCENTER",
    "credentials" : [ {
      "credentialType" : "SSH",
      "username" : "root"
    } ]
  } ],
  "autoRotatePolicy" : {
    "enableAutoRotatePolicy" : false
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/167cacda-d587-4177-8864-a4a4224f5321
Content-Type: application/json
Content-Length: 119

{
  "id" : "167cacda-d587-4177-8864-a4a4224f5321",
  "name" : "UPDATE_AUTO_ROTATE_POLICY",
  "status" : "IN_PROGRESS"
}
  • Poll the status of the task using the task API with the ID from the response of the previous API.

Tip : Refer to: Get a Task. or Get a Credentials Task.

  • Poll the task until "status" is not "IN_PROGRESS" with the ID from the previous response.

Tip : Refer to: Get a Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed.

Tip : Refer to: Retry the Rotate Passwords Task.

Last updated 2022-01-24 06:18:36 PST

Operations
DELETE
Cancel Credentials Task
Cancel a failed credentials task for a given ID
GET
Get Credential
Get Credential for the given ID
GET
Get Credentials
Get the Credentials
GET
Get Credentials Sub Task
Fetch details of a subtask for a given credentials task ID and sub-task ID.
GET
Get Credentials Task
Fetch a credentials task
GET
Get Credentials Task Resources Credentials
Fetch resource credentials for a given credentials task ID
GET
Get Credentials Tasks
Fetch the credentials tasks
PATCH
Retry Credentials Task
Retry a failed credentials task for a given ID
PATCH
Update Or Rotate Passwords
Update or rotate passwords for a list of resources