Add a resource to favorites
To add a resource to your favorite list:
POST /favorites/resource/<resourceId>.json
Possible responses
Code | Description |
---|---|
200 | OK Request went through. Given resource has been added to favorite |
400 | Bad Request
|
403 | Authentication Failure The user making the request is not authenticated |
404 | Not Found
|
Response examples
Success
Upon success this will return a json response like below
{
"header": {
"id": "0bade2b5-db54-4537-872e-b82f33dee3e6",
"status": "success",
"servertime": 1555055916,
"action": "0ed6c4a8-8c1f-52c6-9859-67f37794a02e",
"message": "The resource was marked as favorite.",
"url": "/favorites/resource/4d7adb92-0d85-56d7-8b92-e2b919ef8eb8.json",
"code": 200
},
"body": {
"user_id": "f848277c-5398-58f8-a82a-72397af2d450",
"foreign_key": "4d7adb92-0d85-56d7-8b92-e2b919ef8eb8",
"foreign_model": "Resource",
"created": "2019-04-12T07:58:36+00:00",
"modified": "2019-04-12T07:58:36+00:00",
"id": "288050d2-25b0-4c04-a959-2fc6f4011208"
}
}
Last updated
This article was last updated on April 23rd, 2019.You can also find the latest OpenAPI 2.0 specifications directly on the dedicated repository.
OpenAPI Specs repository