Skip to content

Instantly share code, notes, and snippets.

@olkeene
Created January 8, 2017 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olkeene/8ec42346e9a45bb69551b789628ce558 to your computer and use it in GitHub Desktop.
Save olkeene/8ec42346e9a45bb69551b789628ce558 to your computer and use it in GitHub Desktop.
Title
# 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