User endpoints ============== .. _login-endpoint: .. http:post:: /api/user/login :synopsis: Endpoint for login and get a token :json string token: The access token :statuscode 400: The request was not well structured, some field missing :statuscode 401: The credentials doesnt match with any user **Example request** .. sourcecode:: http POST /api/user/login HTTP/1.1 { "email":"admin@mail.com", "password":"1234" } **Example request** .. sourcecode:: http HTTP/1.1 200 OK {"token":"abcabcabcabc"} .. http:post:: /api/user/logout :synopsis: By calling this endpoint the currently used token is not valid anymore :statuscode 200: Logout successful .. http:post:: /api/user/register :synopsis: Register a new user on the instance. This endpoint will work depending on your register policy. :json string email: User email :>json apiToken[] apiTokens: List of user API tokens :>json string apiToken.Name: Name of the API token :>json string apiToken.ExpiresOn: Expiration date :>json string apiToken.ReadOnly: Read only token .. http:post:: /api/user/tokens :synopsis: Create a API token :statuscode 201: Token crated successfully :statuscode 400: Mising parameters :