This commit is contained in:
@@ -6,12 +6,6 @@ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNTcxODU5OTU0IiwiZXhwIjoiMTU3MjQ
|
||||
## IMMEDIATE ITEMS
|
||||
|
||||
|
||||
|
||||
TODO: Need route to gather all object role rights in a format useful to display in UI so that a biz manager can see at a glance the rights for different roles to objects
|
||||
- This way it's dynamic and picked up from the code itself which is always the source of truth so no need to put in the manual
|
||||
- Would likely want to display multiple ways: for a specific object or role or selected user maybe too in the user info form ("effective roles")
|
||||
- Move this over to client once the backend supports it
|
||||
|
||||
UPDATE SPEC DOCS with new format and names etc or at least remove nonsense as necessary
|
||||
|
||||
UPDATE MANUAL API REGARDING LISTS
|
||||
@@ -109,6 +103,8 @@ TODO: UserOptions fleshed out with client needs for formats:
|
||||
=-=-=-=-=-=-
|
||||
Less urgent things...
|
||||
|
||||
TODO: API docs, make separate page for datalists and remove from api-response-format.md doc but put a reference link to it there.
|
||||
|
||||
TODO: Need client docs at server end just for client user
|
||||
- For now I'm putting them into the regular docs but that will be easy enough to copy and paste out later
|
||||
- I just don't want the hassle of setting up another build process for client docs and folders and shit right now
|
||||
|
||||
@@ -25,13 +25,13 @@ All successful GET responses have a standard format:
|
||||
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 COLLECTION RESPONSE
|
||||
### GET DATALIST RESPONSE
|
||||
|
||||
In the case of a collection most routes support paging, here is an example paged collection request and 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:3000/api/v8.0/Widget?Offset=2&Limit=3`
|
||||
`http://localhost:7575/api/v8/DataList/List?Offset=2&Limit=2&DataListKey=TestWidgetDataList`
|
||||
|
||||
Limit must be a value between 1 and 1000.
|
||||
|
||||
@@ -40,21 +40,90 @@ Response:
|
||||
```json
|
||||
{
|
||||
"data": [
|
||||
...collection...
|
||||
[
|
||||
{
|
||||
"v": 3
|
||||
},
|
||||
{
|
||||
"v": "Handcrafted Fresh Keyboard 27",
|
||||
"i": 3
|
||||
},
|
||||
{
|
||||
"v": 3
|
||||
},
|
||||
{
|
||||
"v": 697.34
|
||||
},
|
||||
{
|
||||
"v": 128
|
||||
},
|
||||
{
|
||||
"v": "2020-01-28T12:10:46.212435Z"
|
||||
},
|
||||
{
|
||||
"v": true
|
||||
},
|
||||
{
|
||||
"v": "Doug Effertz 17 - OpsAdminFull",
|
||||
"i": 18
|
||||
}
|
||||
],
|
||||
...etc...
|
||||
],
|
||||
"paging": {
|
||||
"count": 2000,
|
||||
"count": 100,
|
||||
"offset": 2,
|
||||
"limit": 3,
|
||||
"first": "http://localhost:3000/api/v8.0/Widget?pageNo=1&pageSize=3",
|
||||
"previous": "http://localhost:3000/api/v8.0/Widget?pageNo=1&pageSize=3",
|
||||
"next": "http://localhost:3000/api/v8.0/Widget?pageNo=3&pageSize=3",
|
||||
"last": "http://localhost:3000/api/v8.0/Widget?pageNo=667&pageSize=3"
|
||||
}
|
||||
"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": "df",
|
||||
"dt": 0,
|
||||
"ay": 2
|
||||
},
|
||||
{
|
||||
"cm": "WidgetName",
|
||||
"dt": 4,
|
||||
"ay": 2
|
||||
},
|
||||
{
|
||||
"cm": "WidgetSerial",
|
||||
"dt": 5
|
||||
},
|
||||
{
|
||||
"cm": "WidgetDollarAmount",
|
||||
"dt": 8
|
||||
},
|
||||
{
|
||||
"cm": "WidgetRoles",
|
||||
"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 `df` column is the default 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 templated to be returned.
|
||||
|
||||
### PUT RESPONSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user