Step 2. Perform Logon

Before you can start working with Veeam Backup Enterprise Manager REST API resources, you must log on to Veeam Backup Enterprise Manager and create a new logon session.

  1. When you access the Veeam Backup Enterprise Manager REST API by its base URL, Veeam Backup Enterprise Manager returns a representation with a link to a list of existing sessions and links to creating a new logon session. The SupportedVersion sections in the representation indicate versions of Veeam Backup Enterprise Manager REST API. You can create a new logon session to work with resources that are supported in the latest or the specified version of REST API.

To work with all 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 example, to work with REST API resources supported in Veeam Backup & Replication 12, create a new logon session using one of the following links:

  • https://localhost:9398/api/sessionMngr/?v=latest
  • https://localhost:9398/api/sessionMngr/?v=v1_6

If a previous version of Veeam Backup & Replication is installed on your backup server, you need to create a new logon session with the link to the REST API version that matches the version of Veeam Backup & Replication. For details, see Versioning.


GET https://localhost:9398/api/



200 OK


Response Body:

<?xml version="1.0" encoding="utf-8"?>
<EnterpriseManager xmlns:xsd="" xmlns:xsi="" xmlns="">
   <Link Href="" Type="LogonSessionList" Rel="Down"/>
   <Link Href="" Type="LogonSession" Rel="Create"/>
   <SupportedVersion Name="v1_5">
       <Link Href="" Type="LogonSession" Rel="Create"/>
   <SupportedVersion Name="v1_6">
       <Link Href="" Type="LogonSession" Rel="Create"/>
   <SupportedVersion Name="v1_7">
       <Link Href="" Type="LogonSession" Rel="Create"/>

  1. As there are no existing logon sessions, you need to create a new one. A new logon session is created by sending the POST HTTP request to the /sessionMngr/ resource. In the header of the request, provide user credentials of the account you plan to use for the current logon session. To make up the credentials string:
  1. Construct a string in the username:password format.
  2. Encode the string with base64 encoding.
  3. Add the Authorization header to the POST HTTP request. In the value of the header, specify Basic <encoded_string>:

Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

  1. Send the composed POST HTTP request to the /sessionMngr/ resource. Veeam Backup Enterprise Manager will return a list of resources with which you can work using Veeam Backup Enterprise Manager REST API. In the UserName element, Veeam Backup Enterprise Manager will return a name of the user who is currently logged on. In the header of the response, Veeam Backup Enterprise Manager will supply a newly generated authorization token for the created logon session:


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


Request Header:

Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=



201 Created


Response Header:

X-RestSvcSessionId: O9Msj3rq7EGUhtSMBQx+mw==


Response Body:

<LogonSession xmlns="" Type="LogonSession" Href="">
   <Link Rel="Up" Type="EnterpriseManager" Href="" />
   <Link Rel="Down" Type="BackupServerReferenceList" Href="" />
   <Link Rel="Down" Type="ManagedServerReferenceList" Href="" />
   <Link Rel="Down" Type="JobReferenceList" Href="" />
   <Link Rel="Down" Type="FailoverPlanReferenceList" Href="" />
   <Link Rel="Down" Type="HierarchyRootReferenceList" Href="" />
   <Link Rel="Down" Type="RepositoryReferenceList" Href="" />
   <Link Rel="Down" Type="BackupReferenceList" Href="" />
   <Link Rel="Down" Type="RestorePointReferenceList" Href="" />
   <Link Rel="Down" Type="VmRestorePointReferenceList" Href="" />
   <Link Rel="Down" Type="VAppRestorePointReferenceList" Href="" />
   <Link Rel="Down" Type="ReplicaReferenceList" Href="" />
   <Link Rel="Down" Type="VmReplicaPointReferenceList" Href="" />
   <Link Rel="Down" Type="CatalogVmReferenceList" Href="" />
   <Link Rel="Down" Type="BackupJobSessionReferenceList" Href="" />
   <Link Rel="Down" Type="RestoreSessionReferenceList" Href="" />
   <Link Rel="Down" Type="ReplicaJobSessionReferenceList" Href="" />
   <Link Rel="Down" Type="BackupTaskSessionReferenceList" Href="" />
   <Link Rel="Down" Type="ReplicaTaskSessionReferenceList" Href="" />
   <Link Rel="Down" Type="EnterpriseSecuritySettings" Href="" />
   <Link Rel="Down" Type="WanAcceleratorReferenceList" Href="" />
   <Link Rel="Down" Type="BackupFileReferenceList" Href="" />
   <Link Rel="Down" Type="ExternalRepositoryReferenceList" Href="" />
   <Link Rel="Down" Type="TaskList" Href="" />
   <Link Rel="Down" Type="QueryService" Href="" />
   <Link Rel="Down" Type="LookupService" Href="" />
   <Link Rel="Down" Type="Report" Href="" Name="Summary" />
   <Link Rel="Down" Type="BackupServerList" Href="" />
   <Link Rel="Down" Type="ManagedServerList" Href="" />
   <Link Rel="Create" Href="" />
   <Link Rel="Down" Type="JobList" Href="" />
   <Link Rel="Down" Type="FailoverPlanList" Href="" />
   <Link Rel="Down" Type="HierarchyRootList" Href="" />
   <Link Rel="Down" Type="RepositoryList" Href="" />
   <Link Rel="Down" Type="BackupList" Href="" />
   <Link Rel="Down" Type="RestorePointList" Href="" />
   <Link Rel="Down" Type="VmRestorePointList" Href="" />
   <Link Rel="Down" Type="VAppRestorePointList" Href="" />
   <Link Rel="Down" Type="ReplicaList" Href="" />
   <Link Rel="Down" Type="VmReplicaPointList" Href="" />
   <Link Rel="Down" Type="CatalogVmList" Href="" />
   <Link Rel="Down" Type="BackupJobSessionList" Href="" />
   <Link Rel="Down" Type="RestoreSessionList" Href="" />
   <Link Rel="Down" Type="ReplicaJobSessionList" Href="" />
   <Link Rel="Down" Type="BackupTaskSessionList" Href="" />
   <Link Rel="Down" Type="ReplicaTaskSessionList" Href="" />
   <Link Rel="Down" Type="WanAcceleratorList" Href="" />
   <Link Rel="Down" Type="VCloudService" Href="" />
   <Link Rel="Down" Type="BackupFileList" Href="" />
   <Link Rel="Down" Type="AgentsService" Href="" />
   <Link Rel="Down" Type="VSphereSelfService" Href="" />
   <Link Rel="Down" Type="ExternalRepositoryList" Href="" />
   <Link Rel="Down" Type="NasService" Href="" />
   <Link Rel="Delete" Href="" />

  1. You must copy the obtained X-RestSvcSessionId header and send it in the header of all subsequent requests to Veeam Backup Enterprise Manager.


To create a new logon session for a tenant, you need to provide tenant credentials in the body of the POST HTTP request to the URL of the /sessionMngr/ resource. For details, see Tenant Logon Session.


Page updated 1/25/2024

Page content applies to build