-
Notifications
You must be signed in to change notification settings - Fork 2
/
examples.http
102 lines (82 loc) · 3.15 KB
/
examples.http
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
@baseURL=http://localhost:5000/api/v1
@username=thiagocutrim@discente.ufma.br
@password=123456
### POST - Autenticação de usuário ###
POST {{baseURL}}/oauth HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Authorization: Basic {{username}} {{password}}
### GET - Categorias ###
GET {{baseURL}}/categories HTTP/1.1
Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRoaWFnb2N1dHJpbUBkaXNjZW50ZS51Zm1hLmJyIiwiZXhwIjoxNjI4NTAxMjY5fQ.hcf52r7ofPjJ1MX29i8h5jlrG8FD-2olJk8x8GnExOE
### GET - Cursos ###
GET {{baseURL}}/courses HTTP/1.1
### POST - Curso ###
POST {{baseURL}}/course HTTP/1.1
Accept: text/html
Content-Type: application/json
Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRoaWFnb2N1dHJpbUBkaXNjZW50ZS51Zm1hLmJyIiwiZXhwIjoxNjI4NTAxMjY5fQ.hcf52r7ofPjJ1MX29i8h5jlrG8FD-2olJk8x8GnExOE
{
"name":"Engenharia Química"
}
### GET - Alunos de um curso ###
GET {{baseURL}}/course/1/users HTTP/1.1
Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InN0dWRlbnRAZXhhbXBsZS5jb20iLCJleHAiOjE2Mjg0NzQzNzB9.W7qFQm8SLhSyo0tx2-5v6YIiKkLUnsjjGpYr8cnT4ig
### GET - Grau de instrução ###
GET {{baseURL}}/degrees HTTP/1.1
### POST - Grau de instrução ###
POST {{baseURL}}/degree HTTP/1.1
Accept: text/html
Content-Type: application/json
Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InN0dWRlbnRAZXhhbXBsZS5jb20iLCJleHAiOjE2Mjg0NzQzNzB9.W7qFQm8SLhSyo0tx2-5v6YIiKkLUnsjjGpYr8cnT4ig
{
"name":"Pós-doutorado"
}
### GET - Áreas de conhecimentos ###
GET {{baseURL}}/areas HTTP/1.1
### POST - Áreas de conhecimentos ###
POST {{baseURL}}/area HTTP/1.1
Accept: text/html
Content-Type: application/json
Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InN0dWRlbnRAZXhhbXBsZS5jb20iLCJleHAiOjE2Mjg0NzQzNzB9.W7qFQm8SLhSyo0tx2-5v6YIiKkLUnsjjGpYr8cnT4ig
{
"name":"Inteligência Artificial"
}
### GET - Grau de instrução ###
GET {{baseURL}}/degrees HTTP/1.1
### POST - Grau de instrução ###
POST {{baseURL}}/degrees HTTP/1.1
Accept: text/html
Content-Type: application/json
{
"name": "Graduação"
}
### GET - Usuário ###
GET {{baseURL}}/user?email=student@example.com
Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InN0dWRlbnRAZXhhbXBsZS5jb20iLCJleHAiOjE2Mjg0NzQzNzB9.W7qFQm8SLhSyo0tx2-5v6YIiKkLUnsjjGpYr8cnT4ig
### POST - Usuário Aluno ###
POST {{baseURL}}/user
Accept: text/html
Content-Type: application/json
{
"email":"student@example.com",
"password":"mypass",
"name":"Student",
"type_user":0,
"university":"{'text':'Universidade Federal do Maranhão', 'value':'1'}",
"degree":"{'text':'Graduação', 'value':'1'}",
"course":"{'text':'Engenharia da Computação', 'value':'1'}"
}
### POST - Usuário Orientador ###
POST {{baseURL}}/user
Accept: text/html
Content-Type: application/json
{
"email":"teacher@example.com",
"password":"mypass",
"name":"Teacher",
"type_user":1,
"university":"{'text':'Universidade Federal do Maranhão', 'value':'1'}",
"degree":"{'text':'Doutorado', 'value':'3'}",
"course":"{'text':'Engenharia da Computação', 'value':'1'}"
}