Skip to content

User Service

Cody Ley-Han edited this page Apr 5, 2018 · 6 revisions

Types

User

{
    "id": {
        "description": "Unique identifier",
        "type": "string"
    },
    "email": {
        "description": "user's email",
        "type": "string"
    },
    "profile_image": {
        "description": "profile image",
        "type": "string"
    },
    "auth_level": {
	"description": "the level at which the user is authorized",
	"type": "int"
    },
    "created_at": {
        "type": "string",
        "format": "date-time in RFC3339 format"
    },
    "updated_at": {
        "type": "string",
        "format": "date-time in RFC3339 format"
    }
}

Endpoints

List: GET /api/v1/users/

Authorization: Admin

Response

{
    "data": ["User"]
}

Show: GET /api/v1/users/:id

Response

{
    "data": "User"
}

Show current user info: GET /api/v1/users/@me

Get information about the current user

Response

{
    "data": "User"
}

Create: GET /api/v1/login

Request Query Param:

token: token provided by google oAuth

Response

{
    "data": "JWT token string"
}
Clone this wiki locally