IronAuth API Reference

IronAuth API used to authenticate users that hit the IronMQ API.

Objects (json)

Not all fields are required.
Token consists of the following properties:

"token": {
  "_id"
  "user_id"
  "type"
  "name"
  "token"
  "admin"
}

Project consists of the following properties:

"project": {
  "id"
  "user_id"
  "name"
  "type"
  "partner"
  "status"
  "total_duration"
  "max_schedules"
  "schedules_count"
  "task_count"
  "hourly_task\_count"
  "hourly_time"
  "flags"
  "shared_with"
}

User consists of the following properties:

"user": {
  "user_id"
  "email"
  "password"
  "tokens"
  "status"
  "plan_worker"
  "flags"
}

Endpoints

Authentication

HEADER: Authorization alternatively (add query string of oauth)

  • project_id: Request Query String

GET /1/authentication

Response: 200 or 403

{}

Login (for HUD)

HEADER: application/json (no token/oauth)

POST /1/authentication

Request:

request: {
  email: <email>,
  password: <password>
}

Response:

response: {
  user object
}

All other endpoints require Authorization HEADER

Tokens

POST /1/tokens

request: {
  <token>
}
response: {
  <token>
}

DELETE /1/tokens/{token_id}

response: {
  msg: success/fail
}

Users

POST /1/users ```js request: { email: password: } response: {

} ``` GET `/1/users` #### URL query params: * **previous**: to paginate, the id of the last user from the last page; if not specified, will start from beginning. * **per_page**: size of the list to return. Default: 30, max: 100. ```js response: { "users": [ , , ... ] } ``` GET `/1/users/{user_id_or_email}` ```js response: { } ``` PATCH `/1/users/{user_id_or_email}` ```js request: { email: password: } response: { } ``` DELETE `/1/users/{user_id_or_email}` ```js response: { msg: "success/fail" } ``` ## Projects POST `/1/projects` ```js request: { name: } ``` ```js response: { } ``` GET `/1/projects/{project_id}` ```js response: { } ``` DELETE `/1/projects/{project_id}` ```js response: { msg: success/fail } ``` PATCH `/1/projects/{project_id}/share` PATCH `/1/projects/{project_id}/unshare` ```js request: { []user_id } ```