Difference between revisions of "Internal API"
From ITR Wiki
Line 28: | Line 28: | ||
| audittrail || regular_office_user || returns audit trial || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | | audittrail || regular_office_user || returns audit trial || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
|- | |- | ||
+ | | batteries || regular_office_user || returns batteries || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | educations || regular_office_user || returns educations || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | generatedreports || regular_office_user || returns generatedreports || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | groups || regular_office_user || returns groups || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | nationalities || regular_office_user || returns nationalities || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | organisations || regular_office_user || returns organisations || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | persons || regular_office_user || returns persons || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | sessiontests || regular_office_user || returns sessiontests || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | sessions || regular_office_user || returns sessions || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | reportdefinitions || regular_office_user || returns reportdefinitions || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | companies || regular_office_user || returns companies || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | creditgrants || regular_office_user || returns creditgrants || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | creditusages || regular_office_user || returns creditusages || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | datagathering || regular_office_user || returns datagathering || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | rightstemplates || regular_office_user || returns rightstemplates || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | logins || regular_office_user || returns logins || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | tokens || regular_office_user || returns tokens || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | systemsettings || regular_office_user || returns systemsettings || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | screentemplates || regular_office_user || returns screentemplates || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | tests || regular_office_user || returns tests || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | | translations || regular_office_user || returns translations || SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) || 200 OK or 404 token invalid || Get | ||
+ | |- | ||
+ | |||
+ | |||
|} | |} |
Revision as of 09:57, 29 March 2019
Internal API
The internal API is for usage by the website of the ITR. It cannot be used from external websites, unless the flag ENABLE_CORS in the file instance/application.cfg is set to 'Y'. It is strongly discouraged to set this flag to 'Y' for anything else but developmnet systems.
The following API calls are available for the following roles (in case of doubt check the source code in the application.py file on github):
Endpoint | Role | Description | Headers | Response codes | Supported operations |
---|---|---|---|---|---|
test | All | Standard test page | |||
copyright | All | Return the copyright information for this ITR installation | 200 OK | Get | |
companyname | All | Return the company name for this ITR installation | 200 OK | Get | |
login | All | Login endpoint | UserID, Password, CompanyID (optional) | 200 OK or 401 user not found in case user is unknown or user id/password combination is not correct | Get |
sendresetpassword | All | Send a reset password link via mail. The mail contains a URL with a token which is valid for 5 minutes. | UserID | 200 OK or 404 user not found | Post |
resetpassword | All | Reset the password. In case the account is registered with multiple companies then all these passwords will be reset | UserID, Password, SessionID | 200 OK or 404 user not found or token invalid | Post |
checktoken | All | Checks if the token is valid | UserID, Password, SessionID | 200 OK or 404 token invalid | Post |
logout | All | Checks if the token is valid | SessionID | 200 OK or 404 token invalid | Post |
audittrail | regular_office_user | returns audit trial | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
batteries | regular_office_user | returns batteries | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
educations | regular_office_user | returns educations | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
generatedreports | regular_office_user | returns generatedreports | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
groups | regular_office_user | returns groups | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
nationalities | regular_office_user | returns nationalities | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
organisations | regular_office_user | returns organisations | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
persons | regular_office_user | returns persons | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
sessiontests | regular_office_user | returns sessiontests | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
sessions | regular_office_user | returns sessions | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
reportdefinitions | regular_office_user | returns reportdefinitions | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
companies | regular_office_user | returns companies | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
creditgrants | regular_office_user | returns creditgrants | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
creditusages | regular_office_user | returns creditusages | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
datagathering | regular_office_user | returns datagathering | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
rightstemplates | regular_office_user | returns rightstemplates | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
logins | regular_office_user | returns logins | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
tokens | regular_office_user | returns tokens | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
systemsettings | regular_office_user | returns systemsettings | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
screentemplates | regular_office_user | returns screentemplates | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
tests | regular_office_user | returns tests | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |
translations | regular_office_user | returns translations | SessionID, CompanyID, StartPage, PageSize, Sort (optional), IncludeMaster, IncludeClient, SearchField (optional), TimeZoneOffset, Filter (optional) | 200 OK or 404 token invalid | Get |