mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-29 13:30:36 +00:00
64 lines
1.3 KiB
YAML
64 lines
1.3 KiB
YAML
openapi: "3.0"
|
|
info:
|
|
version: "1.0.0"
|
|
title: "Plume REST API"
|
|
|
|
servers:
|
|
- url: http://localhost:7878/api/v1
|
|
description: Your local instance
|
|
- url: https://baptiste.gelez.xyz/api/v1
|
|
description: Demo instance
|
|
|
|
paths:
|
|
/apps:
|
|
post:
|
|
description:
|
|
Registers an application.
|
|
/posts/{id}:
|
|
get:
|
|
description:
|
|
Retrieves a post by its ID.
|
|
responses:
|
|
'200':
|
|
The post was found
|
|
'403':
|
|
The post exists, but you don't have the rights to fetch it (it is probably a private draft)
|
|
'404':
|
|
The post was not found
|
|
/posts/:
|
|
get:
|
|
description:
|
|
List posts.
|
|
|
|
definitions:
|
|
App:
|
|
type: "object"
|
|
properties:
|
|
name:
|
|
type: "string"
|
|
example: "My app"
|
|
website:
|
|
type: "string"
|
|
example: "https://my.app"
|
|
client_id:
|
|
type: "string"
|
|
example: "My app"
|
|
client_secret:
|
|
type: "string"
|
|
example: "My app"
|
|
Post:
|
|
type: "object"
|
|
properties:
|
|
title:
|
|
type: "string"
|
|
example: "Hello, world!"
|
|
id:
|
|
type: "integer"
|
|
format: "int64"
|
|
example: 42
|
|
subtitle:
|
|
type: "string"
|
|
example: "My first post."
|
|
content:
|
|
type: "string"
|
|
format: "<p>This is my first post. Thanks for reading.</p>"
|