Credentials APIs

Credentials APIs

APIs for managing Credentials

Table of Contents

1. Get the Credentials

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

1.1. Prerequisites API

The following data is required

  • Resource type, resource name (FQDN), resource IP address (deprecated), account type 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 API

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

Tip : Other filters like "resourceName" , "resourceIp" (deprecated), "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.

Note : The "resourceIp" parameter and "resourceIp" in response body are deprecated and will be removed. Please use "resourceName" (FQDN) field instead.

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: 7874

{
  "elements" : [ {
    "id" : "a66bc07d-70c7-4a3b-b441-ba96c18a3dd9",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "224435c3-8f50-4473-bcf1-fabdd164c29a",
      "resourceName" : "sfo01-m01-esx01.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "9de8c313-b122-4a84-974a-7d5b81304792",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "77918a7c-5bd1-4f1b-9532-ddb277ff6ae2",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "4c000245-6b00-4d6c-9cae-b8ad408fca6e",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "7e17ead2-6c9f-4dde-8b8b-108ee029cfdb",
      "resourceName" : "sfo01-m01-esx03.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "90d2c026-cf8f-4ae4-b7f5-3bf72e6cad58",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "1f7bd056-d622-48b1-8bb5-438e5a6dfd3e",
      "resourceName" : "sfo01-m01-esx04.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "781250d0-87ca-4660-91aa-a8ca9c6b6bc5",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "c42a008c-edbf-45de-81c2-ef17e253dd68",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceType" : "VCENTER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "85005f79-6b9c-4427-8d2e-6141250940e5",
    "credentialType" : "SSO",
    "accountType" : "USER",
    "username" : "administrator@vsphere.local",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "06ce7459-9f31-43da-a8ea-03b9504610e6",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceType" : "PSC",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "2e5fbae2-1d1b-4943-8680-b8249b5bab0c",
    "credentialType" : "SSO",
    "accountType" : "SERVICE",
    "username" : "svc-vcf-vcenter@vsphere.local",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "dd070d11-df60-4201-a4e9-d465b15396b2",
      "resourceName" : "sfo01m01vcenter01.sfo01.rainpole.local",
      "resourceType" : "VCENTER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "e75e5892-8260-4244-9eaf-9662b1dcdf87",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "07874fd3-b915-4f6a-b839-b09696a00c17",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceType" : "NSXT_MANAGER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "2a180ee7-08b7-43e9-91d6-11ded4974704",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "07874fd3-b915-4f6a-b839-b09696a00c17",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceType" : "NSXT_MANAGER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "6fe6f78f-5fa2-4680-a9a8-c33320580589",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "14b536b1-bc67-4ee1-8447-f260e5c6633a",
      "resourceName" : "sfo-vrli01.rainpole.io",
      "resourceType" : "VRLI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "63e72af2-6d81-4def-828b-3150bf8fe9bf",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "9bbd0bd7-d4a7-487c-856d-80112092e7f0",
      "resourceName" : "sfo-vrli01b.rainpole.io",
      "resourceType" : "VRLI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "a861a04d-76d3-4c4b-bb4a-48238b4d7d77",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "d4d856d1-1773-48bb-9203-25db1414b6bd",
      "resourceName" : "xreg-vrops01a.rainpole.io",
      "resourceType" : "VROPS",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "c44cfc15-2b3b-47d3-8032-1f76cab40461",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "1195799e-1abd-468b-a732-546f65b9b5c6",
      "resourceName" : "xreg-vrops01.rainpole.io",
      "resourceType" : "VROPS",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "1fd84e41-5421-438c-a661-6336d2dc5894",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "2926101e-55a2-44f5-a0a1-d78433a2c97e",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceType" : "VRSLCM",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "6e11de51-bd7d-4749-94b6-39bf6f545c19",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin@localhost",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.350Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.350Z",
    "resource" : {
      "resourceId" : "0c3d6ba5-a4c7-4e87-abdc-6e8a6c1080b9",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceType" : "VRSLCM",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  } ],
  "pageMetadata" : {
    "pageNumber" : 0,
    "pageSize" : 15,
    "totalElements" : 15,
    "totalPages" : 1
  }
}

Get All Credentials

1.3. Steps API

  • 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: 7874

{
  "elements" : [ {
    "id" : "c14d8756-e7f3-44c3-a4d9-57845cb26108",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.179Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.179Z",
    "resource" : {
      "resourceId" : "826efa96-f865-42e4-bcbf-8d0edbed2e94",
      "resourceName" : "sfo01-m01-esx01.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "9de8c313-b122-4a84-974a-7d5b81304792",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.179Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.179Z",
    "resource" : {
      "resourceId" : "77918a7c-5bd1-4f1b-9532-ddb277ff6ae2",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "65aede91-77ad-45c6-93af-bd49169729ef",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.179Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.179Z",
    "resource" : {
      "resourceId" : "440a3fd0-ea11-449c-8ea6-c2de9b16aa52",
      "resourceName" : "sfo01-m01-esx03.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "0761b0a4-cf88-4a30-aaac-4a6f941c3c2a",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.179Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.179Z",
    "resource" : {
      "resourceId" : "de711ee0-9579-4084-8a4d-947c15ce6694",
      "resourceName" : "sfo01-m01-esx04.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "7dd2d309-7c93-4698-b99d-0bdff791eb01",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.179Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.179Z",
    "resource" : {
      "resourceId" : "c42a008c-edbf-45de-81c2-ef17e253dd68",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceType" : "VCENTER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "56f872c4-cbb3-49ca-bc72-b7125f7b98ca",
    "credentialType" : "SSO",
    "accountType" : "USER",
    "username" : "administrator@vsphere.local",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.179Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.179Z",
    "resource" : {
      "resourceId" : "19deaa52-6304-43c9-8468-d1a814aa55fe",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceType" : "PSC",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "306ee044-f3ef-467c-80c2-c3c3d5ac28e5",
    "credentialType" : "SSO",
    "accountType" : "SERVICE",
    "username" : "svc-vcf-vcenter@vsphere.local",
    "creationTimestamp" : "2024-08-27T20:03:24.179Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.179Z",
    "resource" : {
      "resourceId" : "e5248940-3199-41a2-8cd3-178bce112dae",
      "resourceName" : "sfo01m01vcenter01.sfo01.rainpole.local",
      "resourceType" : "VCENTER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "e75e5892-8260-4244-9eaf-9662b1dcdf87",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.180Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.180Z",
    "resource" : {
      "resourceId" : "07874fd3-b915-4f6a-b839-b09696a00c17",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceType" : "NSXT_MANAGER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "2a180ee7-08b7-43e9-91d6-11ded4974704",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.180Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.180Z",
    "resource" : {
      "resourceId" : "07874fd3-b915-4f6a-b839-b09696a00c17",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceType" : "NSXT_MANAGER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "9be35745-18c2-4228-9994-51a6eccde899",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.180Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.180Z",
    "resource" : {
      "resourceId" : "c0d21297-9df6-4172-bc93-e3cf0d1fc17f",
      "resourceName" : "sfo-vrli01.rainpole.io",
      "resourceType" : "VRLI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "e0e72bcd-a3c2-4013-80a9-f8f7c960f9e5",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.180Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.180Z",
    "resource" : {
      "resourceId" : "0520e1c9-df40-4542-940c-3aa9321f9ef3",
      "resourceName" : "sfo-vrli01b.rainpole.io",
      "resourceType" : "VRLI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "efeac931-493e-41b2-934d-cb3fa09fa398",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.180Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.180Z",
    "resource" : {
      "resourceId" : "5be6c248-057c-4b2c-bb62-d0b2b62465a8",
      "resourceName" : "xreg-vrops01a.rainpole.io",
      "resourceType" : "VROPS",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "d178eede-d14c-4c06-bde6-328b14477b9d",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.180Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.180Z",
    "resource" : {
      "resourceId" : "b590b820-c75e-40f2-ba4e-626594a8f890",
      "resourceName" : "xreg-vrops01.rainpole.io",
      "resourceType" : "VROPS",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "8ae68f46-9aeb-4672-8511-42d687f90b1a",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.180Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.180Z",
    "resource" : {
      "resourceId" : "35b9953c-f57f-4eb3-99bf-1d8c198d6b00",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceType" : "VRSLCM",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "7185055f-0053-4a91-8ca0-e395f3258c6e",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin@localhost",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.180Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.180Z",
    "resource" : {
      "resourceId" : "c0745af9-ceae-487a-9b52-377362b9fa05",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceType" : "VRSLCM",
      "domainNames" : [ "MGMT" ],
      "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 API

  • 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: 647

{
  "elements" : [ {
    "id" : "9de8c313-b122-4a84-974a-7d5b81304792",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.265Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.265Z",
    "resource" : {
      "resourceId" : "77918a7c-5bd1-4f1b-9532-ddb277ff6ae2",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  } ],
  "pageMetadata" : {
    "pageNumber" : 0,
    "pageSize" : 1,
    "totalElements" : 1,
    "totalPages" : 1
  }
}

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

1.5. Steps API

  • 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: 647

{
  "elements" : [ {
    "id" : "9de8c313-b122-4a84-974a-7d5b81304792",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:24.678Z",
    "modificationTimestamp" : "2024-08-27T20:03:24.678Z",
    "resource" : {
      "resourceId" : "77918a7c-5bd1-4f1b-9532-ddb277ff6ae2",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "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 API

  • 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: 2183

{
  "elements" : [ {
    "id" : "abd9f01d-49f7-4aa8-9208-d7653a5d1a44",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:23.964Z",
    "modificationTimestamp" : "2024-08-27T20:03:23.964Z",
    "resource" : {
      "resourceId" : "55322a7f-1966-47c1-938a-041896002783",
      "resourceName" : "sfo01-m01-esx01.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "9de8c313-b122-4a84-974a-7d5b81304792",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:23.964Z",
    "modificationTimestamp" : "2024-08-27T20:03:23.964Z",
    "resource" : {
      "resourceId" : "77918a7c-5bd1-4f1b-9532-ddb277ff6ae2",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "ddc54e1e-80e7-4221-a0cc-e390b2c3d69f",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:23.964Z",
    "modificationTimestamp" : "2024-08-27T20:03:23.964Z",
    "resource" : {
      "resourceId" : "5fe10584-9cb5-467b-8d92-cdd86854fb7b",
      "resourceName" : "sfo01-m01-esx03.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "dc5f46c2-f495-4fc3-ae72-8ecc0879eae7",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:23.965Z",
    "modificationTimestamp" : "2024-08-27T20:03:23.965Z",
    "resource" : {
      "resourceId" : "86ac4596-1a33-4ccb-9203-0ebe117eb4dc",
      "resourceName" : "sfo01-m01-esx04.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "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 API

  • 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: 7874

{
  "elements" : [ {
    "id" : "29dfdc6e-4cea-43c5-bc1e-1103e2ae6a51",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "ee18e987-5934-4811-896b-a11fc101b282",
      "resourceName" : "sfo01-m01-esx01.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "9de8c313-b122-4a84-974a-7d5b81304792",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "77918a7c-5bd1-4f1b-9532-ddb277ff6ae2",
      "resourceName" : "sfo01-m01-esx02.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "978939f8-c4b0-4ee5-84f6-dac72452c04f",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "f7eb2c5b-e57f-4384-93dc-6e2f22886ea0",
      "resourceName" : "sfo01-m01-esx03.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "38dff7c4-4779-440c-99b6-a75b61c000ee",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "288e3438-40d3-4e11-82b9-34eebb1c153b",
      "resourceName" : "sfo01-m01-esx04.rainpole.io",
      "resourceType" : "ESXI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "170f3dee-7445-4637-a002-be5839ef6a55",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "c42a008c-edbf-45de-81c2-ef17e253dd68",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceType" : "VCENTER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "c192431c-6b5f-40d9-ae0c-7de66eab1323",
    "credentialType" : "SSO",
    "accountType" : "USER",
    "username" : "administrator@vsphere.local",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "c75fc2f2-7c2f-459d-b4cb-4daf8f2b254b",
      "resourceName" : "sfo01-m01-vc01.rainpole.io",
      "resourceType" : "PSC",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "b4f49ce2-9f3a-4fe5-aa04-adad8998905e",
    "credentialType" : "SSO",
    "accountType" : "SERVICE",
    "username" : "svc-vcf-vcenter@vsphere.local",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "44cbecb7-35ac-4468-9085-eba05605486e",
      "resourceName" : "sfo01m01vcenter01.sfo01.rainpole.local",
      "resourceType" : "VCENTER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "e75e5892-8260-4244-9eaf-9662b1dcdf87",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "07874fd3-b915-4f6a-b839-b09696a00c17",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceType" : "NSXT_MANAGER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "2a180ee7-08b7-43e9-91d6-11ded4974704",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "07874fd3-b915-4f6a-b839-b09696a00c17",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceType" : "NSXT_MANAGER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "a8e08b60-cd22-45af-816d-b4b75d62ea9b",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "b185a3a2-9905-4628-b397-9cf6e21e7dd2",
      "resourceName" : "sfo-vrli01.rainpole.io",
      "resourceType" : "VRLI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "118f2689-3f0b-4ef7-b736-3bdfdbfaec2b",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "82879c62-261f-4283-ae55-b3e2cb9c1ffa",
      "resourceName" : "sfo-vrli01b.rainpole.io",
      "resourceType" : "VRLI",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "bde57f5b-601c-42f8-9734-804330af3f8f",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "4272f32f-8875-42e1-81d2-ea23ec5f1fef",
      "resourceName" : "xreg-vrops01a.rainpole.io",
      "resourceType" : "VROPS",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "50d49db4-a7e7-41e2-9e01-0652b11bc9df",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "0f3c73a8-55af-4e02-92c2-56cb29c388a8",
      "resourceName" : "xreg-vrops01.rainpole.io",
      "resourceType" : "VROPS",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "fac907ce-d785-448d-8de4-956ee36e431f",
    "credentialType" : "SSH",
    "accountType" : "USER",
    "username" : "root",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "da34d91e-3a51-4ccd-8976-f1e6395de0d6",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceType" : "VRSLCM",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    }
  }, {
    "id" : "d6a64cba-ccc6-45dc-8a9d-b876c116cc7d",
    "credentialType" : "API",
    "accountType" : "USER",
    "username" : "admin@localhost",
    "password" : "xxxxx",
    "creationTimestamp" : "2024-08-27T20:03:26.143Z",
    "modificationTimestamp" : "2024-08-27T20:03:26.143Z",
    "resource" : {
      "resourceId" : "2742d466-1367-4769-9669-46dc7e6acf29",
      "resourceName" : "xreg-vrslcm01.rainpole.io",
      "resourceType" : "VRSLCM",
      "domainNames" : [ "MGMT" ],
      "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.

[_getcredentials] API [_getcredential] API

2. Get a Credential

This API is used to fetch credential for an ID.

2.1. Prerequisites API

The following data is required

  • ID of the credential

2.2. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/9de8c313-b122-4a84-974a-7d5b81304792' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials/9de8c313-b122-4a84-974a-7d5b81304792 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

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

{
  "id" : "9de8c313-b122-4a84-974a-7d5b81304792",
  "credentialType" : "SSH",
  "accountType" : "USER",
  "username" : "root",
  "password" : "xxxxx",
  "creationTimestamp" : "2024-08-27T20:03:25.926Z",
  "modificationTimestamp" : "2024-08-27T20:03:25.926Z",
  "resource" : {
    "resourceId" : "77918a7c-5bd1-4f1b-9532-ddb277ff6ae2",
    "resourceName" : "sfo01-m01-esx02.rainpole.io",
    "resourceType" : "ESXI",
    "domainNames" : [ "MGMT" ],
    "domainName" : "MGMT"
  }
}

[_getcredentials] API [_getcredential] API

3. Update the Passwords

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

3.1. Prerequisites API

  • 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:

Note : Although individual VMware Cloud Foundation accounts support different password requirements, it is recommended that you set passwords following a common set of requirements across all accounts.

  • Length: 12-20 characters

  • Allowed special characters: ! @ # $ ^ *

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

  • Cannot include:

    • A dictionary word

    • A palindrome

    • More than four monotonic character sequences

    • Three same consecutive characters

3.2. Steps API

  • 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" : "xxxxx"
    } ]
  } ]
}'

HTTP Request

PATCH /v1/credentials HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 257
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" : "xxxxx"
    } ]
  } ]
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/f7532156-16d9-43d1-accb-19bae33927e4
Content-Type: application/json
Content-Length: 152

{
  "id" : "f7532156-16d9-43d1-accb-19bae33927e4",
  "name" : "UPDATE",
  "status" : "IN_PROGRESS",
  "isCancellable" : false,
  "isRetryable" : false
}
  • 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.

[_updateorrotatepasswords] API [_gettasks] API [_gettask] API [_getcredentialstasks] API [_getcredentialstask] API [_retrycredentialstask] API [_cancelcredentialstask] API

4. Rotate the Passwords

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

4.1. Prerequisites API

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 API

  • 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/949721cb-3eee-4f74-98bb-3e478562472c
Content-Type: application/json
Content-Length: 152

{
  "id" : "949721cb-3eee-4f74-98bb-3e478562472c",
  "name" : "ROTATE",
  "status" : "IN_PROGRESS",
  "isCancellable" : false,
  "isRetryable" : false
}
  • 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.

[_updateorrotatepasswords] API [_gettasks] API [_gettask] API [_getcredentialstasks] API [_getcredentialstask] API [_retrycredentialstask] API [_cancelcredentialstask] API

5. Retry the Update Passwords Task

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

5.1. Prerequisites API

  • 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 API

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/5efbb642-5fb9-4dbb-9adb-8a2e5d4465ee' -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" : "xxxxx"
    } ]
  } ]
}'

HTTP Request

PATCH /v1/credentials/tasks/5efbb642-5fb9-4dbb-9adb-8a2e5d4465ee HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 257
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" : "xxxxx"
    } ]
  } ]
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/5efbb642-5fb9-4dbb-9adb-8a2e5d4465ee
Content-Type: application/json
Content-Length: 152

{
  "id" : "5efbb642-5fb9-4dbb-9adb-8a2e5d4465ee",
  "name" : "UPDATE",
  "status" : "IN_PROGRESS",
  "isCancellable" : false,
  "isRetryable" : false
}
  • 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.

[_retrycredentialstask] API [_gettasks] API [_gettask] API [_getcredentialstasks] API [_getcredentialstask] API [_getcredentialtaskbyresourceid] API [_cancelcredentialstask] API

6. Retry the Rotate Passwords Task

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

6.1. Prerequisites API

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 API

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/595d63e6-a9df-4625-ab47-3912e19cdf18' -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/595d63e6-a9df-4625-ab47-3912e19cdf18 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/595d63e6-a9df-4625-ab47-3912e19cdf18
Content-Type: application/json
Content-Length: 152

{
  "id" : "595d63e6-a9df-4625-ab47-3912e19cdf18",
  "name" : "ROTATE",
  "status" : "IN_PROGRESS",
  "isCancellable" : false,
  "isRetryable" : false
}
  • 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.

[_retrycredentialstask] API [_gettasks] API [_gettask] API [_getcredentialstasks] API [_getcredentialstask] API [_getcredentialtaskbyresourceid] API [_cancelcredentialstask] API

7. Cancel the Update/Rotate Passwords Task

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

7.1. Prerequisites API

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 API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/tasks/b8463e6d-bb34-4afb-b5d1-dba8ef953864' -i -X DELETE \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

DELETE /v1/credentials/tasks/b8463e6d-bb34-4afb-b5d1-dba8ef953864 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 126

{
  "id" : "b8463e6d-bb34-4afb-b5d1-dba8ef953864",
  "status" : "FAILED",
  "isCancellable" : false,
  "isRetryable" : false
}

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.

[_cancelcredentialstask] API [_gettasks] API [_gettask] API [_getcredentialstasks] API [_getcredentialstask] API

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 API

None

8.2. Steps API

  • 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: 1605

{
  "elements" : [ {
    "id" : "186d891f-aac3-4501-ae52-afb89eb7e32f",
    "name" : "Credentials rotate operation",
    "type" : "ROTATE",
    "creationTimestamp" : "+50814-11-11T03:07:44.000Z",
    "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" : "+50814-11-11T03:07:44.000Z",
      "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" : "+50814-11-11T03:07:44.000Z",
      "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" : "+50814-11-11T03:07:44.000Z",
      "status" : "SUCCESSFUL",
      "oldPassword" : "",
      "newPassword" : "",
      "entityType" : "VRA",
      "username" : "root",
      "credentialType" : "SSH"
    } ]
  } ]
}

[_getcredentialstasks] API [_getcredentialstask] API

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 API

The following data is required

  • ID of the credentials task

9.2. Steps API

  • 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: 1502

{
  "id" : "186d891f-aac3-4501-ae52-afb89eb7e32f",
  "name" : "Credentials rotate operation",
  "type" : "ROTATE",
  "creationTimestamp" : "+50814-11-11T03:07:44.000Z",
  "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" : "+50814-11-11T03:07:44.000Z",
    "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" : "+50814-11-11T03:07:44.000Z",
    "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" : "+50814-11-11T03:07:44.000Z",
    "status" : "SUCCESSFUL",
    "oldPassword" : "",
    "newPassword" : "",
    "entityType" : "VRA",
    "username" : "root",
    "credentialType" : "SSH"
  } ]
}

[_getcredentialstasks] API [_getcredentialstask] API

10. Get the Resource Credentials for Credentials Task

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

10.1. Prerequisites API

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 API

  • 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: 557

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

[_getcredentialtaskbyresourceid] API [_getcredentialstasks] API [_getcredentialstask] API

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 API

The following data is required

  • ID of the credentials task

  • ID of the credentials subtask

11.2. Steps API

  • 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: 654

{
  "id" : "186d891f-aac3-4501-ae52-afb89eb7e32f",
  "name" : "Credentials rotate operation",
  "type" : "ROTATE",
  "creationTimestamp" : "+50814-11-11T03:07:44.000Z",
  "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" : "+50814-11-11T03:07:44.000Z",
    "status" : "SUCCESSFUL",
    "oldPassword" : "xxxxx",
    "newPassword" : "yyyyy",
    "entityType" : "VRA",
    "username" : "root",
    "credentialType" : "SSH"
  } ]
}

[_getcredentialstasks] API [_getcredentialstask] API [_getcredentialssubtask] API

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 API

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 API

  • 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" : "xxxxx"
    } ]
  } ]
}'

HTTP Request

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

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

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/c4e131b9-edb6-44d6-ac18-7fda5e60d540
Content-Type: application/json
Content-Length: 155

{
  "id" : "c4e131b9-edb6-44d6-ac18-7fda5e60d540",
  "name" : "REMEDIATE",
  "status" : "IN_PROGRESS",
  "isCancellable" : false,
  "isRetryable" : false
}
  • 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.

[_updateorrotatepasswords] API [_gettasks] API [_gettask] API [_getcredentialstasks] API [_getcredentialstask] API [_retrycredentialstask] API [_cancelcredentialstask] API

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 API

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 API

  • 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/fa83eb23-3a27-4151-ad9f-7863ed064c15
Content-Type: application/json
Content-Length: 171

{
  "id" : "fa83eb23-3a27-4151-ad9f-7863ed064c15",
  "name" : "UPDATE_AUTO_ROTATE_POLICY",
  "status" : "IN_PROGRESS",
  "isCancellable" : false,
  "isRetryable" : false
}
  • 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.

[_updateorrotatepasswords] API [_gettasks] API [_gettask] API [_getcredentialstasks] API [_getcredentialstask] API [_retrycredentialstask] API [_cancelcredentialstask] API

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 API

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 API

  • 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/6adf297a-6451-4955-8399-d8bf4bb6d755
Content-Type: application/json
Content-Length: 171

{
  "id" : "6adf297a-6451-4955-8399-d8bf4bb6d755",
  "name" : "UPDATE_AUTO_ROTATE_POLICY",
  "status" : "IN_PROGRESS",
  "isCancellable" : false,
  "isRetryable" : false
}
  • 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.

[_updateorrotatepasswords] API [_gettasks] API [_gettask] API [_getcredentialstasks] API [_getcredentialstask] API [_retrycredentialstask] API [_cancelcredentialstask] API

15. Fetch password expiration details

This API is used to get password expiration details for a list of credentials.

15.1. Prerequisites API

  • The following data is required

    • Type of the resource
  • The following data is optional

    • Domain name associated with the resource

    • Credential id of the resource

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

15.2. Steps API

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/expirations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainName" : "MGMT",
  "resourceType" : "NSXT_MANAGER",
  "credentialIds" : [ "2a180ee7-08b7-43e9-91d6-11ded4974704", "e75e5892-8260-4244-9eaf-9662b1dcdf87" ]
}'

HTTP Request

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

{
  "domainName" : "MGMT",
  "resourceType" : "NSXT_MANAGER",
  "credentialIds" : [ "2a180ee7-08b7-43e9-91d6-11ded4974704", "e75e5892-8260-4244-9eaf-9662b1dcdf87" ]
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/credentials/expirations/ec6e7770-55b7-427b-8fc4-f315499c18fc
Content-Type: application/json
Content-Length: 79

{
  "id" : "ec6e7770-55b7-427b-8fc4-f315499c18fc",
  "status" : "IN_PROGRESS"
}
  • Poll the status of the task using the get expiration API with the ID from the response of the previous API. Continue polling until "status" is not "IN_PROGRESS".

    • If the "status" is "COMPLETED", the task is completed and expiration details of credentials can be obtained from the list elements in the response. If the expiration fetch fails for any credential, check the error response of that element in the response.

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

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/credentials/expirations/ec6e7770-55b7-427b-8fc4-f315499c18fc' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/credentials/expirations/ec6e7770-55b7-427b-8fc4-f315499c18fc HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

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

{
  "id" : "ec6e7770-55b7-427b-8fc4-f315499c18fc",
  "status" : "COMPLETED",
  "elements" : [ {
    "id" : "2a180ee7-08b7-43e9-91d6-11ded4974704",
    "username" : "root",
    "resource" : {
      "resourceId" : "07874fd3-b915-4f6a-b839-b09696a00c17",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceType" : "NSXT_MANAGER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    },
    "expiry" : {
      "expiryDate" : "2024-11-25T20:03:24.766Z",
      "status" : "ACTIVE"
    }
  }, {
    "id" : "e75e5892-8260-4244-9eaf-9662b1dcdf87",
    "username" : "admin",
    "resource" : {
      "resourceId" : "07874fd3-b915-4f6a-b839-b09696a00c17",
      "resourceName" : "sfo01-m01-nsx01.rainpole.io",
      "resourceType" : "NSXT_MANAGER",
      "domainNames" : [ "MGMT" ],
      "domainName" : "MGMT"
    },
    "expiry" : {
      "expiryDate" : "2024-11-25T20:03:24.766Z",
      "status" : "ACTIVE"
    }
  } ]
}

[_getcredentials] API [_getpasswordexpiration] API [_getpasswordexpirationbytaskid] API
Last updated 2024-08-27 16:13:54 -0700

Operations
POST
Get Password Expiration
Fetch expiration details of passwords for a list of credentials
GET
Get Credentials
Retrieve a list of credentials
PATCH
Update Or Rotate Passwords
Update or rotate passwords for a list of resources
GET
Get Credentials Task
Retrieve a credential task by ID
DELETE
Cancel Credentials Task
Cancel a failed credential task by its ID
PATCH
Retry Credentials Task
Retry a failed credentials task for a given ID
GET
Get Credential
Retrieve a credential by its ID
GET
Get Credentials Tasks
Retrieve a list of credential tasks
GET
Get Credentials Sub Task
Retrieve a credential sub task by its ID
GET
Get Credential Task By Resource ID
Retriece a credential taks by resource ID
GET
Get Password Expiration By Task ID
Retrive a password expiration task by ID