Extend

Extend

In order to perform replication management operations that involve remote sites, your session needs to be "extended" with credentials (vCD auth cookie or org user and password) to the related remote site. The supported authentication methods are:

  • with vCloud Director credentials:
    {
        "type": "credentials",
        "site": "site1",
        "vcdUsername": "admin1@org2",
        "vcdPassword": "password"
    }
    


  • with vCloud Director auth cookie:

    {
        "type": "cookie",
        "site": "site1",
        "cookie": "f12977876fef48a6b032ffdb2cdf22d7"
    }
    
Request
URI
POST
https://{api_host}//sessions/extend
COPY
Header Parameters
string
operationID
Optional

Operation ID for correlating logs across multiple services


Request Body

auth

AuthRequest of type(s) application/json
Required
{
    "site": "site2",
    "type": "string"
}
string
site
Required

Identifies the vCD sites we're logging into.

string
type
Required

type

Possible values are : cookie, credentials,
Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns C4SessionDetails of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "authenticatedSites": [
        {
            "org": "Org1",
            "site": "site1"
        }
    ],
    "roles": [
        "EVERYONE"
    ],
    "user": "admin1@Org1"
}
authenticatedSites
Optional

vCloud Director sites the current session has authenticated with. The site specified in the request should be present here

array of string
roles
Optional

Roles granted to the session

string
user
Optional

The currently authenticated user


400

Returned error codes include (but are not limited to):

  • BadUserInput
  • BadRequest
Returns ApiError of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "args": [
        "string"
    ],
    "code": "string",
    "msg": "string",
    "stacktrace": "string"
}
array of string
args
Optional

Positional arguments.

string
code
Optional

Specific error code.

string
msg
Optional

Detailed error message.

string
stacktrace
Optional

Exception stacktrace.


401

Returned error codes include (but are not limited to):

  • NotAuthenticated
  • RemoteAuthenticationFailure
Returns ApiError of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "args": [
        "string"
    ],
    "code": "string",
    "msg": "string",
    "stacktrace": "string"
}
array of string
args
Optional

Positional arguments.

string
code
Optional

Specific error code.

string
msg
Optional

Detailed error message.

string
stacktrace
Optional

Exception stacktrace.


404

Returned error codes include (but are not limited to):

  • SiteNotFound
Returns ApiError of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "args": [
        "string"
    ],
    "code": "string",
    "msg": "string",
    "stacktrace": "string"
}
array of string
args
Optional

Positional arguments.

string
code
Optional

Specific error code.

string
msg
Optional

Detailed error message.

string
stacktrace
Optional

Exception stacktrace.


500

Returned error codes include (but are not limited to):

  • GeneralServerFailure
Returns ApiError of type(s) application/vnd.vmware.h4-v3.5+json;charset=UTF-8
{
    "args": [
        "string"
    ],
    "code": "string",
    "msg": "string",
    "stacktrace": "string"
}
array of string
args
Optional

Positional arguments.

string
code
Optional

Specific error code.

string
msg
Optional

Detailed error message.

string
stacktrace
Optional

Exception stacktrace.