GET /replicaSessions/{ID}

Returns a resource representation of a replication job session having the specified ID.

Request

To get a job session, send the GET HTTP request to the URL of the /replicaSessions/{ID} resource.

HTTP Request

GET https://<Enterprise-Manager>:9398/api/replicaSessions/{ID}

Request Headers

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.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns response code 200 OK.

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, Veeam Backup Enterprise Manager returns an entity or an entity reference of the /replicaSessions/{ID} resource. The resource entity contains the following parameters and links.

Parameters

Element

Type

Description

UID

UidType

UID of the replication job session resource, for example: urn:veeam:ReplicaJobSession:88b395e2-81ff-439c-558c-188d97274c15.

Name

String

Name of the replication job session resource, for example: exch@2013-08-26 22:28:51.

JobUid

UidType

UID of the replication job parent to the replication job session resource, for example: urn:veeam:Job:dce85686-59c8-42c4-8766-f1c00a5b8067.

JobName

String

Name of the replication job parent to the replication job session resource, for example: SQL Replica.

JobType

String

Type of the replication job session. Possible values: Replica.

CreationTime

DateTime

Date and time when the replication job session was started. The parameter accepts only UTC-formatted DateTime values.

EndTime

DateTime

Date and time when the replication job session was ended. The parameter accepts only UTC-formatted DateTime values

State

String

State of the replication job session. Possible values:

  • Starting
  • Stopping
  • Working
  • Pausing
  • Resuming
  • Stopped

Result

String

Result of the replication job session. Possible values:

  • Success
  • Warning
  • Failed

Progress

Int

Progress of the replication job session (between 1 and 100).

IsRetry

Boolean

Defines whether the replication job session has been retried or not. Possible values:

  • True
  • False

To view query parameters that you can use for filtering or sorting, see GET /query?type=ReplicaJobSession.

Links

Reference

Relationship

Description

/backupServers/{ID}

Up

URL of the /backupServers/{ID} resource — a backup server where the replication job was configured.

/jobs/{ID}

Up

URL of the /jobs/{ID} resource — a job that processes the replica.

/replicaSessions/{ID}

Alternate

Alternate URL of the /replicaSessions/{ID} resource.

/replicaSessions/{ID}/replicaTaskSessions

Down

URL of the /replicaTaskSessions resource — a collection of replication task sessions of the replication session.

Example

A sample request below returns an entity representation of the replication job session resource having ID 04f694ad-664c-4603-a747-00edecae4f17.

Request:

GET https://localhost:9398/api/replicaSessions/04f694ad-664c-4603-a747-00edecae4f17?format=Entity

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Response:

200 OK

 

Response Body:

<?xml version="1.0" encoding="utf-8"?>
<ReplicaJobSession xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Href="https://localhost:9398/api/replicaSessions/04f694ad-664c-4603-a747-00edecae4f17?format=Entity" Type="ReplicaJobSession" Name="Replication Job 1@2021-10-07 20:00:02" UID="urn:veeam:ReplicaJobSession:04f694ad-664c-4603-a747-00edecae4f17" xmlns="http://www.veeam.com/ent/v1.0">
   <Links>
       <Link Href="https://localhost:9398/api/backupServers/a490c017-2c1c-40ee-8bcf-73bcce6ab36f" Name="enterprise01.tech.local" Type="BackupServerReference" Rel="Up" />
       <Link Href="https://localhost:9398/api/jobs/724e3c07-4e12-44f5-998f-d568071216d8" Name="Replication Job 1" Type="JobReference" Rel="Up" />
       <Link Href="https://localhost:9398/api/replicaSessions/04f694ad-664c-4603-a747-00edecae4f17" Name="Replication Job 1@2021-10-07 20:00:02" Type="ReplicaJobSessionReference" Rel="Alternate" />
       <Link Href="https://localhost:9398/api/replicaSessions/04f694ad-664c-4603-a747-00edecae4f17/replicaTaskSessions" Type="ReplicaTaskSessionReferenceList" Rel="Down" />
   </Links>
   <JobUid>urn:veeam:Job:724e3c07-4e12-44f5-998f-d568071216d8</JobUid>
   <JobName>Replication Job 1</JobName>
   <JobType>Replica</JobType>
   <CreationTimeUTC>2021-10-07T20:00:02.42Z</CreationTimeUTC>
   <EndTimeUTC>2021-10-07T20:03:56.477Z</EndTimeUTC>
   <State>Stopped</State>
   <Result>Success</Result>
   <Progress>100</Progress>
   <IsRetry>false</IsRetry>
</ReplicaJobSession>