Links
The main constructs of a resource representation are links. Links are the primary means to address resources and manipulate them.
When the client sends a request to the server, the server returns to the client a resource representation with a set of links. Links are elements in the XML document that the client can use to:
- Access resources to which the resource has relationships
- Perform actions with the resource
- Create new resources
Essentially, every link is a reference to another resource or some action. Links communicate to the client what the client can do next: get information about a related resource, perform some action with the resource or create a new resource, such as a new logon session.
For example, if you send an XML request to get a representation for a specific backup job resource, you will get the following set of links:
<Job xmlns="http://www.veeam.com/ent/v1.0" Type="Job" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?format=Entity" Name="Exchange Backup" UID="urn:veeam:Job:568c42ce-eb11-4140-92cf-39ab36712bf5"> |
Using links from the representation of the job resource, you can get information about job sessions and the backup server on which the job was created, add objects to the job, edit the jobs settings, start, stop, retry and clone and disable/enable a job.
This resource representation contains links to the following related resources:
- Backup server where the job is created:
<Link Rel="Up" Type="BackupServerReference" Href="https://localhost:9398/api/backupServers/21a631e0-af7f-46ba-afbd-273de2e6fd4a" Name="localhost" /> |
- Entity of the backup job. For details on entities, see Resource Representation for Key Resources.
<Link Rel="Alternate" Type="JobReference" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5" Name="Exchange Backup" /> |
- List of job sessions:
<Link Rel="Down" Type="BackupJobSessionReferenceList" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/backupSessions" /> |
The backup job resource representation also contains a set of actions that you can perform with the job resource:
- Add VMs and VM containers to the job:
<Link Rel="Create" Type="ObjectInJob" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/includes" /> |
- Edit a job:
<Link Rel="Edit" Type="JobReference" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5" Name="Exchange Backup" /> |
- Start a job:
<Link Rel="Start" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=start" /> |
- Stop a job:
<Link Rel="Stop" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=stop" /> |
- Retry a job:
<Link Rel="Retry" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=retry" /> |
- Clone a job:
<Link Rel="Clone" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=clone" /> |
- Enable or disable the job schedule:
<Link Rel="ToggleScheduleEnabled" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=toggleScheduleEnabled" /> |
In This Section