Go to BaseBear.com →

BaseBear API

BaseBear provides REST APIs that allow external applications to interface with BaseBear database. Users can build web applications in any programming language and connect to your data stored on BaseBear.com.

Prerequisites

To use the BaseBear API you need:

REST API

Error codes

Complete list of error codes


View database

Url

https://api.basebear.com/{format}/databases

Formats

xml, json

Http method

GET

Parameters

Parameter name Usage Description
apikey Required Specify the apikey

Sample request

https://api.basebear.com/xml/databases?apikey=**********

Sample xml response

<?xml version="1.0" encoding="UTF-8" ?>
<Databases>
    <Database>
        <ID>5d4e5d72-7003-42c6-b054-d119e69c57aa</ID>
        <Name><![CDATA[Project management]]></Name>
    </Database>
    <Database>
        <ID>b55645c4-9b69-447b-8a1a-f07f50f29052</ID>
        <Name><![CDATA[IT Asset management]]></Name>
    </Database>
</Databases>

Sample json 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/{format}/databases/{database_id}/tables

Formats

xml, json

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/xml/databases/5d4e5d72-7003-42c6-b054-d119e69c57aa/tables?apikey=********

Sample xml response

<?xml version="1.0" encoding="UTF-8" ?>
<Tables>
    <Table>
        <ID>6a4ee765-7aaf-46bd-ab32-3604c09e78c3</ID>
        <Name><![CDATA[Table1]]></Name>
    </Table>
    <Table>
        <ID>2a389cb8-2722-410d-bebc-415f93c1e632</ID>
        <Name><![CDATA[Table2]]></Name>
    </Table>
</Tables>

Sample json response

[
    {"ID":"6a4ee765-7aaf-46bd-ab32-3604c09e78c3","Name":"Table1"},
    {"ID":"2a389cb8-2722-410d-bebc-415f93c1e632","Name":"Table2"}
]

View fields

Url

https://api.basebear.com/{format}/tables/{table_id}/fields

Formats

xml, json

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"

Sample request

https://api.basebear.com/xml/tables/6a4ee765-7aaf-46bd-ab32-3604c09e78c3/fields?apikey=**********

Sample xml response

<?xml version="1.0" encoding="UTF-8" ?>
<Fields>
    <Field>
        <Name><![CDATA[Name]]></Name>
        <Type>text</Type>
        <DefaultValue></DefaultValue>
        <SupportingText></SupportingText>
        <Required>false</Required>
        <NoDuplicate>false</NoDuplicate>
    </Field>
    <Field>
        <Name><![CDATA[Description]]></Name>
        <Type>longtext</Type>
        <DefaultValue></DefaultValue>
        <SupportingText></SupportingText>
        <Required>false</Required>
        <NoDuplicate>false</NoDuplicate>
    </Field>
    <Field>
        <Name><![CDATA[Start date]]></Name>
        <Type>datetime</Type>
        <DateTimeFormat>ShortDateAndShortTime</DateTimeFormat>
        <DefaultValue></DefaultValue>
        <SupportingText></SupportingText>
        <Required>false</Required>
        <NoDuplicate>false</NoDuplicate>
    </Field>
    <Field>
        <Name><![CDATA[Amount]]></Name>
        <Type>number</Type>
        <DecimalDigits>2</DecimalDigits>
        <ShowPercentage>false</ShowPercentage>
        <DefaultValue></DefaultValue>
        <SupportingText></SupportingText>
        <Required>false</Required>
        <NoDuplicate>false</NoDuplicate>
     </Field>
</Fields>

Sample json response

[
    {
        "Name":"Name",
        "Type":"text",
        "DefaultValue":"",
        "SupportingText":"",
        "Required":false,
        "NoDuplicate":false
    },
    {
        "Name":"Description",
        "Type":"longtext",
        "DefaultValue":"",
        "SupportingText":"",
        "Required":false,
        "NoDuplicate":false
    },
    {
        "Name":"Start date",
        "Type":"datetime",
        "DateTimeFormat":"ShortDateAndShortTime",
        "DefaultValue":"",
        "SupportingText":"",
        "Required":false,
        "NoDuplicate":false
    },
    {
        "Name":"Amount",
        "Type":"number",
        "DecimalDigits":2,
        "ShowPercentage":false,
        "DefaultValue":"",
        "SupportingText":"",
        "Required":false,
        "NoDuplicate":false
    }
]

View records

Url

https://api.basebear.com/{format}/tables/{table_id}/records

Formats

xml, json

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/xml/tables/6a4ee765-7aaf-46bd-ab32-3604c09e78c3/records?apikey=**********

Sample xml response

<?xml version="1.0" encoding="UTF-8" ?>
<Records>
    <Record>
        <Column>
            <Name><![CDATA[Name]]></Name>
            <Value><![CDATA[computer]]></Value>
        </Column>
        <Column>
            <Name><![CDATA[Description]]></Name>
            <Value><![CDATA[computer high performance]]></Value>
        </Column>
        <Column>
            <Name><![CDATA[Start date]]></Name>
            <Value><![CDATA[2012-02-13 13:30]]></Value>
        </Column>
        <Column>
            <Name><![CDATA[Quantity]]></Name>
            <Value><![CDATA[40.00]]></Value>
        </Column>
    </Record>
    <Record>
        <Column>
            <Name><![CDATA[Name]]></Name>
            <Value><![CDATA[modem]]></Value>
        </Column>
        <Column>
            <Name><![CDATA[Description]]></Name>
            <Value><![CDATA[modem 56 kb]]></Value>
        </Column>
        <Column>
            <Name><![CDATA[Start date]]></Name>
            <Value><![CDATA[2012-01-20 14:30]]></Value>
        </Column>
        <Column>
            <Name><![CDATA[Quantity]]></Name>
            <Value><![CDATA[32.00]]></Value>
        </Column>
    </Record>
</Records>

Sample json 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