Making a POST request
In this example, you create a new Note object by calling the POST method on the Notes resource.
Before you begin
You cannot make a POST request by using a web browser, as web browsers only directly support GET requests. For this example, we assume that you have installed a REST client browser plugin. Chrome and Firefox both support open source Rest Client plugins that allow for the invocation of REST APIs from the browser.
Procedure
Results
If the request is successful, you see a HTTP 201 Created response code, indicating the successful creation of the Note.
The HTTP response will contain no body content, however the response header will include a Location property, referencing the URL of the newly created note resource. For example:
Location: https://<host>:<port>/Rest/v1/notes/12345
This URL follows the same format as the POST URL, but with the additional /{note_id} path parameter added to the end. In the above example, 12345 is the unique identifier of the newly created note.
If the request is unsuccessful or if you are not logged into the Cúram server, you see a HTTP error response code.
.