POST /sessionMngr/

Creates a new logon session for Veeam Backup Enterprise Manager REST API.

Request

To create a new logon session, send the POST HTTP request to the URL of the /sessionMngr/ resource.

Note

To work with Veeam Backup Enterprise Manager REST API resources available in the current version of Veeam Backup & Replication and to access a complete set of actions that can be performed with those resources, create a new logon session using the link to the latest version of the /sessionMngr/ resource. For details, see Perform Logon.

HTTP Request

POST https://<Enterprise-Manager>:9398/api/sessionMngr/?v=v1_7

or

POST https://<Enterprise-Manager>:9398/api/sessionMngr/?v=latest

Request Header

The request contains the following headers:

Header

Required

Description

X-RestSvcSessionId

True

The request requires authorization. In the header, the client must send a session ID copied from the server reply to the request creating a new logon session. For details, see Authentication and Security.

Accept

False

Identifies the format of the response. Possible values:

  • application/xml — the client can send this value in the header to accept response in the XML format.
  • application/json — the client must send this value in the header to accept the request in the JSON format.

If the request does not contain the header, the server will return the response in the XML format.

Request Body

None.

Note

To create a new logon session for a tenant, you need to provide tenant credentials in the request body. For details, see Tenant Logon Session.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns response code 201 Created.

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTP headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the request body message. Possible values:

  • application/xml
  • application/json

Response Body

In the response body, the REST API returns a resource representation of the created logon session. The resource representation of the logon session contains links to resources available through Veeam Backup Enterprise Manager REST API.

Example

The example below creates a new logon session for Veeam Backup Enterprise Manager REST API.

Request:

POST https://localhost:9398/api/sessionMngr/?v=v1_7

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Request Body:

None

 

Response:

201 Created

 

Response Body:

<LogonSession xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.veeam.com/ent/v1.0" Href="https://enterprise04.tech.local:9398/api/logonSessions/7686d89e-26fd-48e6-963c-c9dbce802981" Type="LogonSession">
 <Links>
   <Link Href="https://enterprise04.tech.local:9398/api/" Type="EnterpriseManager" Rel="Up"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupServers" Type="BackupServerReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/managedServers" Type="ManagedServerReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/jobs" Type="JobReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/failoverPlans" Type="FailoverPlanReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/hierarchyRoots" Type="HierarchyRootReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/repositories" Type="RepositoryReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backups" Type="BackupReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/restorePoints" Type="RestorePointReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vmRestorePoints" Type="VmRestorePointReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vAppRestorePoints" Type="VAppRestorePointReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/replicas" Type="ReplicaReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vmReplicaPoints" Type="VmReplicaPointReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/catalog/vms" Type="CatalogVmReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupSessions" Type="BackupJobSessionReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/restoreSessions" Type="RestoreSessionReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/replicaSessions" Type="ReplicaJobSessionReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupTaskSessions" Type="BackupTaskSessionReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/replicaTaskSessions" Type="ReplicaTaskSessionReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/security" Type="EnterpriseSecuritySettings" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/wanAccelerators" Type="WanAcceleratorReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupFiles" Type="BackupFileReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/externalRepositories" Type="ExternalRepositoryReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpPolicies" Type="CdpPolicyReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpReplicaSessions" Type="CdpReplicaSessionReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpReplicaTaskSessions" Type="CdpReplicaTaskSessionReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vAppReplicaPoints" Type="VAppReplicaPointReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpReplica/vms" Type="VmCdpReplicaReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpReplica/vApps" Type="VAppCdpReplicaReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/systemSessions" Type="BackupJobSessionReferenceList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/tasks" Type="TaskList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/querySvc" Type="QueryService" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/lookupSvc" Type="LookupService" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/reports/summary" Name="Summary" Type="Report" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupServers?format=Entity" Type="BackupServerList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/managedServers?format=Entity" Type="ManagedServerList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupServers?action=create" Rel="Create"/>
   <Link Href="https://enterprise04.tech.local:9398/api/jobs?format=Entity" Type="JobList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/failoverPlans?format=Entity" Type="FailoverPlanList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/hierarchyRoots?format=Entity" Type="HierarchyRootList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/repositories?format=Entity" Type="RepositoryList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backups?format=Entity" Type="BackupList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/restorePoints?format=Entity" Type="RestorePointList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vmRestorePoints?format=Entity" Type="VmRestorePointList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vAppRestorePoints?format=Entity" Type="VAppRestorePointList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/replicas?format=Entity" Type="ReplicaList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vmReplicaPoints?format=Entity" Type="VmReplicaPointList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/catalog/vms?format=Entity" Type="CatalogVmList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupSessions?format=Entity" Type="BackupJobSessionList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/restoreSessions?format=Entity" Type="RestoreSessionList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/replicaSessions?format=Entity" Type="ReplicaJobSessionList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupTaskSessions?format=Entity" Type="BackupTaskSessionList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/replicaTaskSessions?format=Entity" Type="ReplicaTaskSessionList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/wanAccelerators?format=Entity" Type="WanAcceleratorList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vCloud" Type="VCloudService" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/backupFiles?format=Entity" Type="BackupFileList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/agents" Type="AgentsService" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/selfService/vSphere" Type="VSphereSelfService" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/externalRepositories?format=Entity" Type="ExternalRepositoryList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/nas" Type="NasService" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpPolicies?format=Entity" Type="CdpPolicyList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpReplicaSessions?format=Entity" Type="CdpReplicaSessionList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpReplicaTaskSessions?format=Entity" Type="CdpReplicaTaskSessionList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/vAppReplicaPoints?format=Entity" Type="VAppReplicaPointList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpReplica/vms?format=Entity" Type="VmCdpReplicaList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/cdpReplica/vApps?format=Entity" Type="VAppCdpReplicaList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/systemSessions?format=Entity" Type="BackupJobSessionList" Rel="Down"/>
   <Link Href="https://enterprise04.tech.local:9398/api/logonSessions/7686d89e-26fd-48e6-963c-c9dbce802981" Rel="Delete"/>
 </Links>
 <UserName>TECH\sheila.d.cory</UserName>
 <SessionId>7686d89e-26fd-48e6-963c-c9dbce802981</SessionId>
</LogonSession>