Created
January 8, 2017 17:58
-
-
Save olkeene/8ec42346e9a45bb69551b789628ce558 to your computer and use it in GitHub Desktop.
Title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Travel Policy APIs | |
- [References](references.md) | |
- [Read data of a User](references.md/#read-data-of-a-user) | |
- [Create a new User](references.md/#create-a-new-user) | |
- [Change a new User](references.md/#change-a-new-user) | |
# References | |
## Read data of a User | |
Compare Verison 0.3.0 with 0.2.0 and you will see the green markers with new items in version 0.3.0 and red markers with removed items since 0.2.0. | |
GET /user/:id | |
### Response 200 | |
``` | |
{ | |
"id": "4711" | |
"registered": "31.01.2013" | |
"name": "John Doe" | |
} | |
``` | |
### Response 401 Not Authenticated | |
``` | |
{ | |
"error": "NoAccessRight" | |
} | |
``` | |
---------- | |
## Create a new User | |
In this case "apiErrorStructure" is defined and used. | |
Define blocks with params that will be used in several functions, so you dont have to rewrite them. | |
POST /user | |
### Parameters | |
| Name | Required | Type | Description | | |
| - | | | | | |
| name | True | String | Name of a as as thUser | | |
### Response | |
Response 400 Bad Request | |
``` | |
HTTP/1.1 | |
{ | |
"error": "UserNameTooShort" | |
} | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment