Repository navigation
API Reference
Mason Batchelor edited this page Mar 6, 2026
·
1 revision
All endpoints follow the RealWorld API Spec.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/users |
No | Register |
| POST | /api/users/login |
No | Login |
| GET | /api/user |
Yes | Get current user |
| PUT | /api/user |
Yes | Update current user |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/articles |
Optional | List articles (supports tag, author, favorited, limit, offset) |
| GET | /api/articles/feed |
Yes | Get feed (articles from followed users) |
| POST | /api/articles |
Yes | Create article |
| GET | /api/articles/:slug |
Optional | Get article |
| PUT | /api/articles/:slug |
Yes | Update article |
| DELETE | /api/articles/:slug |
Yes | Delete article |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/articles/:slug/comments |
Optional | List comments |
| POST | /api/articles/:slug/comments |
Yes | Add comment |
| DELETE | /api/articles/:slug/comments/:id |
Yes | Delete comment |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/profiles/:username |
Optional | Get profile |
| POST | /api/profiles/:username/follow |
Yes | Follow user |
| DELETE | /api/profiles/:username/follow |
Yes | Unfollow user |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/articles/:slug/favorite |
Yes | Favorite article |
| DELETE | /api/articles/:slug/favorite |
Yes | Unfavorite article |
Available at /graphql. Schema defined in src/main/resources/schema/schema.graphqls.
-
createUser(input)— Register -
login(email, password)— Login -
updateUser(changes)— Update profile -
createArticle(input)— Create article -
updateArticle(slug, changes)— Update article
-
articles(first, after, tag, author)— List with cursor pagination -
article(slug)— Get single article -
feed(first, after)— Followed users articles -
profile(username)— User profile