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/32905b0a-98f2-4716-803c-40347eaa9494
Content-Length: 245

{
  "id" : "32905b0a-98f2-4716-803c-40347eaa9494",
  "name" : "PERSONALITY_UPLOAD",
  "type" : "PERSONALITY_UPLOAD",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2023-05-16T03:12:15.768Z",
  "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" : "68f4dc78-ad60-4a9b-815c-70cae4db4c13",
    "clusterId" : "f92e08b8-c0a6-47d6-a638-a355d3c61f3c"
  },
  "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" : "68f4dc78-ad60-4a9b-815c-70cae4db4c13",
    "clusterId" : "f92e08b8-c0a6-47d6-a638-a355d3c61f3c"
  },
  "name" : "vSphere7.0-Dell-SystemAdmin"
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/32905b0a-98f2-4716-803c-40347eaa9494
Content-Length: 245

{
  "id" : "32905b0a-98f2-4716-803c-40347eaa9494",
  "name" : "PERSONALITY_UPLOAD",
  "type" : "PERSONALITY_UPLOAD",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2023-05-16T03:12:15.963Z",
  "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" : 1684206734909,
  "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/bbde7baa-1df9-4bde-8643-23f66c7cfa5b' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/personalities/bbde7baa-1df9-4bde-8643-23f66c7cfa5b 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" : 1684206735863,
  "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-05-21 23:30:49 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
PATCH
Rename Personality By Id
Rename personality based on ID
POST
Upload Personality
Upload a Personality
PUT
Upload Personality Files
Upload personality files to SDDC Manager