Back to top

Accounts

Accounts management

Resource Group

Account sign in

Account sign in
POST/auth

Example URI

POST http://api.nearit.com//auth
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "1f34b03b-e0bb-449a-8775-72c4f54b79dc",
    "type": "authorization",
    "attributes": {
      "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjODdiNmZhZTEzY2M0MTVlYmU3YWYxOTFlZGRjY2NkZCIsImlhdCI6MTUxMTg1OTAxNSwiZXhwIjoxNTExOTQ1NDE1LCJkYXRhIjp7ImFjY291bnQiOnsiaWQiOiIyN2VlYmEwNi1jYTA0LTRiYjMtYWFlYy1jMzIxOTUyZjZkY2EiLCJyb2xlX2tleSI6ImFnZW50In19fQ.tnckrv-rdCEpK6Lbjhft5puCs4mCJEdToC8THm-ck0Q"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "token": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get account info

Get account info
GET/accounts/0b58118e-f78c-477a-bcec-f7a9b14ad782

Example URI

GET http://api.nearit.com//accounts/0b58118e-f78c-477a-bcec-f7a9b14ad782
URI Parameters
HideShow
account_id
string (required) Example: d467e069-82ea-4d4b-9a36-3bde87a05e23
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer nvqhlijcvdlulsfu3koq59m9xnhl9cmofegdwyfabzunssyvjd5emckefxfzya57
X-Near-App-Id: 10d92c92-3c7f-490f-bcba-379cca2d1b99
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "ab2c6502-f1cb-44a9-86c6-b8e6b1a85991",
    "type": "accounts",
    "attributes": {
      "email": "e2e@email.com",
      "name": "E2E Owner",
      "company_name": "E2E Tests",
      "role_key": "agent",
      "created_at": "2017-02-21T10:48:20.289Z",
      "updated_at": "2017-02-21T10:49:53.989Z",
      "last_login_date": "2017-11-28T08:50:15.445Z",
      "active": true,
      "avatar": null
    },
    "relationships": {
      "parent": {
        "data": null
      },
      "children": {
        "data": [
          {
            "id": "a6f556b0-f444-473d-8cdd-d7ebca3a56a8",
            "type": "accounts"
          }
        ]
      },
      "role": {
        "data": {
          "id": "0ee02846-f753-404f-8872-1f6e624b8667",
          "type": "roles"
        }
      },
      "apps": {
        "data": [
          {
            "id": "06d74577-1954-48de-8c30-3bd049640d54",
            "type": "apps"
          },
          {
            "id": "af2279b8-11a6-4060-93a8-a54d8e0784ad",
            "type": "apps"
          }
        ]
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "email": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "company_name": {
              "type": "string"
            },
            "role_key": {
              "type": "string"
            },
            "created_at": {
              "type": "string"
            },
            "updated_at": {
              "type": "string"
            },
            "last_login_date": {
              "type": "string"
            },
            "active": {
              "type": "boolean"
            },
            "avatar": {
              "type": [
                "object",
                "null"
              ],
              "properties": {}
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "parent": {
              "type": "object",
              "properties": {
                "data": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {}
                }
              }
            },
            "children": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "array"
                }
              }
            },
            "role": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "apps": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "array"
                }
              }
            }
          }
        }
      }
    }
  }
}

Generated by aglio on 09 Jan 2018