Data Object Representation

TPM REST API mainly consumes data objects in JSON forms.

The following are two data object categories for communicating with TPM REST API:

Data Object Forms of an HTTP Request

TPM REST API consumes data objects in regular HTTP query string form that is sent by an HTTP Request:
Note:
  • File Content data object, for example keys, certificates, and uploaded files, are consumed and responded in Base64 format.
  • When explicitly retrieving file content data object with .content suffix, TPM REST API will respond with the file content.
  • When retrieving file content data object with .reference suffix, TPM REST API will respond with the according file content reference.
  • When retrieving file content data object with no suffix, TPM REST API will process the request as retrieving file content data object with .reference suffix.

Data Object Form of an HTTP Response

TPM REST API represents data objects in the following forms that are sent by an HTTP Response:
  • JSON object form, represents a regular complex data object.
  • JSON array form, represents a collection and an array of data object.
Note: Response status of the Create, Update, and Delete operations are as the following:
  • Successful operation response: {"result":"Operate successfully"}
  • Failed operation response: {"errorMessage":"XXXXXX"}