Who Am I

POST /v1/services/whoami

Initiates user cookie session.

Request Headers:
 
Request JSON Object:
 
  • email (string) – User email
  • password (string) – User password
Response Headers:
 
Response JSON Object:
 
  • created_at (datetime) – User creation timestamp
  • email (string) – User email address
  • first_name (string) – User first name
  • id (string) – User unique ID
  • last_name – User last name
  • partners (array) – List of the Partners which users may operate with
  • tags (array) – List of the associated tags
  • updated_at (datetime) – User update timestamp
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:
 
  • Acceptapplication/json
  • Cookie – Authorization token
Response Headers:
 
Response JSON Object:
 
  • created_at (datetime) – User creation timestamp
  • email (string) – User email address
  • first_name (string) – User first name
  • id (string) – User unique ID
  • last_name – User last name
  • partners (array) – List of the Partners which users may operate with
  • tags (array) – List of the associated tags
  • updated_at (datetime) – User update timestamp
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:
 
  • Acceptapplication/json
  • Cookie – Authorization token
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

{}

Предыдущий раздел

Simple service for lazy integration

Следующий раздел

Glossary

Эта страница