In REST API, a resource is an abstract notion. When the client and the server communicate with each other, they exchange representations of resources.
The resource representation has the form of an XML or JSON document. For example, if you request information about a backup server connected to Veeam Backup Enterprise Manager, Veeam Backup Enterprise Manager will return a resource representation of the backup server resource similar to the following:
<EntityRef xmlns="http://www.veeam.com/ent/v1.0" Type="BackupServerReference" Href="https://srv12.tech.local:9398/api/backupServers/ffa6d4ef-ea63-4fb3-88a1-84706c2430e1" Name="appsrv01.tech.local" UID="urn:veeam:BackupServer:ffa6d4ef-ea63-4fb3-88a1-84706c2430e1">
To request resource representations in a specific format (XML or JSON), you must use request headers. For details, see Header Format.
A resource representation is a document that holds all data you need to know about the resource and its behavior. Typically, a resource representation contains the following data on the resource:
- General information about the resource: name, ID, URL and type
- Information about other resources related to the resource
- Set of actions that can be performed with the resource (if applicable)
Information about related resources and actions available for the resource is presented in the form of links.