Skip to content
This repository was archived by the owner on Aug 4, 2019. It is now read-only.

apiv1 sessions post

Travis CI edited this page Jan 17, 2018 · 17 revisions
Parameter Value
Author TestEngine
Version 0.2.0-dev.0
Status Implemented

sessions

POST /apiv1/sessions

Role: Admin|Visitor

Status:

400 Invalid username or password

Response Headers:

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

Response Body:

{"message":"Bad Request","description":"Bad request syntax or unsupported method"}

POST /apiv1/sessions

Role: Admin|Visitor

Request: Form

Parameter Optional Type Default Example
username False str admin
password False str 123456

Status:

200 OK

Response Headers:

Content-Type: application/json; charset=utf-8
X-Identity: 1
Set-Cookie: refresh-token=eyJhbGciOiJIUzI1NiIsImlhdCI6MTUxNjE5MDIxNCwiZXhwIjoxNTE4ODY4NjE0fQ.eyJpZCI6MX0._jetGco2YDB62BQK3WPHqltkBippk_7E6P94TRCGGgk; Max-Age=2678400; Secure
Content-Length: 257

Response Body:

{
    "token":"eyJhbGciOiJIUzI1NiIsImlhdCI6MTUxNjE5MDIxNCwiZXhwIjoxNTE2Mjc2NjE0fQ.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGVzIjpbImFkbWluIl0sInNlc3Npb25JZCI6IjJiNTU2MWVhLWRjM2EtNDMzZS1iOTIxLWFhOWU4N2FkZWQwNCJ9.a1gSbl7pkKQMx3qkxOAMXz4cboE3vtChHgDhmlnagjE"
}

Clone this wiki locally