API resources

Version 1.1 28.11.2013

List of resources available via API

Resources

X = Not yet implemented !! = May change before implementation ?? = May not be implemented

Application data

Method Resource  Description
GET api/table/:name/fetchall/ All pages in folder.
GET api/table/:name/fetch/ Multiple pages in folder.
GET api/table/:name/find/:id Get Page in folder.
GET api/table/:name/tags Get tagnames used in folder.
POST api/table/:name/record/:id/tag/:tag/:value Save tag to page. :tag = id or name. :value = 0/1
GET api/table/:name/changelog Last changes made to table. Alias to: api/Changelog?table=:name
GET api/search/:keyword Search from all tables. group_by=table&group_limit=8
GET api/changelog Last changes. Parameters: table, status
POST api/tag Save tag to page. Param: table,record,tag,value
GET api/note/:id Get nota data.
POST api/note/:id Save note data.
DELETE api/note/:id Delete note.
Properties  Description
property What data is returned from single record.
filter What records are returned.
order Order or records.
limit Number of records: limit / start,limit / start-end
Collection parameters  Method  Description
order=string  GET Order of returned items.
limit=int GET Number of rows to return.
start=int GET Start of returned rows.
page=int  GET  Range of returned rows: start = page*limit @todo check out common ways.

Account info

Method Resource  Description
GET api/account Current account information.
GET api/users  List of all users.
GET api/user Current user information.
GET api/user/:name User information.
GET api/user/:name/profile  !! Profile of given user
GET api/profiles List of all profiles.
GET api/profile Current user profile information.
GET api/profile/:name Profile information. If id is not given, return the profile of current user. id ca
GET api/profile/:name/users  !! Users of given profile.

Application schema

Table

Method Resource  Description
GET api/tables  List of all tables.
GET api/tablegroups List of all table groups.
GET api/table/:name Table info.

Field

Method Resource  Description
GET /fields List of all fields.
GET /field/:name X Value of field.
GET /field/:name/:method X
GET /field/:name/changelog X Field changelog
GET /field/:name/thumbnail X Thumbnail of value in field

Action

Method Resource  Description
GET api/actions List of all actions.
GET api/actions/type/:type !! Action information.
GET api/action/:name Action information.

Report

Method Resource  Description
GET api/reports All reports
GET api/reports/amounts Amounts for reports that use countAmount.
GET api/report/:id Get full preferences of given report.
POST api/report/:id Save report.
GET api/reports/edited/:date  ?? Common way tosearch last modified

Import

Method Resource  Description
GET api/import/[id]/import x Send a import -file.
GET api/import/[id]/edit x Edit import profile.
GET api/import/[id]/csv x Example CSV of import profile.
GET api/import/[id]/api x API -page of import profile.
GET api/application/schema x Save/load application model.

Application Statistics

Method Resource  Description
GET api/log/request/:id X Request info
GET api/log/requests X Requst ?type=&view=... last x

Framework

Method Resource  Description
GET api/fieldtypes List of all fieldtypes available.
GET api/fieldtype/:name Fieldtype information.
GET api/actiontypes List of all actiontypes available.
GET api/actiontype/:name Actiontype information.
GET api/viewtypes List of all viewtypes available.
GET api/viewtype/:name Viewtype information.

Utilities

Method Resource  Description
GET api/validate/date/:val Tämä viikko, huomenna... Palauttaa dd.mm.YYYY
GET api/validate/number/:val Numero tai kaava
GET api/validate/duration/:val 10,25 -> 10:15 ...
GET api/image/date/:val X Return date -image from d.m.Y, Y-m-d
GET api/image/time/:val X Return time -image from h:m:i
GET api/image/duration/:val X Return duration -image from h:m
GET api/image/initials/:val X Return initials -image from string
GET api/image/barcode/:val !! Return initials -image from string
GET api/image/qrcode/:val !! Return initials -image from string