Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.17 KB | None | 0 0
  1. List calls:
  2.  
  3. Url: /alerts/response/
  4. Method: GET
  5. Input Object:
  6.   startTime: int, epoch
  7.   endTime: int, epoch
  8.  
  9. Response:
  10. {
  11.   "data": {
  12.     "alert_responses": [
  13.       {
  14.         "id": 1,
  15.         "datasource_id": 227,
  16.         "source_type": "team_call_button",
  17.         "source_id": 2,
  18.         "acked_by": null,
  19.         "acked_at": null,
  20.         "resolved_by": null,
  21.         "resolved_at": null,
  22.         "metadata": {},
  23.         "timed_out": false,
  24.         "created_at": 1579713151,
  25.         "updated_at": 1579713151
  26.       },
  27.       {
  28.         "id": 2,
  29.         "datasource_id": 227,
  30.         "source_type": "team_call_button",
  31.         "source_id": 3,
  32.         "acked_by": 617,
  33.         "acked_at": 1579716792,
  34.         "resolved_by": null,
  35.         "resolved_at": null,
  36.         "metadata": {},
  37.         "timed_out": false,
  38.         "created_at": 1579713216,
  39.         "updated_at": 1579716792
  40.       },
  41.     ]
  42.   }
  43. }
  44.  
  45.  
  46. Create Call:
  47.  
  48. Url: /alerts/response/
  49. Method: POST
  50. Input Object:
  51. {
  52.   "datasource_id": 227,
  53.   "source_type": "team_call_button", // won't change for this
  54.   "source_id": <team_id>,
  55.   "metadata": {} //optional, you should see it used sometimes already
  56. }
  57.  
  58. Response:
  59. {
  60.   "data": {
  61.     "alert_response": {
  62.       "id": 2,
  63.       "datasource_id": 227,
  64.       "source_type": "team_call_button",
  65.       "source_id": 3,
  66.       "acked_by": 617,
  67.       "acked_at": 1579716792,
  68.       "resolved_by": null,
  69.       "resolved_at": null,
  70.       "metadata": {},
  71.       "timed_out": false,
  72.       "created_at": 1579713216,
  73.       "updated_at": 1579716792
  74.     }
  75.   }
  76. }
  77.  
  78.  
  79. Resolve Call (update existing):
  80.  
  81. Url: /alerts/response/
  82. Method: POST
  83. Input Object:
  84. {
  85.   "id": <alert response id>,
  86.   "action_type": "resolution", // won't change for now
  87.   "user_id": <int, user id>
  88. }
  89.  
  90. Response:
  91. {
  92.   "data": {
  93.     "alert_response": {
  94.       "id": 2,
  95.       "datasource_id": 227,
  96.       "source_type": "team_call_button",
  97.       "source_id": 3,
  98.       "acked_by": 617,
  99.       "acked_at": 1579716792,
  100.       "resolved_by": null,
  101.       "resolved_at": null,
  102.       "metadata": {},
  103.       "timed_out": false,
  104.       "created_at": 1579713216,
  105.       "updated_at": 1579716792
  106.     }
  107.   }
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement