Added PATCH verb end point for annotation op
Added new PATCH verb annotation endpoint Removed unwanted fmt Added test cases for PATCH verb annotation endpoint Fixed formatting issue Check arr len before proceeding Updated doc to include PATCH verb annotation endpt
This commit is contained in:
1 parent
57457e2aa4
commit
a7a964ec19
5 files changed
+156
-1
No files matched your search
@@ -160,15 +160,18 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
## Update Annotation
|
||||
## Replace Annotation
|
||||
|
||||
`PUT /api/annotations/:id`
|
||||
|
||||
Replaces the annotation that matches the specified id.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```json
|
||||
PUT /api/annotations/1141 HTTP/1.1
|
||||
Accept: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
@@ -180,6 +183,28 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
## Update Annotation
|
||||
|
||||
`PATCH /api/annotations/:id`
|
||||
|
||||
Updates one or more properties of an annotation that matches the specified id.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```json
|
||||
PATCH /api/annotations/1145 HTTP/1.1
|
||||
Accept: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"time":1507037197000,
|
||||
"timeEnd":1507180807095,
|
||||
"text":"New Annotation Description",
|
||||
"tags":["tag6","tag7","tag8"]
|
||||
}
|
||||
```
|
||||
|
||||
## Delete Annotation By Id
|
||||
|
||||
`DELETE /api/annotations/:id`
|
||||
|
||||
Reference in new issue
Block a user