-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.apib
More file actions
144 lines (106 loc) · 3.23 KB
/
api.apib
File metadata and controls
144 lines (106 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
FORMAT: 1A
# VUTTR
Repositório contendo informações sobre ferramentas utilizadas por desenvolvedores.
## Usuários [/users]
### Criar usuário [POST]
+ Request (application/json)
[
{
"name": "Demo",
"email": "demo@teste.com"
}
]
+ Response 201 (application/json)
[
{
"name": "Demo",
"email": "demo@teste.com"
}
]
## Sessão [/sessions]
### Criar Sessão [POST]
+ Request (application/json)
{
"email": "demo@teste.com"
}
+ Response 200 (application/json)
+ Headers
Location: /questions/2
+ Body
{
"user": {
"id": 12,
"name": "Demo",
"email": "demo@teste.com"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTIsImlhdCI6MTU3NDI3MDE2NiwiZXhwIjoxNTc0ODc0OTY2fQ.jmB1uhlGv-VVPslAinKx9r7d1gi1Odt5RfJYh5dwfQE"
}
## Tools [/tools]
### Listar Tool [GET]
+ Headers
Authorization: Bearer Token
+ Response 200 (application/json)
[
{
"tags": [
"api",
"json",
"schema",
"node",
"github",
"rest"
],
"_id": "5dd7eb963bb89d2ddb7eaaf5",
"title": "json",
"user": 12,
"link": "https://github.com/typicode/json-server",
"description": "Fake REST API based on a json schema. Useful for mocking and creating APIs for front-end devs to consume in coding challenges.",
"createdAt": "2019-11-22T14:07:18.351Z",
"updatedAt": "2019-11-22T14:07:18.351Z",
"__v": 0
}
]
### Criar Tool [POST]
+ Headers
Authorization: Bearer Token
+ Request (application/json)
{
"title": "json",
"link": "https://github.com/typicode/json-server",
"description":"Fake REST API based on a json schema. Useful for mocking and creating APIs for front-end devs to consume in coding challenges.",
"tags": [
"api",
"json",
"schema",
"node",
"github",
"rest"
]
}
+ Response 201 (application/json)
+ Headers
Location: /questions/2
+ Body
{
"tags": [
"api",
"json",
"schema",
"node",
"github",
"rest"
],
"_id": "5dd7eb963bb89d2ddb7eaaf5",
"title": "json",
"user": 12,
"link": "https://github.com/typicode/json-server",
"description": "Fake REST API based on a json schema. Useful for mocking and creating APIs for front-end devs to consume in coding challenges.",
"createdAt": "2019-11-22T14:07:18.351Z",
"updatedAt": "2019-11-22T14:07:18.351Z",
"__v": 0
}
### Deletar Tool [DELETE/{id}]
+ Headers
Authorization: Bearer Token
+ Request (application/json)
+ Response 204 (application/json)