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 API

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 API

  • 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/35919bd4-ecfc-4a46-889b-21403821a609
Content-Length: 318

{
  "id" : "35919bd4-ecfc-4a46-889b-21403821a609",
  "name" : "vSphere Lifecycle Manager Image Upload vSphere7.0-Dell-SystemAdmin",
  "type" : "PERSONALITY_UPLOAD",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2024-06-21T02:47:47.513Z",
  "resources" : [ ],
  "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.

Upload a Personality with REFERRED mode. Get a cluster image/personality by Id Get a cluster image/personality by name Get all the Personalities/cluster images by base version [_gettasks] API [_gettask] API

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 API

The following data is required:

  • vCenter Id

  • Cluster Id

  • Name of the personality

Tip : Refer to: PersonalityUploadSpec.

2.2. Steps API

  • 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" : "f79a204b-7f7d-428d-8c74-48070c53960f",
    "clusterId" : "domain-c8"
  },
  "name" : "vSphere7.0-Dell-SystemAdmin"
}'

HTTP Request

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

{
  "uploadMode" : "REFERRED",
  "uploadSpecReferredMode" : {
    "vCenterId" : "f79a204b-7f7d-428d-8c74-48070c53960f",
    "clusterId" : "domain-c8"
  },
  "name" : "vSphere7.0-Dell-SystemAdmin"
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/35919bd4-ecfc-4a46-889b-21403821a609
Content-Length: 318

{
  "id" : "35919bd4-ecfc-4a46-889b-21403821a609",
  "name" : "vSphere Lifecycle Manager Image Upload vSphere7.0-Dell-SystemAdmin",
  "type" : "PERSONALITY_UPLOAD",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2024-06-21T02:47:48.085Z",
  "resources" : [ ],
  "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.

Upload a Personality with RAW mode. Get a cluster image/personality by Id Get a cluster image/personality by name Get all the Personalities/cluster images by base version

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 API

The following data is required:

  • Name of the cluster image

3.2. Steps API

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

{
  "elements" : [ {
    "version" : "1",
    "personalityId" : "bbd38966-8537-46f1-9a54-06fbfe7079c6",
    "personalityName" : "test-display-name",
    "description" : "test-desc",
    "createdBy" : "USER",
    "imageChecksum" : "test-checksum",
    "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",
    "displayName" : "test-display-name",
    "importTimestamp" : "2024-06-21T02:47:45.747Z",
    "tags" : [ ],
    "softwareInfo" : {
      "baseImage" : {
        "version" : "7.0.0-0.0.30340198"
      }
    }
  } ]
}

Upload a Personality with RAW mode. Upload a Personality with REFERRED mode. Get a cluster image/personality by Id Get all the Personalities/cluster images by base version

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 API

The following data is required:

  • Id of the cluster image

4.2. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/personalities/b013e638-1482-42f3-ab10-c728709f0f2a' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/personalities/b013e638-1482-42f3-ab10-c728709f0f2a 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: 882

{
  "version" : "1",
  "personalityId" : "bbd38966-8537-46f1-9a54-06fbfe7079c6",
  "personalityName" : "test-display-name",
  "description" : "test-desc",
  "createdBy" : "USER",
  "imageChecksum" : "test-checksum",
  "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",
  "displayName" : "test-display-name",
  "importTimestamp" : "2024-06-21T02:47:47.848Z",
  "tags" : [ ],
  "softwareInfo" : {
    "baseImage" : {
      "version" : "7.0.0-0.0.30340198"
    }
  }
}

Upload a Personality with RAW mode. Upload a Personality with REFERRED mode. Get a cluster image/personality by name Get all the Personalities/cluster images by base version

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 API

The following data is required:

  • Base Version of the Personality

5.2. Steps API

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

Upload a Personality with RAW mode. Upload a Personality with REFERRED mode. Get a cluster image/personality by Id Get a cluster image/personality by name
Last updated 2024-06-21 01:22:12 -0700

Operations
DELETE
Delete Personality
Delete the personality based on either name or id
GET
Get Personalities
Get the Personalities
GET
Get Personality
Get a Personality by its 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