Skip to content

Commit 8ecb3c4

Browse files
Unify API routes and document OpenAPI coverage
1 parent dda3035 commit 8ecb3c4

28 files changed

Lines changed: 2692 additions & 547 deletions

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ One-time scripts and temporary files should be in .tmp. It's in .gitignore so we
3333
There is a public health check endpoint that returns the current version:
3434

3535
```
36-
GET /data/health/
36+
GET /api/health/
3737
```
3838

3939
**Response:**
@@ -51,6 +51,6 @@ This endpoint requires no authentication and can be used to:
5151

5252
**Example:**
5353
```bash
54-
curl https://dev.courses.datatalks.club/data/health/
54+
curl https://dev.courses.datatalks.club/api/health/
5555
# {"status": "ok", "version": "0.1.0"}
5656
```

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ docker exec -it course_management bash
126126

127127
## Getting the data
128128

129-
There are `/data` endpoints for getting the data
129+
There are `/api` endpoints for getting the data
130130

131131
Using them:
132132

@@ -137,8 +137,8 @@ COURSE="fake-course"
137137
HOMEWORK="hw1"
138138

139139
curl \
140-
-H "Authorization: ${TOKEN}" \
141-
"${HOST}/data/${COURSE}/homework/${HOMEWORK}"
140+
-H "Authorization: Token ${TOKEN}" \
141+
"${HOST}/api/courses/${COURSE}/homeworks/${HOMEWORK}/submissions"
142142
```
143143

144144
Make sure to run `make data` to create the admin user and
@@ -243,4 +243,3 @@ See [endpoints.md](./endpoints.md) for complete API documentation including:
243243
- Update Enrollment Certificate
244244
- Create Course Content
245245

246-

0 commit comments

Comments
 (0)