Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

weight - Used to indicate the position of the author.

Creating an Author

To create an author the following request must be made:

Code Block
End-point: /authors
Request Type: POST
Headers: 
{
  "Authorization": "Bearer <your token>",
  "Project": "<project domain>"
}
Request body:
{
  "name": "string", //mandatory
  "bio": "string",
  "active": true,
  "default": true,
  "avatar_url": "string"
}

Updating an Author

To update an author the following request must be made:

Code Block
End-point: /authors/<author id>
Request Type: PATCH
Headers: 
{
  "Authorization": "Bearer <your token>",
  "Project": "<project domain>"
}
Request body:
{
  "name": "string",
  "bio": "string",
  "active": true,
  "default": true,
  "avatar_url": "string"
}
 

Deleting an Author

To delete am author the following request must be made:

Code Block
End-point: /authors/<author id>
Request Type: DELETE
Headers: 
{
  "Authorization": "Bearer <your token>",
  "Project": "<project domain>"
}

Get list of Authors

To get a list authors the following request must be made:

Code Block
End-point: /authors
Request Type: GET
Headers: 
{
  "Authorization": "Bearer <your token>",
  "Project": "<project domain>"
}

The author listing endpoint supports pagination. There are additional parameters that can be used:

Parameters

  • limit

    • Description: Controls how many authors will be returned per page

    • Values:

      • Maximum value: 200

      • Default value: 20

    • Behaviour: Affects how many pages are generated.
      Example: If there are 60 authors and the limit is set to 10, this will generate 6 pages of authors.

    • Request:

      Code Block
      End-point: /authors?limit=10

       

  • page

    • Description: Controls which authors' page will be retrieved

    • Values:

    • Behaviours: Affected by the “limit“ parameter

    • Request

      • Without “limit“ parameter

        Code Block
        End-point: /authors?page=2
      • With “limit“ parameter

        Code Block
        End-point: /authors?limit=10&page=2