Created
September 4, 2018 06:45
-
-
Save oimtrust/1e9209d0fbd28f75994a06872e8ceac5 to your computer and use it in GitHub Desktop.
This file contains 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
FORMAT: 1A | |
HOST: https://oimtrust.com/api/ | |
# Profile API | |
Tutorial membuat API Blueprint dengan apiary.io | |
# Group Profile | |
# Profile Collection [/profile] | |
- Attributes (Profile) | |
### Retrieve All Profile [GET] | |
- Request (application/json) | |
- Response 200 (application/json) | |
- Attributes (Profile) | |
### Filter Profile [GET /profile{?type}] | |
- Parameters | |
- type : Tetap (enum[string], optional) | |
- Default : `Empty` | |
- Members | |
- Empty | |
- Tetap | |
- Freelance | |
- Kontrak | |
- Request (application/json) | |
- Response 200 (application/json) | |
- Attributes (Profile) | |
### Create Profile [POST] | |
- Request (application/json) | |
- Attributes (Profile Create) | |
- Response 201 (application/json) | |
- Attributes (Profile) | |
## Profile Resource [/profile/{id}] | |
- Parameters | |
- id : 6c34a6af-752d-408a-b5d3-00a368e7201e | |
- Attributes (Profile) | |
### Update A Profile [PATCH] | |
- Request Successfull Update (application/json) | |
- Attributes (Profile Update Valid) | |
- Response 201 (application/json) | |
- Attributes (Profile) | |
- type : Kontrak | |
- Request Unsuccessfull Update (application/json) | |
- Attributes (Profile Update Invalid) | |
- Response 422 (application/json) | |
- Attributes (Error Unprocessable Entity) | |
- message : `This was an invalid type, please select Tetap, Freelance or Kontrak` | |
- attribute : type | |
### Delete A Profile [DELETE] | |
- Response 204 | |
# Data Structures | |
## Profile Create (object) | |
- name : Fathur Rohim (string, required) | |
- email : `rohim@dot-indonesia.com` (string, required) | |
- phone : `081388878676` (string, required) | |
- type : Tetap (enum[string], required) | |
- Tetap | |
- Freelance | |
- Kontrak | |
- image_url : https://www.oimtrust.com/assets/img/oim.jpg | |
## Profile (object) | |
- id : 6c34a6af-752d-408a-b5d3-00a368e7201e (string, required) | |
- Include Profile Create | |
## Profile Update Valid | |
- type : Kontrak | |
## Profile Update Invalid | |
- type : `Tidak Tetap` | |
## Error Unprocessable Entity | |
- title : Unprocessable Entity | |
- message : This resource could not be updated due to invalid arguments being passed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment