All URIs are relative to https://127.0.0.1:8080/v2
Method | HTTP request | Description |
---|---|---|
createFn | POST /fns | Create A New Function |
deleteFn | DELETE /fns/{fnID} | Delete A Function |
getFn | GET /fns/{fnID} | Get Definition Of A Function |
listFns | GET /fns | Get A list Of Functions Within An Application |
updateFn | PUT /fns/{fnID} | Update A Function |
Fn createFn(body)
Create A New Function
Creates a new Function, returning the complete entity.
var FnJs = require('fn_js');
var apiInstance = new FnJs.FnsApi();
var body = new FnJs.Fn(); // Fn | Function data to insert.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createFn(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Fn | Function data to insert. |
No authorization required
- Content-Type: application/json
- Accept: application/json
deleteFn(fnID, )
Delete A Function
Delete the specified Function.
var FnJs = require('fn_js');
var apiInstance = new FnJs.FnsApi();
var fnID = "fnID_example"; // String | Opaque, unique Function ID.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteFn(fnID, , callback);
Name | Type | Description | Notes |
---|---|---|---|
fnID | String | Opaque, unique Function ID. |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
Fn getFn(fnID, )
Get Definition Of A Function
Gets the definition for the Function with the specified ID.
var FnJs = require('fn_js');
var apiInstance = new FnJs.FnsApi();
var fnID = "fnID_example"; // String | Opaque, unique Function ID.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFn(fnID, , callback);
Name | Type | Description | Notes |
---|---|---|---|
fnID | String | Opaque, unique Function ID. |
No authorization required
- Content-Type: application/json
- Accept: application/json
FnList listFns(opts)
Get A list Of Functions Within An Application
Get a filtered list of Functions for an Application, in alphabetical order.
var FnJs = require('fn_js');
var apiInstance = new FnJs.FnsApi();
var opts = {
'appId': "appId_example", // String | Application ID.
'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.
'name': "name_example" // String | Function name to filter by
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.listFns(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
appId | String | Application ID. | [optional] |
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] |
name | String | Function name to filter by | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Fn updateFn(fnID, body)
Update A Function
Updates a Function via merging the provided values.
var FnJs = require('fn_js');
var apiInstance = new FnJs.FnsApi();
var fnID = "fnID_example"; // String | Opaque, unique Function ID.
var body = new FnJs.Fn(); // Fn | Function data to merge with current values.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.updateFn(fnID, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
fnID | String | Opaque, unique Function ID. | |
body | Fn | Function data to merge with current values. |
No authorization required
- Content-Type: application/json
- Accept: application/json