Retrieving and saving the notes of a DMS object
Released: JSON representation
This chapter explains how to retrieve and save the notes of a DMS object.
To retrieve or save the notes of a DMS object, you must perform the following steps:
Determining the URL for a repository
Determine and open the link relation for retrieving the details of a DMS object
Determine the link relation for retrieving the notes of a DMS object
Open the URL for the notes of a DMS object
Determining the URL for a repository
In the chapter Determining a repository, you can learn how to determine the URL for a repository.
Determine and open the link relation for retrieving the details of a DMS object
In the chapter Retrieving and viewing the details of a DMS object, you can learn how to determine and open the URL for retrieving the details of a DMS object.
Determine the link relation for retrieving the notes of a DMS object
The JSON object for the details of a DMS object contains the link relation notes, which you can use to retrieve the notes of the DMS object.
Response
{ "_links": { "notes":{ "href": "/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/o2m/D000000123/n" } }, "id": "D000000123" }
Retrieving the notes of a DMS object
Retrieve the notes of the DMS object with the previously determined URL as follows:
Request
GET https://host/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/o2m/D000000123/n HTTP/1.1 Accept: application/hal+json
As the response, you receive the object with the notes of the DMS object:
Response
HTTP/1.1 200 OK Content-Type: application/hal+json { "_links": { "self": { "href": "/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/o2m/D000000123/n" } }, "notes":[{ "creator" : { "id": "MargaS" "displayName": "Marga Schilling" }, "text": "This is a sample text." "created": "2019-09-03T09:09:09.453+02:00" } ] }
Property | Description |
---|---|
|
|
| Specifies the array with the note elements of the DMS object. |
Structure of a note element
Property | Description |
---|---|
| Returns an object with information on the user who has written the note. |
| Contains the content of the note. |
| Specifies the unique timestamp indicating the time the note was written. The timestamp is returned in ISO format. |
Structure of a creator object
Property | Description |
---|---|
| Returns the unique ID of the d.3 user. |
| Returns the display name of the d.3 user. |
Saving the notes of a DMS object
With a HTTP POST
request for the previously determined URL you can create a note for a DMS object. If you want to create multiple notes, repeat the process. Save a note as follows:
Request
POST https://host/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/o2m/D000000123/n HTTP/1.1 Content-Type: application/json Content-Length: 42 { "text": "This is a sample text." }
Response
HTTP/1.1 200 OK
Structure of the note object
Property | Description |
---|---|
| Contains the content of the note. |