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 document. For example, if you request information about a Veeam backup server connected to Veeam Backup Enterprise Manager, Veeam Backup Enterprise Manager will return a resource representation of the Veeam backup server resource similar to the following:
<EntityRef xmlns="http://www.veeam.com/ent/v1.0" Type="BackupServerReference" Href="http://localhost:9399/api/backupServers/f62624c1-8462-4747-8bd4-d686f99b0540" Name="backupserver" UID="urn:veeam:BackupServer:120ec827-118d-48e1-8ec5-5f1d55986acd">
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.
- Resource Representations for Non-Key Resources
- Resource Representation for Key Resources
- Resource Representations for Collections of Resources