Basebear provides REST APIs that allow external applications to interface with Basebear database. Users can build applications in any programming language and connect to your data stored on Basebear.
Prerequisites
To use the Basebear API you need:
- An account Basebear.
- An API Key that you generate in your account page.
REST API
Error codes
View database
Url
https://api.basebear.com/json/databases
Http method
GET
Parameters
Parameter name | Usage | Description |
---|---|---|
apikey | Required | Specify the apikey |
Sample request
https://api.basebear.com/json/databases?apikey=**********
Sample response
[
{"ID":"5d4e5d72-7003-42c6-b054-d119e69c57aa","Name":"Project management"},
{"ID":"b55645c4-9b69-447b-8a1a-f07f50f29052","Name":"IT Asset management"}
]
View tables
Url
https://api.basebear.com/json/databases/{database_id}/tables
Http method
GET
Parameters
Parameter name | Usage | Description |
---|---|---|
apikey | Required | Specify the apikey |
database_id | Required | Specify the database id. You can get the database id calling "view database" |
Sample request
https://api.basebear.com/json/databases/5d4e5d72-7003-42c6-b054-d119e69c57aa/tables?apikey=********
Sample response
[
{"ID":"6a4ee765-7aaf-46bd-ab32-3604c09e78c3","Name":"Table1"},
{"ID":"2a389cb8-2722-410d-bebc-415f93c1e632","Name":"Table2"}
]
View records
Url
https://api.basebear.com/json/tables/{table_id}/records
Http method
GET
Parameters
Parameter name | Usage | Description |
---|---|---|
apikey | Required | Specify the apikey |
table_id | Required | Specify the table id. You can get the table id calling "view tables" |
page | Optional | Specify page index of record paging |
pagesize | Optional | Specify the number of record of the page. Default value and max value of pagesize is 1000. |
Sample request
https://api.basebear.com/json/tables/6a4ee765-7aaf-46bd-ab32-3604c09e78c3/records?apikey=**********
Sample response
[
[
{"Name":"Titolo","Value":"computer"},
{"Name":"Descrizione","Value":"computer high performance"},
{"Name":"Data inizio","Value":"2012-02-13 13:30"},
{"Name":"Numero","Value":"40.00"}
],
[
{"Name":"Titolo","Value":"modem"},
{"Name":"Descrizione","Value":"modem 56 kb"},
{"Name":"Data inizio","Value":"2012-01-20 14:30"},
{"Name":"Numero","Value":"32.00"}
]
]
Error codes
Code | Message |
---|---|
1000 | Request error |
1001 | Invalid APIKey |
1002 | Http method is not valid |
1003 | Url is not valid |
1004 | ID table is not valid |
1005 | You have reached the daily request limits |
1006 | You have exceeded account limits |
1007 | You must make request in https |