Skip to content

Author API

Fraser Redford edited this page Apr 15, 2021 · 21 revisions

GET author/<str:id>/

This will retrieve the author information for a given author.

Request Header

Basic authorization (base64 encoded username:password):
--header "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="

or token authorization is required:
--header "Authorization: Token 9d9ed917fe1ead2d1e27ac7dc233348ed2e3d4c0"

Request Requirements

No body Required

Sample Response

{
    "type": "author",
    "id": "https://team6-project-socialdistrib.herokuapp.com/author/21d2d52bf3c34b84a45951d53b472a08",
    "host": "https://team6-project-socialdistrib.herokuapp.com/",
    "displayName": "Jeff",
    "url": "https://team6-project-socialdistrib.herokuapp.com/author/21d2d52bf3c34b84a45951d53b472a08",
    "github": "https://github.com/Jeff"
}

Response Codes

  • 200 OK upon a successful retrieval of a profile
  • 400 BAD REQUEST if bad information is passed in the request
  • 403 FORBIDDEN if an user is not authenticated

Clone this wiki locally