Skip to content

Latest commit

 

History

History
165 lines (111 loc) · 4.26 KB

CallApi.md

File metadata and controls

165 lines (111 loc) · 4.26 KB

FnJs.CallApi

All URIs are relative to https://127.0.0.1:8080/v2

Method HTTP request Description
fnsFnIDCallsCallIDGet GET /fns/{fnID}/calls/{callID} Get call information
fnsFnIDCallsGet GET /fns/{fnID}/calls Get a fns calls.
getCallLogs GET /fns/{fnID}/calls/{callID}/log Get logs for a call.

fnsFnIDCallsCallIDGet

Call fnsFnIDCallsCallIDGet(fnID, callID)

Get call information

Get call information

Example

var FnJs = require('fn_js');

var apiInstance = new FnJs.CallApi();

var fnID = "fnID_example"; // String | Opaque, unique Function ID.

var callID = "callID_example"; // String | Opaque, unique Call ID.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.fnsFnIDCallsCallIDGet(fnID, callID, callback);

Parameters

Name Type Description Notes
fnID String Opaque, unique Function ID.
callID String Opaque, unique Call ID.

Return type

Call

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

fnsFnIDCallsGet

CallList fnsFnIDCallsGet(fnID, , opts)

Get a fns calls.

Get a functions calls, results returned in created_at, descending order (newest first).

Example

var FnJs = require('fn_js');

var apiInstance = new FnJs.CallApi();

var fnID = "fnID_example"; // String | Opaque, unique Function ID.

var opts = { 
  'cursor': "cursor_example", // String | Cursor from previous response.next_cursor to begin results after, if any.
  'perPage': 56, // Number | Number of results to return, defaults to 30. Max of 100.
  'fromTime': 56, // Number | Unix timestamp in seconds, of call.created_at to begin the results at, default 0.
  'toTime': 56 // Number | Unix timestamp in seconds, of call.created_at to end the results at, defaults to latest.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.fnsFnIDCallsGet(fnID, , opts, callback);

Parameters

Name Type Description Notes
fnID String Opaque, unique Function ID.
cursor String Cursor from previous response.next_cursor to begin results after, if any. [optional]
perPage Number Number of results to return, defaults to 30. Max of 100. [optional]
fromTime Number Unix timestamp in seconds, of call.created_at to begin the results at, default 0. [optional]
toTime Number Unix timestamp in seconds, of call.created_at to end the results at, defaults to latest. [optional]

Return type

CallList

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getCallLogs

Log getCallLogs(fnID, callID)

Get logs for a call.

Get logs for a call.

Example

var FnJs = require('fn_js');

var apiInstance = new FnJs.CallApi();

var fnID = "fnID_example"; // String | Opaque, unique Function ID.

var callID = "callID_example"; // String | Opaque, unique Call ID.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getCallLogs(fnID, callID, callback);

Parameters

Name Type Description Notes
fnID String Opaque, unique Function ID.
callID String Opaque, unique Call ID.

Return type

Log

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json