RCAdmin API: Agent-Activity

Paulo Bernardo Atualizado por Paulo Bernardo

HOST: rcadmin.ilhasoft.dev

Endpoints

POST: /api/agent_activity/

Retrieves the Agent activity information.

  • Headers:
    • Authorization: <Token>
      • Token will be provided individually for now
  • Body format: JSON
    • Available fields for query filters are:
      {
      "initial_date": "number",
      "final_date": "number",
      "user": "string",
      "department": "string"
      }
    • At least the field "department" or "user" must be provided.
    • The "initial_date" and "final_date" fields are integers representing the day, the format is: YYYYMMDD
    • If both "user" and "department" are provided, the response "rooms_closed" value will be according to that department only.
    • Example:
      Filter for all activity after 12/03/2020 (December 3) for the department with id "XXX"
      {
      "initial_date": 20201203,
      "department": "XXX"
      }
  • Response format: JSON
    • data: Array containing the results from the database query
  • Response Status:
    • 200: If success
    • 204: If success but query result was empty
    • 401: If Invalid authorization Token or misconfigured mongo database name
  • Example Result:
{
"data": [
{
"date": 20201203,
"session_id": "F9Wov6MeMMRJ2S9wm",
"user_id": "R9tthgcZqQsdQvSLS",
"username": "john.doe",
"departments": [
{
"department_id": "K6Rh6vih2edM9FmaT",
"departement_name": "Administration"
}
],
"session_start": "2020-12-03T19:34:50.055000",
"session_end": "2020-12-03T19:42:26.519000",
"rooms_closed": 2
},
{
"date": 20201204,
"session_id": "B9Wov6MeMMRJ2S9wm",
"user_id": "K9FthUcZ5QkdxvGLT",
"username": "foo.bar",
"departments": [
{
"department_id": "K6Rh6vih2edM9FmaT",
"departement_name": "Administration"
}
],
"session_start": "2020-12-04T20:02:52.919000",
"session_end": "2020-12-04T20:50:24.130000",
"rooms_closed": 7
},
]
}

Como a gente se saiu?

Introdução ao U-Partners

Contato