2.0.0 • Published 4 years ago

ra-data-json-sails v2.0.0

Weekly downloads
73
License
-
Repository
github
Last release
4 years ago

Sails.js API Data Provider For React-Admin

Sails.js API Data Provider for react-admin. Based on ra-data-json-server.

Installation

npm install --save mpampin/ra-data-json-sails

REST Dialect

REST verbAPI calls
GET_LISTGET http://my.api.url/posts?sort=title%20ASC&skip=0&limit=50&title=bar
GET_ONEGET http://my.api.url/posts/123
CREATEPOST http://my.api.url/posts/123
UPDATEPUT http://my.api.url/posts/123
DELETEDELETE http://my.api.url/posts/123
GET_MANYGET http://my.api.url/posts/123, GET http://my.api.url/posts/456, GET http://my.api.url/posts/789
GET_MANY_REFERENCEGET http://my.api.url/posts?author_id=345

Note: The JSON Server REST Data Provider expects the API to include a X-Total-Count header in the response to GET_LIST calls. The value must be the total number of resources in the collection. This allows react-admin to know how many pages of resources there are in total, and build the pagination controls.

X-Total-Count: 319

If your API is on another domain as the JS code, you'll need to whitelist this header with an Access-Control-Expose-Headers CORS header.

Access-Control-Expose-Headers: X-Total-Count
2.0.0

4 years ago

1.0.14

4 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago