Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 910 Bytes

notes.rest

File metadata and controls

45 lines (30 loc) · 910 Bytes

@url=http://localhost:3000/api/v1/notes

@authToken = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlYjYyYjUxNGE2ZWY2MTQ4NGY4ZjdiOSIsImlhdCI6MTU4OTAwMTc2MSwiZXhwIjoxNTg5MDAyNjYxfQ.k7eA2CTPN1ERCD78LSg41PmUZzAto0ptrxlu34Qq5og

@nid = 5eb62d4b7425183abc55d2fa

### Get All Notes GET {{url}}

### Get All Notes searching and sorting GET {{url}}?select=likes,title&sort=likes

### Paginaion and Sorting GET {{url}}?limit=1&page=2

### Get single note GET {{url}}/{{nid}}

### Create Note POST {{url}} Content-Type: application/json Authorization: Bearer {{authToken}}

{
"body": "This is a body hai ta -2", "title": "This is a private title", "isPrivate": false

}

### Update Note PATCH {{url}}/{{nid}} Content-Type: application/json Authorization: Bearer {{authToken}}

{
"body": "this is a private body from patch req ok"

}

### Delete Note DELETE {{url}}/{{nid}} Authorization: Bearer {{authToken}}