-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-examples.http
More file actions
130 lines (103 loc) · 2.72 KB
/
api-examples.http
File metadata and controls
130 lines (103 loc) · 2.72 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
# Skopia Task Manager API - HTTP Requests Examples
### Variables
@baseUrl = http://localhost:5000/api
@userId = 3fa85f64-5717-4562-b3fc-2c963f66afa6
@projectId =
@taskId =
### Health Check
GET http://localhost:5000/swagger/index.html
###
# ========================================
# PROJECT ENDPOINTS
# ========================================
### Create a new project
# @name createProject
POST {{baseUrl}}/projects
Content-Type: application/json
{
"name": "Projeto de Exemplo",
"description": "Este é um projeto de teste para demonstração da API",
"userId": "{{userId}}"
}
### Get all projects for a user
GET {{baseUrl}}/projects/user/{{userId}}
### Get project by ID
GET {{baseUrl}}/projects/{{projectId}}
### Update project
PUT {{baseUrl}}/projects/{{projectId}}
Content-Type: application/json
{
"name": "Projeto Atualizado",
"description": "Descrição atualizada do projeto"
}
### Delete project (will fail if there are pending tasks)
DELETE {{baseUrl}}/projects/{{projectId}}
###
# ========================================
# TASK ENDPOINTS
# ========================================
### Create a new task
# @name createTask
POST {{baseUrl}}/tasks
Content-Type: application/json
{
"title": "Tarefa de Exemplo",
"description": "Esta é uma tarefa de teste",
"dueDate": "2025-12-31T23:59:59Z",
"priority": 2,
"projectId": "{{projectId}}",
"userId": "{{userId}}"
}
### Get all tasks for a project
GET {{baseUrl}}/tasks/project/{{projectId}}
### Get task by ID
GET {{baseUrl}}/tasks/{{taskId}}
### Update task details
PUT {{baseUrl}}/tasks/{{taskId}}?userId={{userId}}
Content-Type: application/json
{
"title": "Tarefa Atualizada",
"description": "Descrição atualizada da tarefa",
"dueDate": "2026-01-15T23:59:59Z"
}
### Update task status
PATCH {{baseUrl}}/tasks/{{taskId}}/status?userId={{userId}}
Content-Type: application/json
{
"status": 2
}
### Delete task
DELETE {{baseUrl}}/tasks/{{taskId}}
### Add comment to task
POST {{baseUrl}}/tasks/{{taskId}}/comments
Content-Type: application/json
{
"content": "Este é um comentário de exemplo",
"userId": "{{userId}}"
}
###
# ========================================
# REPORT ENDPOINTS
# ========================================
### Get performance report (Manager only)
GET {{baseUrl}}/reports/performance/{{userId}}?requestingUserRole=2
###
# ========================================
# PRIORITY VALUES
# ========================================
# Low = 1
# Medium = 2
# High = 3
###
# ========================================
# STATUS VALUES
# ========================================
# Pending = 1
# InProgress = 2
# Completed = 3
###
# ========================================
# USER ROLE VALUES
# ========================================
# User = 1
# Manager = 2