General Bots API (1.0)
Download OpenAPI specification:Download
General Bots API description in Swagger format
Method getFileContents
Retrives the content of a given URL.
Request Body schema: application/jsonrequired
pid | any |
url | any |
headers | any |
Responses
Request samples
- Payload
{- "pid": null,
- "url": null,
- "headers": null
}
Response samples
- 200
{- "headers": {
- "append": { },
- "delete": { },
- "get": { },
- "getSetCookie": { },
- "has": { },
- "set": { },
- "forEach": { },
- "entries": { },
- "keys": { },
- "values": { },
- "__@iterator@433": { }
}, - "ok": true,
- "redirected": true,
- "status": 0,
- "statusText": "string",
- "type": "default",
- "url": "string",
- "clone": { },
- "body": {
- "locked": true,
- "cancel": { },
- "getReader": { },
- "pipeThrough": { },
- "pipeTo": { },
- "tee": { }
}, - "bodyUsed": true,
- "arrayBuffer": { },
- "blob": { },
- "formData": { },
- "json": { },
- "text": { }
}
Method getStock
Retrives stock inforation for a given symbol.
Request Body schema: application/jsonrequired
pid | any |
symbol | any |
Responses
Request samples
- Payload
{- "pid": null,
- "symbol": null
}
Response samples
- 200
{- "headers": {
- "append": { },
- "delete": { },
- "get": { },
- "getSetCookie": { },
- "has": { },
- "set": { },
- "forEach": { },
- "entries": { },
- "keys": { },
- "values": { },
- "__@iterator@433": { }
}, - "ok": true,
- "redirected": true,
- "status": 0,
- "statusText": "string",
- "type": "default",
- "url": "string",
- "clone": { },
- "body": {
- "locked": true,
- "cancel": { },
- "getReader": { },
- "pipeThrough": { },
- "pipeTo": { },
- "tee": { }
}, - "bodyUsed": true,
- "arrayBuffer": { },
- "blob": { },
- "formData": { },
- "json": { },
- "text": { }
}
Method sendSmsTo
Sends a SMS message to the mobile number specified.
@example SEND SMS TO "+199988887777", "Message text here"
Request Body schema: application/jsonrequired
pid | any |
mobile | any |
message | any |
Responses
Request samples
- Payload
{- "pid": null,
- "mobile": null,
- "message": null
}
Method set
- Defines a cell value in the tabular file.
- Defines an element text on HTML page.
@example SET "file.xlsx", "A2", 4500
@example SET page, "elementHTMLSelector", "text"
Request Body schema: application/jsonrequired
pid | any |
handle | any |
file | any |
address | any |
value | any |
name | any |
Responses
Request samples
- Payload
{- "pid": null,
- "handle": null,
- "file": null,
- "address": null,
- "value": null,
- "name": null
}
Response samples
- 200
null
Method saveFile
Saves the content of variable into the file in .gbdata default folder.
@exaple SAVE variable as "my.txt"
Request Body schema: application/jsonrequired
pid | any |
file | any |
data | any |
Responses
Request samples
- Payload
{- "pid": null,
- "file": null,
- "data": null
}
Response samples
- 200
null
Method saveToStorage
Saves variables to storage, not a worksheet.
@example SAVE "Billing", columnName1, columnName2
Request Body schema: application/jsonrequired
pid | any |
table | any |
fieldsValues | any |
fieldsNames | any |
Responses
Request samples
- Payload
{- "pid": null,
- "table": null,
- "fieldsValues": null,
- "fieldsNames": null
}
Response samples
- 200
null
Method saveToStorageWithJSON
Request Body schema: application/jsonrequired
pid | any |
table | any |
fieldsValues | any |
fieldsNames | any |
Responses
Request samples
- Payload
{- "pid": null,
- "table": null,
- "fieldsValues": null,
- "fieldsNames": null
}
Response samples
- 200
null
Method save
Saves the content of several variables to a new row in a tabular file.
@example SAVE "customers.xlsx", name, email, phone, address, city, state, country
Request Body schema: application/jsonrequired
pid | any |
file | any |
args | any |
Responses
Request samples
- Payload
{- "pid": null,
- "file": null,
- "args": null
}
Response samples
- 200
null
Method getHttp
Retrives the content of a cell in a tabular file.
@example value = GET "file.xlsx", "A2"
Request Body schema: application/jsonrequired
pid | any |
file | any |
addressOrHeaders | any |
httpUsername | any |
httpPs | any |
qs | any |
streaming | any |
Responses
Request samples
- Payload
{- "pid": null,
- "file": null,
- "addressOrHeaders": null,
- "httpUsername": null,
- "httpPs": null,
- "qs": null,
- "streaming": null
}
Response samples
- 200
null
Method find
Finds a value or multi-value results in a tabular file.
@example
rows = FIND "file.xlsx", "A2=active", "A2 < 12/06/2010 15:00" i = 1 do while i <= ubound(row) row = rows[i] send sms to "+" + row.mobile, "Hello " + row.name + "! " loop @see NPM package data-forge
Request Body schema: application/jsonrequired
pid | any |
handle | any |
args | any |
Responses
Request samples
- Payload
{- "pid": null,
- "handle": null,
- "args": null
}
Response samples
- 200
null
Method createFolder
Creates a folder in the bot instance drive.
@example folder = CREATE FOLDER "notes\01"
Request Body schema: application/jsonrequired
pid | any |
name | any |
Responses
Request samples
- Payload
{- "pid": null,
- "name": null
}
Response samples
- 200
null
Method copyFile
Copies a drive file from a place to another .
@example
COPY "template.xlsx", "reports" + customerName + "\final.xlsx"
Request Body schema: application/jsonrequired
pid | any |
src | any |
dest | any |
Responses
Request samples
- Payload
{- "pid": null,
- "src": null,
- "dest": null
}
Response samples
- 200
null
Method convert
Converts a drive file from a place to another .
Supported sources csv, doc, docx, odp, ods, odt, pot, potm, potx, pps, ppsx, ppsxm, ppt, pptm, pptx, rtf, xls, xlsx
@example
CONVERT "customers.xlsx" TO "reports" + today + ".pdf"
Request Body schema: application/jsonrequired
pid | any |
src | any |
dest | any |
Responses
Request samples
- Payload
{- "pid": null,
- "src": null,
- "dest": null
}
Method getByHttp
Calls any REST API by using GET HTTP method.
@example user = get "http://server/users/1"
Request Body schema: application/jsonrequired
pid | any |
url | any |
headers | any |
username | any |
ps | any |
qs | any |
Responses
Request samples
- Payload
{- "pid": null,
- "url": null,
- "headers": null,
- "username": null,
- "ps": null,
- "qs": null
}
Response samples
- 200
null
Method putByHttp
Calls any REST API by using POST HTTP method.
@example
user = put "http://server/path", "data" talk "The updated user area is" + area
Request Body schema: application/jsonrequired
pid | any |
url | any |
data | any |
headers | any |
Responses
Request samples
- Payload
{- "pid": null,
- "url": null,
- "data": null,
- "headers": null
}
Response samples
- 200
null
Method postByHttp
Calls any REST API by using POST HTTP method.
@example
user = post "http://server/path", "data" talk "The updated user area is" + area
Request Body schema: application/jsonrequired
pid | any |
url | any |
data | any |
headers | any |
Responses
Request samples
- Payload
{- "pid": null,
- "url": null,
- "data": null,
- "headers": null
}
Response samples
- 200
null
Method fill
Fills a .docx or .pptx with template data.
doc = FILL "templates/template.docx", data
Request Body schema: application/jsonrequired
pid | any |
templateName | any |
data | any |
Responses
Request samples
- Payload
{- "pid": null,
- "templateName": null,
- "data": null
}
Response samples
- 200
{ }
Method merge
Merges a multi-value with a tabular file using BY field as key.
@example
data = FIND first.xlsx MERGE "second.xlsx" WITH data BY customer_id
Request Body schema: application/jsonrequired
pid | any |
file | any |
data | any |
key1 | any |
key2 | any |
Responses
Request samples
- Payload
{- "pid": null,
- "file": null,
- "data": null,
- "key1": null,
- "key2": null
}
Response samples
- 200
null
Method pay
qrcode = PAY "10000", "Name", 100 SEND FILE qrcode
Request Body schema: application/jsonrequired
pid | any |
orderId | any |
customerName | any |
ammount | any |
Responses
Request samples
- Payload
{- "pid": null,
- "orderId": null,
- "customerName": null,
- "ammount": null
}
Response samples
- 200
{ }
Method dirFolder
Loads all para from tabular file Config.xlsx.
Request Body schema: application/jsonrequired
pid | any |
remotePath | any |
baseUrl | any |
client | any |
array | any |
Responses
Request samples
- Payload
{- "pid": null,
- "remotePath": null,
- "baseUrl": null,
- "client": null,
- "array": null
}
Response samples
- 200
null
Method chart
Data = [10,20,30] Legends = "Steve;Yui;Carlos" img = CHART "pie",data,legends
https://c3js.org/examples.html https://c3js.org/samples/timeseries.html (used here)
@param data @param legends @see https://www.npmjs.com/package/plot
Request Body schema: application/jsonrequired
pid | any |
type | any |
data | any |
legends | any |
transpose | any |
Responses
Request samples
- Payload
{- "pid": null,
- "type": null,
- "data": null,
- "legends": null,
- "transpose": null
}
Response samples
- 200
"string"
Method createDeal
Creates a new deal.
@example CREATE DEAL dealname,contato,empresa,amount
Request Body schema: application/jsonrequired
pid | any |
dealName | any |
contact | any |
company | any |
amount | any |
Responses
Request samples
- Payload
{- "pid": null,
- "dealName": null,
- "contact": null,
- "company": null,
- "amount": null
}
Method getWeekFromDate
Returns specified date week day in format 'Mon'.
@example day = WEEKDAY (date)
Request Body schema: application/jsonrequired
pid | any |
date | any |
Responses
Request samples
- Payload
{- "pid": null,
- "date": null
}
Response samples
- 200
null
Method getDateDiff
Returns an object ready to get information about difference in several ways like years,months or days.
@example days = DATEDIFF date1,date2,mode
Request Body schema: application/jsonrequired
pid | any |
date1 | any |
date2 | any |
mode | any |
Responses
Request samples
- Payload
{- "pid": null,
- "date1": null,
- "date2": null,
- "mode": null
}
Response samples
- 200
null
Method dateAdd
Returns specified date week day in format 'Mon'.
@example DATEADD date,"minute",60
Request Body schema: application/jsonrequired
pid | any |
date | any |
mode | any |
units | any |
Responses
Request samples
- Payload
{- "pid": null,
- "date": null,
- "mode": null,
- "units": null
}
Response samples
- 200
"2019-08-24T14:15:22Z"
Method sendFileTo
Sends a file to a given mobile.
@example SEND FILE TO "+199988887777","image.jpg",caption
Request Body schema: application/jsonrequired
pid | any |
mobile | any |
filename | any |
caption | any |
Responses
Request samples
- Payload
{- "pid": null,
- "mobile": null,
- "filename": null,
- "caption": null
}
Method getContinuationToken
Returns current if any continuation token for paginated HTTP requests.
@example CONTINUATION TOKEN
Request Body schema: application/jsonrequired
pid | any |
Responses
Request samples
- Payload
{- "pid": null
}
Response samples
- 200
null
Method openPage
Returns the page object.
@example OPEN "https://wikipedia.org"
Request Body schema: application/jsonrequired
pid | any |
handle | any |
sessionKind | any |
sessionName | any |
url | any |
username | any |
password | any |
Responses
Request samples
- Payload
{- "pid": null,
- "handle": null,
- "sessionKind": null,
- "sessionName": null,
- "url": null,
- "username": null,
- "password": null
}
Response samples
- 200
null
Method getBySelector
Find element on page DOM.
@example GET "selector"
Request Body schema: application/jsonrequired
handle | any |
selector | any |
pid | any |
Responses
Request samples
- Payload
{- "handle": null,
- "selector": null,
- "pid": null
}
Response samples
- 200
null
Method getByFrame
Find element on page DOM.
@example GET page,"frameSelector,"elementSelector"
Request Body schema: application/jsonrequired
handle | any |
frame | any |
selector | any |
Responses
Request samples
- Payload
{- "handle": null,
- "frame": null,
- "selector": null
}
Response samples
- 200
null
Method click
Clicks on an element in a web page.
@example CLICK "#idElement"
Request Body schema: application/jsonrequired
pid | any |
handle | any |
frameOrSelector | any |
selector | any |
Responses
Request samples
- Payload
{- "pid": null,
- "handle": null,
- "frameOrSelector": null,
- "selector": null
}
Method screenshot
Returns the screenshot of page or element
@example file = SCREENSHOT "#selector"
Request Body schema: application/jsonrequired
pid | any |
handle | any |
selector | any |
Responses
Request samples
- Payload
{- "pid": null,
- "handle": null,
- "selector": null
}
Response samples
- 200
{ }
Method download
Performs the download to the .gbdrive Download folder.
@example file = DOWNLOAD element, folder
Request Body schema: application/jsonrequired
pid | any |
handle | any |
selector | any |
folder | any |
Responses
Request samples
- Payload
{- "pid": null,
- "handle": null,
- "selector": null,
- "folder": null
}
Response samples
- 200
null