User

GET user/attributes

Return eContext user information including tier depth visibility and user roles.

Example Request

GET Response

{
    "econtext": {
        "user": {
            "attributes": {
        "account_id": "BJHba7T1c7JmUrMOAwDIp",
                "username": "31bc9229f61ebfa4782036bda",
                "group": "regular",
                "tier_depth": 4
            }
        },
        "signature": {
            "resource": "GET /categories/map/:keyword",
            "status": "200 OK - successful",
            "client_ip": "127.0.0.1"
        }
    }
}

GET user/usage

Return API usage for the current billing cycle.

Example Request

GET Request

curl -X GET -u username:password https://api.econtext.com/v2/user/usage

GET Response

{
  "econtext": {
    "user": {
      "end_date": "2018-01-01",
      "start_date": "2018-01-31",
      "total_usage": 495,
      "usage": {
        "2li2l3ij21lijzzea23ijadf2": {
          "2016-07-05": {
            "api.classify.social": 45,
            "api.categories.map": 16
          },
          "2016-07-06": {
            "api.classify.social": 306,
            "api.classify.url": 9
          },
          "2016-07-07": {
            "api.classify.url": 21,
            "api.classify.social": 50,
            "api.categories.search": 1
          },
          "2016-07-08": {
            "api.classify.social": 43,
            "api.classify.keywords": 3,
            "api.classify.url": 1
          }
        }
      }
    },
    "signature": {
      "resource": "GET /user/usage",
      "status": "200 OK - successful",
      "client_ip": "127.0.0.1"
    }
  }
}