Personalities APIs

Personalities APIs

APIs for managing Personalities

Table of Contents

1. Upload a Personality with RAW mode.

Used when the vSphere cluster image/personality is to be exported to LCM from non VCF deployed vCenter.

1.1. Prerequisites

The following data is required:

  • vSphere exported software spec json file path

  • vSphere exported cluster settings json file path

  • vSphere exported cluster image zip file path

  • vSphere exported cluster image iso file path

Tip : Refer to: PersonalityUploadSpec.

1.2. Steps

  • Invoke the API. This API returns a task which can be polled and monitored.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "uploadMode" : "RAW",
  "uploadSpecRawMode" : {
    "personalityInfoJSONFilePath" : "/home/vcf/personality/info.json",
    "personalityJSONFilePath" : "/home/vcf/personality/spec.json",
    "personalityZIPFilePath" : "/home/vcf/personality/offline.zip",
    "personalityISOFilePath" : "/home/vcf/personality/bundle.iso"
  },
  "name" : "Sample Raw Personality"
}'

HTTP Request

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

{
  "uploadMode" : "RAW",
  "uploadSpecRawMode" : {
    "personalityInfoJSONFilePath" : "/home/vcf/personality/info.json",
    "personalityJSONFilePath" : "/home/vcf/personality/spec.json",
    "personalityZIPFilePath" : "/home/vcf/personality/offline.zip",
    "personalityISOFilePath" : "/home/vcf/personality/bundle.iso"
  },
  "name" : "Sample Raw Personality"
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/a780838e-3b0f-41cc-9b87-604c7db24e6c
Content-Length: 245

{
  "id" : "a780838e-3b0f-41cc-9b87-604c7db24e6c",
  "name" : "PERSONALITY_UPLOAD",
  "type" : "PERSONALITY_UPLOAD",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2022-09-28T07:27:20.202Z",
  "resources" : [ ],
  "isCancellable" : 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.

2. Upload a Personality with REFERRED mode.

Used when the vSphere cluster image/personality is to be exported to LCM from VCF deployed vCenter.

2.1. Prerequisites

The following data is required:

  • vCenter Id

  • Cluster Id

  • Name of the personality

Tip : Refer to: PersonalityUploadSpec.

2.2. Steps

  • Invoke the API. This API returns a task which can be polled and monitored.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "uploadMode" : "REFERRED",
  "uploadSpecReferredMode" : {
    "vCenterId" : "7d5dbee4-aaa4-494d-834b-aaffae77ec80",
    "clusterId" : "a7d566b7-7b91-41a8-9be7-59d28d7d4717"
  },
  "name" : "vSphere7.0-Dell-SystemAdmin"
}'

HTTP Request

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

{
  "uploadMode" : "REFERRED",
  "uploadSpecReferredMode" : {
    "vCenterId" : "7d5dbee4-aaa4-494d-834b-aaffae77ec80",
    "clusterId" : "a7d566b7-7b91-41a8-9be7-59d28d7d4717"
  },
  "name" : "vSphere7.0-Dell-SystemAdmin"
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/a780838e-3b0f-41cc-9b87-604c7db24e6c
Content-Length: 245

{
  "id" : "a780838e-3b0f-41cc-9b87-604c7db24e6c",
  "name" : "PERSONALITY_UPLOAD",
  "type" : "PERSONALITY_UPLOAD",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2022-09-28T07:27:20.698Z",
  "resources" : [ ],
  "isCancellable" : 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.

3. Get a cluster image/personality by name

  • Get Personalities By Id API is used to get a specific vSphere cluster image by the name.

3.1. Prerequisites

The following data is required:

  • Name of the cluster image

3.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities?personalityName=esx-personality' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/personalities?personalityName=esx-personality 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: 865

{
  "version" : "1",
  "personalityId" : "bbd38966-8537-46f1-9a54-06fbfe7079c6",
  "personalityName" : "test-display-name",
  "description" : "test-desc",
  "createdBy" : "USER",
  "imageChecksum" : "test-checksum",
  "displayName" : "test-display-name",
  "releaseDate" : 1664350038431,
  "tags" : [ ],
  "vsphereExportedZipPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.zip",
  "vsphereExportedIsoPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.iso",
  "vsphereExportedJsonPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.json",
  "softwareInfo" : {
    "baseImage" : {
      "version" : "7.0.0-0.0.30340198"
    }
  }
}

4. Get a cluster image/personality by Id

  • Get Personalities By Id API is used to get a specific vSphere cluster image by the Id.

4.1. Prerequisites

The following data is required:

  • Id of the cluster image

4.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities/7a8e7e2d-df54-4c84-8478-68d4ad10175a' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/personalities/7a8e7e2d-df54-4c84-8478-68d4ad10175a 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: 865

{
  "version" : "1",
  "personalityId" : "bbd38966-8537-46f1-9a54-06fbfe7079c6",
  "personalityName" : "test-display-name",
  "description" : "test-desc",
  "createdBy" : "USER",
  "imageChecksum" : "test-checksum",
  "displayName" : "test-display-name",
  "releaseDate" : 1664350040421,
  "tags" : [ ],
  "vsphereExportedZipPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.zip",
  "vsphereExportedIsoPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.iso",
  "vsphereExportedJsonPath" : "https://sddc-manager.vrack.vsphere.local/vmware/vcf/personalities/personality/bbd38966-8537-46f1-9a54-06fbfe7079c6/pers.json",
  "softwareInfo" : {
    "baseImage" : {
      "version" : "7.0.0-0.0.30340198"
    }
  }
}

5. Get all the Personalities/cluster images by base version

  • Get the Personalities API is used to get all the personalities by the base version.

    Similarly the api can be used for filtering based on the other Personality attributes such as addOnName,

    addOnVendorName, componentName and componentVendorNames.

5.1. Prerequisites

The following data is required:

  • Base Version of the Personality

5.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities?baseOSVersion=6.7.0-15160138' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/personalities?baseOSVersion=6.7.0-15160138 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: 22

{
  "elements" : [ ]
}

Last updated 2023-04-27 11:11:39 PDT

Operations
DELETE
Delete Personality
Delete the personality based on either name or id
GET
Get Personalities
Get the Personalities
GET
Get Personality
Get Personalities By Id
POST
Upload Personality
Upload a Personality
PUT
Upload Personality Files
Upload personality files to SDDC Manager