-
Notifications
You must be signed in to change notification settings - Fork 3
Consuming the API
You can use curl or Postman to test your API.
First create a user:
$ curl --request POST \
$ --url http://localhost/users \
$ --header 'accept: application/json' \
$ --header 'content-type: application/json' \
$ --data '{ "name": "Test 1" }'You will receive the created user as the response:
{ "id": "xyz", "name": "Test 1" }
Second create an entry:
$ curl --request POST \
$ --url http://localhost/users \
$ --header 'accept: application/json' \
$ --header 'content-type: application/json' \
$ --data '{ "owner": "xyz", "name": "Entry 1", "value": "Something" }'First query the users:
$ curl --request GET \
$ --url http://localhost/usersAs the response you will receive the list of users:
[
{ "id": "xyz", "name": "Test 1" }
]
Now get the entries of our user:
$ curl --request GET \
$ --url http://localhost/users/xyz/entriesAs the response you will receive the list of entries of the user:
[
{ "id": "abc", "owner": "xyz", "name": "Entry 1", "value": "Something" }
]
You can learn more about the REST interface at the High level access page.
This is the end of the Getting started section. Now you can create basic APIs, to learn more, read the remaining sections of the wiki. Have fun!
Getting started
• 1. Creating the API
• 2. Creating edges
• 3. Creating relations
• 4. Providing the API
• 5. Consuming the API
API Composition
• Edges
• Relations
• Actions, operations
• Custom methods
Providers
• Model providers
• Access providers
• API provider
API Consumption
• Low-level access
• High level access
• Swagger support