Difference between revisions of "API Add Marker"
IVSWikiBlue (talk | contribs) (Created page with "This API call will add a new marker to the specified recording. This call can be used on a recording in progress. ===Resource URL=== <pre>http://valt.example.com/api/v3//reco...") |
(No difference)
|
Latest revision as of 13:53, 14 April 2020
This API call will add a new marker to the specified recording. This call can be used on a recording in progress.
Contents
Resource URL
http://valt.example.com/api/v3//records/{recordid}/markers
Replace {recordid} with the actual id number of the record. Records are numbered sequentially when added to VALT.
Resource Information
| Method | POST |
| Headers | Content-Type:application/json |
| Response Type | JSON |
| Authentication Required | Yes |
Parameters
The JSON body must be properly formatted. All fields and values should be enclosed in double quotes and separated by a colon.
| Field Name | Description | Required | Example | |
|---|---|---|---|---|
| event | Marker Name | yes | Confession | |
| time | Time index in seconds in the recording where the marker will be inserted. An invalid time index can cause an error with the API call. | yes | 127 | |
| template | Array of JSON objects containing the field ids and values for the marker template. | no | {"14":"Confession witnessed by officers Jones and Smith"} | |
| {fieldid} | Primary group ID for the new user. | no | Confession witnessed by officers Jones and Smith | |
Response
| Code | Reason |
|---|---|
| 200 | Marker Added Successfully |
| 400 | Invalid Request (See Response for Specific Error) |
| 401 | Unauthorized |
| 500 | JSON Body Formatted Incorrectly |
| data | |
|---|---|
| marker_add | true = marker added successfully, false = marker could not be added |
| id | ID number for the new marker. |
| message | Detailed Status Message |
Examples
Request
The sample JSON body below is formatted with line breaks and indentation to make it easier to read. This is not required.
https://ivstest1.ad.ipivs.com/api/v3/records/616/markers?access_token=e82632d19c523678fea3d1016c6df9e9
{
"event":"API Marker 3",
"time":30,
"template":
{
"9":"12345678",
"10":"Test Note"
}
}
Successful Response
Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.
{
"data":{
"marker_add": true,
"id": 31,
"message": "marker add"
}
}
Failure Response
Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.
{
"error":{
"code": 500,
"message": "Internal Server Error"
}
}