Categories API

for owner

GET /api/v1/categories

Parameters

Name Description
id id
name Name
description a description

Request

Headers

Accept: application/json
X-Api-Token: Hs5i3yLoata2D89KiPTzUnSHeHFA9sgjdw
X-Api-Email: user-622@example.com

Route

GET /api/v1/categories?id=14&name=Name&description=test+headline

Query Parameters

id: 14
name: Name
description: test headline

cURL

curl "http://localhost:3000/api/v1/categories?id=14&name=Name&description=test+headline" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: Hs5i3yLoata2D89KiPTzUnSHeHFA9sgjdw" \
	-H "X-Api-Email: user-622@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 324

Status

200 OK

Body

{
  "categories": [
    {
      "created_at": "2019-10-31T22:06:11Z",
      "name": "Category Name 11",
      "description": null,
      "is_published": true,
      "id": 14,
      "meta": {
        "class": "category",
        "url": "/categories/14",
        "name": "Category Name 11",
        "description": null,
        "image_url": null
      }
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "from": 1,
    "to": 1,
    "per": 25,
    "number_of_pages": 1,
    "query": {
    }
  }
}