We support REST API, which is performed via HTTP methods. All HTTP requests are sent to Root URL as following:

Root = http://companyid.seasoo.net/api

Method

Operation

URL format

Return

Arguments

GET

Fetch all objects for a class

Root/{class-name}

JSON Array of JSON objects

 

GET

Fetch a single object.

Root/{class-name}/{primary key}

A JSON object

The primary key field is passed in the URL path

GET

Query objects. Returns a JSON Array of objects

Root/{class-name}?{filter}

JSON Array of JSON objects

A JDO/JPA filter query

HEAD

Validates if an object exists.

Root /{class-name}/{primary key}

 

The primary key field is passed in the URL path

PUT

Update objects

Root /{class-name}/{primary key}

Updated JSON object is returned.

The primary key field is passed in the URL path; The JSON Object is passed in the HTTP Content

POST

Insert objects

Root /{class-name}

Inserted JSON object is returned.

The JSON Object is passed in the HTTP Content

DELETE

Delete object

Root /{class-name}/{primary key}

http status code = 204 for success, 404 otherwise

The primary key field is passed in the URL path

 

Class is type of object, which is supported by Seasoo API. The following class-name are supported by Seasoo API:

o Invoice
o Estimate
o Client
o Expense
o Item
o Payment
o Project
o Task
o LogHours

Filter is using jdo filter syntax with parameters as described for each class.

E.g. for accessing invoices, the following URL should be used:

http://companyid.seasoo.net/api/Invoice