OffiServ API is an open API that allows access to the service using programming interface. Developers can acquire data from the service, manipulate it and also invoke actions. OffiServ API is based on REST model and uses JSON for data formats.
Security
Access to system is available only to authenticated users. Authentication employs form + cookie approach. To make data safe all requests sent to the service must use HTTPS protocol.
Sign in procedure
The URI for sign in form is /data/login. Send POST json body with fields email
and password to get a cookie.
Returned cookie should be included in subsequent request to the service.
Example:
curl -v -X POST -c cookies.txt
-d '{"email": "roger.soon@siegebank.com", "password": "123"}'
https://offiserv-app.appspot.com/data/login
Service resources roots and formats
Sections below presents formats that are used in various resources in the service. They can be manipulated via API. The resources are hierarchical. There are defined several roots of resources:
/data/companies/my- GET method returns an organization of currently signed in user/data/users/me- GET method returns currently signed in user
Organization
| Field | Descripton | Format / Type |
|---|---|---|
| uri | URI zasoby | reference to Organization |
| name | name of organization | string |
| employeesCount | count of employees | int |
| domain | domain of organization, only for Google Apps | string |
| admins | list of admin users | list of Users |
| created | date of sign up | string |
| country | country of organization | string |
| timezone | time zone of organization | string |
| features | list of enabled features in OffiServ | list of strings |
Example:
curl -b cookies.txt -c cookies.txt -v -X GET
https://offiserv-app.appspot.com/data/companies/my
User
| Field | Descripton | Format / Type |
|---|---|---|
| uri | resource URI | string |
| firstname | first name | string |
| lastname | last name | string |
| string | ||
| phone | desk phone number | string |
| mobile | mobile phone number | string |
| managerUri | URI to manager | reference to User |
| displayName | displayable name of user | string |
| reports | list of subordinates | list of Users |
| roles | list of roles fulfiled by user | list of strings |
| id | internal id of user | string |
| ticketsUri | user's tickets URI | reference to Tickets |
| reservationsUri | user's reservations URI | reference to Reservations |
| lendingsUri | user's lendings URI | reference to Reservations |
| outgoingTicketsUri | user's outgoing tickets URI | reference to Tickets |
| incomingTicketsUri | user's incoming tickets URI | reference to Tickets |
| leavesForApprovalUri | leave requests to user for approval URI | reference to Tickets |
| singleTicketUri | URI to single ticket | reference to Ticket |
| keptResourcesUri | URI to kept resources | reference to Resources |
| keptResourcesReservationsHistoryUri | URI to history of kept resources | reference to History |
| approversChainUri | list of user's approvers | reference to Users |
| reservationsAndLendingsUri | URI to user's reservations and lendings | reference to Resources |
| keeperLendingsUri | URI to keeper landings | reference to Resources |
| filtersUri | URI top filters | reference to Filters |
| companyUri | URI to organization | reference to Organization |
| leavesUri | URI to user's leave requests | reference to LeaveRequests |
| leaveDaysLimitsUri | URI to limits of leave days | reference to LeaveDaysLimits |
Example:
curl -b cookies.txt -c cookies.txt -v -X GET
https://offiserv-app.appspot.com/data/users/me

All rights reserved


