This commit is contained in:
@@ -2,10 +2,14 @@
|
||||
|
||||
AyaNova features a RESTful API that can be used by developers to integrate their applications with AyaNova.
|
||||
|
||||
The AyaNova user interface web application uses this same API for all access to AyaNova so it is possible by using the REST API to automate or integrate with anything that can be done in the AyaNova application.
|
||||
The AyaNova user interface web application uses this same API for all access to AyaNova.
|
||||
|
||||
AyaNova comes with a [API explorer console](api-console.md) that can be used by developers to test and experiment with each API route without writing code and view the format of the data as well as documentation on the [API Request format](api-request-format.md), [API Response format](api-response-format.md) and [API Error codes](api-error-codes.md) table.
|
||||
AyaNova comes with a [API explorer console](api-console.md) that can be used by developers to test and experiment with each API route without writing code and view the shape of the data.
|
||||
|
||||
In addition we have a [developers forum](https://forum.ayanova.com/c/ayanova-reporting-development/66) available for peer to peer and occasionally AyaNova development department response as time permits.
|
||||
AyaNova web app is also an extremely helpful source of information, by opening your browser's developer console and initiating actions within the AyaNova web app you can examine the network requests and responses to see how it's done within AyaNova.
|
||||
|
||||
Note that support for development integration (writing code) is beyond the scope of the technical support we provide, however any technical issues (problems) found with the API itself _are_ available for support.
|
||||
We also have documentation on the [API Request format](api-request-format.md), [API Response format](api-response-format.md) and [API Error codes](api-error-codes.md).
|
||||
|
||||
In addition we have a [developers forum](https://forum.ayanova.com/c/ayanova-reporting-development/66) available for peer to peer support and occasionally AyaNova development department response as time permits.
|
||||
|
||||
Note that support for development integration (help writing code) is beyond the scope of the technical support we provide, however any technical issues (bugs) found with the API are available for support.
|
||||
|
||||
@@ -1,29 +1,41 @@
|
||||
# API request format
|
||||
|
||||
AyaNova uses a RESTful API and supports the [JSON](https://www.json.org/) data interchange format exclusively.
|
||||
|
||||
No other data formats are supported, your code must supply and consume JSON formatted data.
|
||||
|
||||
All developer interaction with the AyaNova API is via the REST server interface only.
|
||||
|
||||
## Authentication
|
||||
|
||||
The api is secured via JSON web tokens documented in the API Console help page [authentication section](api-console.md#authentication).
|
||||
|
||||
## API documentation
|
||||
|
||||
Your primary source of information on how to make API requests is the [API explorer console](api-console.md) where every route is documented and can be tested manually before coding.
|
||||
|
||||
In addition the AyaNova web app itself is also an extremely helpful source of information, by opening your browser's developer console and initiating actions within the AyaNova web app you can examine the network requests and responses to see how it's done within AyaNova.
|
||||
|
||||
## API Versioning and URL
|
||||
|
||||
The AyaNova API is versioned and all requests must specify as part of the URL the version of the API desired. The API version number must be 8 or greater.
|
||||
The AyaNova API is versioned and all requests must specify as part of the URL the version of the API desired. The API version number must be 8 or greater.
|
||||
|
||||
For example, for this request for the list of AyaType codes: `http://localhost:7575/api/v8.0/AyaType` the server location and request to the start of the API route is specified by this part `http://localhost:7575/api/` and the exact version and route is specified by the final part: `v8.0/AyaType`. In future releases the API version will be incremented and accessible by specifying the new API version number. Old versions of the API will be supported wherever possible so an app written against the v8.0 API version will continue to work into the future when newer API versions are released (assuming an older version route hasn't had to be changed due to a serious issue or incompatibility).
|
||||
For example, for this request for the list of AyaType codes: `http://localhost:7575/api/v8.0/AyaType` the server location and request to the start of the API route is specified by this part `http://localhost:7575/api/` and the exact version and route is specified by the final part: `v8.0/AyaType`.
|
||||
|
||||
In future releases the API version will be incremented and accessible by specifying the new API version number.
|
||||
|
||||
Old versions of the API will be supported wherever possible so an app written against the v8.0 API version will continue to work into the future when newer API versions are released (assuming an older version route hasn't had to be changed due to a serious issue or incompatibility).
|
||||
|
||||
The [API explorer console](api-console.md) on your server is always the best source of information on how to access your particular API and features a built in Version selector so you can manually try out any version of any route.
|
||||
|
||||
## Dates and times
|
||||
|
||||
All dates and times sent or retrieved from the REST interface **must** be ISO 8601 format in UTC / GMT time zone ONLY. For example, "2027-04-05T14:30Z" or "2027-04-05T14:30". The server does not expect dates to be in any other time zone or format.
|
||||
All dates and times sent or retrieved from the REST interface **must** be ISO 8601 format in UTC / GMT time zone ONLY. For example, "2027-04-05T14:30Z" or "2027-04-05T14:30". The server does not expect dates to be in any other time zone or format.
|
||||
|
||||
Localized dates and times are a _client_ responsibility with AyaNova.
|
||||
|
||||
## Translation
|
||||
|
||||
Every User account in AyaNova has their own UserOptions object which contains their personal Translation settings such as time zone offset, currency symbol and numeric formatting options you can use this value to correctly display and interpret values at a client level.
|
||||
|
||||
In addition every user has their own TranslationId setting stored in their User record (not UserOptions) which can be used to fetch and display text in the correct translation by using the methods in the Translation routes.
|
||||
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
# API response format
|
||||
|
||||
AyaNova uses a RESTful API and supports the [JSON](https://www.json.org/) data interchange format exclusively.
|
||||
|
||||
No other data formats are supported, your code must supply and consume JSON formatted data.
|
||||
|
||||
All developer interaction with the AyaNova API is via the REST server interface only.
|
||||
|
||||
## Authentication
|
||||
|
||||
The api is secured via JSON web tokens documented in the API Console help page [authentication section](api-console.md#authentication).
|
||||
|
||||
## API documentation
|
||||
|
||||
Your primary source of information on how to make API requests is the [API explorer console](api-console.md) where every route is documented and can be tested manually before coding.
|
||||
|
||||
In addition the AyaNova web app itself is also an extremely helpful source of information, by opening your browser's developer console and initiating actions within the AyaNova web app you can examine the network requests and responses to see how it's done within AyaNova.
|
||||
|
||||
## Successful responses
|
||||
|
||||
### GET RESPONSE
|
||||
@@ -17,109 +28,13 @@ All successful GET responses have a standard format:
|
||||
"id": 150,
|
||||
"name": "Handmade Rubber Pizza",
|
||||
...etc...
|
||||
},
|
||||
"readOnly": boolean
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The results of the response are always contained in the `data` property and could be a single object, a collection or in some cases nothing at all.
|
||||
HTTP Status Code is set in the header. A ReadOnly property is set on the returned data for the convenience of the client software however note that the server will always determine this independently so if this property is ignored and the client attempts to update the record a error 2004 NOT_AUTHORIZED would be returned.
|
||||
|
||||
### GET DATALIST RESPONSE
|
||||
|
||||
In the case of a DataList routes support paging and filtering, here is an example paged collection request and response:
|
||||
|
||||
Request (note the `offset` and `limit` parameters):
|
||||
|
||||
`http://localhost:7575/api/v8/DataList/List?Offset=2&Limit=2&DataListKey=TestWidgetDataList`
|
||||
|
||||
Limit must be a value between 1 and 1000.
|
||||
|
||||
Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"data": [
|
||||
[
|
||||
{
|
||||
"v": 3
|
||||
},
|
||||
{
|
||||
"v": "Handcrafted Fresh Keyboard 27",
|
||||
"i": 3
|
||||
},
|
||||
{
|
||||
"v": 3
|
||||
},
|
||||
{
|
||||
"v": 697.34
|
||||
},
|
||||
{
|
||||
"v": 128
|
||||
},
|
||||
{
|
||||
"v": "2021-01-28T12:10:46.212435Z"
|
||||
},
|
||||
{
|
||||
"v": true
|
||||
},
|
||||
{
|
||||
"v": "Doug Effertz 17 - OpsAdmin",
|
||||
"i": 18
|
||||
}
|
||||
],
|
||||
...etc...
|
||||
],
|
||||
"paging": {
|
||||
"count": 100,
|
||||
"offset": 2,
|
||||
"limit": 2,
|
||||
"first": "http://localhost:7575/api/v8/DataList/List?DataListKey=TestWidgetDataList&pageNo=1&pageSize=2",
|
||||
"previous": "http://localhost:7575/api/v8/DataList/List?DataListKey=TestWidgetDataList&pageNo=1&pageSize=2",
|
||||
"next": "http://localhost:7575/api/v8/DataList/List?DataListKey=TestWidgetDataList&pageNo=3&pageSize=2",
|
||||
"last": "http://localhost:7575/api/v8/DataList/List?DataListKey=TestWidgetDataList&pageNo=50&pageSize=2"
|
||||
},
|
||||
"columns": [
|
||||
{
|
||||
"cm": "WidgetName",
|
||||
"dt": 4,
|
||||
"ay": 2,
|
||||
"rid":1
|
||||
},
|
||||
{
|
||||
"cm": "WidgetSerial",
|
||||
"dt": 5
|
||||
},
|
||||
{
|
||||
"cm": "WidgetDollarAmount",
|
||||
"dt": 8
|
||||
},
|
||||
{
|
||||
"cm": "WidgetUserType",
|
||||
"dt": 10
|
||||
},
|
||||
{
|
||||
"cm": "WidgetStartDate",
|
||||
"dt": 1
|
||||
},
|
||||
{
|
||||
"cm": "Active",
|
||||
"dt": 6
|
||||
},
|
||||
{
|
||||
"cm": "User",
|
||||
"dt": 4,
|
||||
"ay": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
`Previous` or `next` properties will contain "null" instead of an url on boundaries where there is no record to link to.
|
||||
`columns` collection is the list of columns returned in the same order as the individual data arrays for each object.
|
||||
Note that the column with the `rid` flag is the default row ID column and contains the object type and id to open for that row which guarantees an openable object for the row regardless of which columns are set to be returned.
|
||||
HTTP Status Code is set in the header.
|
||||
|
||||
### PUT RESPONSE
|
||||
|
||||
@@ -183,7 +98,7 @@ An error object will always contain at minimum an [API error `Code`](api-error-c
|
||||
|
||||
Here is an example of a more detailed error response showing validation errors on a request:
|
||||
|
||||
```json hl_lines="4 "
|
||||
```json hl_lines="4 "
|
||||
{
|
||||
"error": {
|
||||
"code": "2200",
|
||||
@@ -225,7 +140,7 @@ Objects that require concurrency tokens to update are the objects that return a
|
||||
|
||||
Every update to an object results in a new concurrency token for that object.
|
||||
|
||||
In a concurrency error response ([API error code](api-error-codes.md) 2005) and header HTTP code 409 (Conflict) is returned if a user attempts to update a record that was changed by another user since it was retrieved (outdated concurrency token provided).
|
||||
In a concurrency error response ([API error code](api-error-codes.md) 2005) and header HTTP code 409 (Conflict) is returned if a user attempts to update a record that was changed by another user since it was retrieved (outdated concurrency token provided).
|
||||
|
||||
Here is an example:
|
||||
|
||||
@@ -244,7 +159,7 @@ Errors not related to validation or concurrency may contain one or more nested `
|
||||
|
||||
Here is a sample error response with innererror set:
|
||||
|
||||
```json hl_lines="6 "
|
||||
```json hl_lines="6 "
|
||||
{
|
||||
"error": {
|
||||
"code": "1005",
|
||||
@@ -256,7 +171,7 @@ Here is a sample error response with innererror set:
|
||||
"code": "1007",
|
||||
"minLength": "6",
|
||||
"maxLength": "64",
|
||||
"characterTypes": ["lowerCase","upperCase","number","symbol"],
|
||||
"characterTypes": ["lowerCase", "upperCase", "number", "symbol"],
|
||||
"minDistinctCharacterTypes": "2",
|
||||
"innererror": {
|
||||
"code": "1008"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## AyaNova system architecture
|
||||
|
||||
AyaNova is a client / server application split between the AyaNova API web server and a progressive web application that provides the AyaNova user interface.
|
||||
AyaNova is a client / server application split between the AyaNova API web server and a responsive web application that provides the AyaNova user interface.
|
||||
|
||||
## AyaNova server
|
||||
|
||||
@@ -16,15 +16,15 @@ PostgreSQL can be run on multiple operating systems and platforms including Linu
|
||||
|
||||
## AyaNova client
|
||||
|
||||
The "front end" of AyaNova also known as the "client" is the user interface for AyaNova. The AyaNova client is a progressive web application. "Progressive" refers to the applications ability to adapt to the device being used and it's screen dimensions. Any device on any platform, desktop or mobile, can be used with AyaNova provided it has a modern web browser with Javascript enabled.
|
||||
The "front end" of AyaNova also known as the "client" is the user interface for AyaNova. The AyaNova client is a responsive web application. "Responsive" refers to the applications ability to adapt to the device being used and it's screen dimensions. Any device on any platform, desktop or mobile, can be used with AyaNova provided it has a modern web browser with Javascript enabled.
|
||||
|
||||
## Installation
|
||||
|
||||
AyaNova supports many configurations from single user on a single computer, multiple office users on a local area network to large corporate scenarios where AyaNova is accessed globally from the internet.
|
||||
|
||||
AyaNova can be installed on many platforms including a single computer for private use, on-premise with a office network server or hosted on a 3rd party internet hosting provider such as [DigitalOcean](https://www.digitalocean.com/).
|
||||
AyaNova server can be installed on many platforms including a single computer for private use, on-premise with a office network server or hosted on a 3rd party internet hosting provider such as [DigitalOcean](https://www.digitalocean.com/).
|
||||
|
||||
The [installation guide](ops-install.md) is the starting point for installing AyaNova to meet specific needs.
|
||||
The [installation guide](ops-install.md) is the starting point for installing the AyaNova server to meet specific needs.
|
||||
|
||||
## Configuration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user