Avisi cloud logo
Cloud accounts

Create vSphere credentials inside an vSphere cloud account.

POST
/api/v1/orgs/{organisationSlug}/cloud-accounts/{cloudAccountIdentity}/credentials/vsphere

Request Body

application/jsonRequired
displayNamestring
Pattern"^[a-zA-Z0-9\\-\\s&]*$"
Length1 <= length <= 64
metadata?object

Empty Object

credentials?object

Path Parameters

organisationSlugstring
Pattern"^[a-z0-9-]+$"
cloudAccountIdentitystring
Format"uuid"

Response Body

Request was successfully processed. The response body contains the requested data.

TypeScript Definitions

Use the response body type in TypeScript.

identity?string
Format"uuid"
displayName?string
cloudType?string
cloudAccountIdentity?string
Format"uuid"
createdAt?string
Format"date-time"
metadata?object

Empty Object

isPrimary?boolean

Invalid request parameters. Please review the documentation for valid parameter values.

TypeScript Definitions

Use the response body type in TypeScript.

response?unknown

You do not have the necessary permissions to access this resource.

TypeScript Definitions

Use the response body type in TypeScript.

response?unknown

The requested resource could not be found. Please check the resource URL or identifier.

TypeScript Definitions

Use the response body type in TypeScript.

response?unknown

An internal error occurred on the server.

TypeScript Definitions

Use the response body type in TypeScript.

response?unknown
curl -X POST "https://api.avisi.cloud/api/v1/orgs/string/cloud-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/credentials/vsphere" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "string"
  }'
const body = JSON.stringify({
  "displayName": "string"
})

fetch("https://api.avisi.cloud/api/v1/orgs/string/cloud-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/credentials/vsphere", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.avisi.cloud/api/v1/orgs/string/cloud-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/credentials/vsphere"
  body := strings.NewReader(`{
    "displayName": "string"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.avisi.cloud/api/v1/orgs/string/cloud-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/credentials/vsphere"
body = {
  "displayName": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "identity": "10a80a7a-1a32-4a74-b592-aa2a4ef691c5",
  "displayName": "string",
  "cloudType": "string",
  "cloudAccountIdentity": "763d6cbd-4c53-4613-bba9-cb8f34de18a7",
  "createdAt": "2019-08-24T14:15:22Z",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "isPrimary": true
}
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}