Use this API to create a new Function for the FIU. The FIU is expected to poll the getFunctionDetails API to check status of the Function before requesting a new Job.
curl --location --request POST '/vdr/createFunction'
--form 'function=@/path/to/file'
--form 'fiuId=FIU_ID'
--form 'jsonSchema={\"jsonSchema\": \"\"}'
--form 'handler'= 'handler name"'
--form 'runtime'= "envrionment name" //e.g python 3,java 8
--form 'functionName'= 'function Name'
--form 'functionDescription': 'function Description'
var request = require('request');
var fs = require('fs');
var options = {
'method': 'POST',
'url': '/vdr/createFunction',
'headers': {
},
formData: {
'function': {
'value': fs.createReadStream('/path/to/file'),
'options': {
'filename': 'filename'
'contentType': null
}
},
'fiuId': 'FIU_ID',
'jsonSchema': '{"jsonSchema": ""}',
'handler': 'handler name"',
'runtime': "envrionment name" //e.g python 3,java 8,
'functionName': 'function Name',
'functionDescription': 'function Description'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Status | 202 Accepted |
---|---|
|
Use this API to get a list of all the Functions created by the FIU.
curl -X GET "/vdr/getFunctionsByFiuId?fiuId=FIU_ID"
var request = require('request');
var options = {
'method': 'GET',
'url': '/vdr/getFunctionsByFiuId?fiuId=FIU_ID',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Status | 200 OK |
---|---|
|
Use this API to get details of a particular Function given an ID of the Function.
curl -X GET "/vdr/getFunctionDetails?functionId=FUNCTION_ID"
var request = require('request');
var options = {
'method': 'GET',
'url': '/vdr/getFunctionDetails?functionId=FUNCTION_ID',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Status | 200 OK |
---|---|
|
Use this API to update existing Function for the FIU.
curl --location --request PUT '/vdr/updateFunction'
--form 'function=@/path/to/file'
--form 'fiuId=FIU_ID'
--form 'jsonSchema={\"jsonSchema\": \"\"}'
--form 'handler'= 'handler name"'
--form 'runtime'= "envrionment name" //e.g python 3,java 8
--form 'functionName'= 'function Name'
--form 'functionDescription': 'function Description'
var request = require('request');
var fs = require('fs');
var options = {
'method': 'PUT',
'url': '/vdr/updateFunction',
'headers': {
},
formData: {
'function': {
'value': fs.createReadStream('/path/to/file'),
'options': {
'filename': 'filename'
'contentType': null
}
},
'fiuId': 'FIU_ID',
'jsonSchema': '{"jsonSchema": ""}',
'handler': 'handler name"',
'runtime': "envrionment name" //e.g python 3,java 8,
'functionName': 'function Name',
'functionDescription': 'function Description'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Status | 202 Accepted |
---|---|
|
Use this API to create a new Job for a particular Function for a particular user with a AA ID. The FIU is expected to poll the getFunctionDetails API to check status of the Function before requesting a new Job.
curl --location --request POST '/vdr/createJob'
--form 'fiuId=FIU_ID'
--form 'functionId=FUNCTION_ID'
--form 'aaId=AA_ID'
--form 'requestParams={\"aaId\": \"\"}'
var request = require('request');
var options = {
'method': 'POST',
'url': '/vdr/createJob',
'headers': {
},
formData: {
'function': {
'value': fs.createReadStream('/path/to/file'),
'options': {
'filename': 'filename'
'contentType': null
}
},
'fiuId': 'FIU_ID',
'functionId=FUNCTION_ID',
'aaId=AA_ID',
'requestParams={\"aaId\": \"\"}'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Status | 202 Accepted |
---|---|
|
Use this API to get a list of all the Jobs requested by the FIU.
curl -X GET "/vdr/getJobsByFiuId?fiuId=FIU_ID"
var request = require('request');
var options = {
'method': 'GET',
'url': '/vdr/getJobsByFiuId?fiuId=FIU_ID',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Status | 200 OK |
---|---|
|
Use this API to get details of a particular Job given an ID of the Job.
curl -X GET "/vdr/getFunctionDetails?jobId=JOB_ID"
var request = require('request');
var options = {
'method': 'GET',
'url': '/vdr/getFunctionDetails?jobId=JOB_ID',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Status | 200 OK |
---|---|
|