POST
/v1/services/whoami
¶Initiates user cookie session.
Request Headers: | |
---|---|
|
|
Request JSON Object: | |
|
|
Response Headers: | |
|
|
Response JSON Object: | |
|
|
Status Codes: |
|
Request:
POST /v1/services/whoami HTTP/1.1
Accept: application/json
Content-Length: 49
Content-Type: application/json; charset=utf-8
Host: ticketscloud.org
{
"email": "user@domain.tld",
"password": "s3cr1t"
}
Response:
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Server: nginx
Set-Cookie: auth_tkt="FiYmQwNmIyMWNiMjU0!userid_type:b64unicode"; Path=/
Set-Cookie: auth_tkt="FiYmQwNmIyMWNiMjU0!userid_type:b64unicode"; Domain=ticketscloud.org; Path=/
Set-Cookie: auth_tkt="FiYmQwNmIyMWNiMjU0!userid_type:b64unicode"; Domain=.ticketscloud.org; Path=/
Transfer-Encoding: chunked
{
"created_at": "2014-07-31T09:51:33.363000+00:00",
"email": "user@domain.tld",
"first_name": null,
"id": "53da11a537abbd06b21cb254",
"last_name": null,
"partners": [],
"tags": [],
"updated_at": "2014-07-31T09:51:33.363000+00:00"
}
GET
/v1/services/whoami
¶Returns information about authenticated user.
Request Headers: | |
---|---|
Response Headers: | |
|
|
Response JSON Object: | |
|
|
Status Codes: |
|
Request:
GET /v1/services/whoami HTTP/1.1
Accept: application/json
Cookie: auth_tkt="FiYmQwNmIyMWNiMjU0!userid_type:b64unicode"; Domain=ticketscloud.org; Path=/
Host: ticketscloud.org
Response:
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Server: nginx
Transfer-Encoding: chunked
{
"created_at": "2014-07-31T09:51:33.363000+00:00",
"email": "user@domain.tld",
"first_name": null,
"id": "53da11a537abbd06b21cb254",
"last_name": null,
"partners": [],
"tags": [],
"updated_at": "2014-07-31T09:51:33.363000+00:00"
}
DELETE
/v1/services/whoami
¶Closes user cookie session.
Request Headers: | |
---|---|
Response Headers: | |
|
|
Status Codes: |
|
Request:
DELETE /v1/services/whoami HTTP/1.1
Accept: application/json
Cookie: auth_tkt="FiYmQwNmIyMWNiMjU0!userid_type:b64unicode"; Domain=ticketscloud.org; Path=/
Host: ticketscloud.org
Response:
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Server: nginx
Set-Cookie: auth_tkt=; Domain=.ticketscloud.org; Max-Age=0; Path=/; expires=Wed, 31-Dec-97 23:59:59 GMT
Transfer-Encoding: chunked
{}