Step 2. Perform Logon

Before you can start working with Veeam Backup Enterprise Manager RESTful 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 RESTful 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 RESTful API. You can create a new logon session to work with resources that are supported in the latest or the specified version of RESTful API.

To work with all Veeam Backup Enterprise Manager RESTful 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 RESTful API resources supported in Veeam Backup & Replication 9.5, 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_5

If a previous version of Veeam Backup & Replication is installed on your Veeam backup server, you should create a new logon session using the link to the corresponding version of Veeam Backup Enterprise Manager RESTful API. To learn more, see Veeam Backup Enterprise Manager RESTful API Versions.


GET https://localhost:9398/api/



200 OK


Response Body:

<EnterpriseManager xmlns="">
   <Link Rel="Down" Type="LogonSessionList" Href="" />
   <Link Rel="Create" Type="LogonSession" Href="" />
   <SupportedVersion Name="v1">
       <Link Rel="Create" Type="LogonSession" Href="" />
   <SupportedVersion Name="v1_1">
       <Link Rel="Create" Type="LogonSession" Href="" />
   <SupportedVersion Name="v1_2">
       <Link Rel="Create" Type="LogonSession" Href="" />
   <SupportedVersion Name="v1_3">
       <Link Rel="Create" Type="LogonSession" Href="" />
   <SupportedVersion Name="v1_4">
       <Link Rel="Create" Type="LogonSession" Href="" />
   <SupportedVersion Name="v1_5">
       <Link Rel="Create" Type="LogonSession" Href="" />

  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 RESTful 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_5


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.

Step 2. Perform LogonNote:

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. To learn more, see Tenant Logon Session.


I want to report a typo

There is a misspelling right here:


I want to let the Veeam Documentation Team know about that.