2018-09-19 14:49:34 +00:00
|
|
|
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:
|
2018-10-22 14:22:53 +00:00
|
|
|
/apps:
|
|
|
|
post:
|
|
|
|
description:
|
|
|
|
Registers an application.
|
2018-09-19 14:49:34 +00:00
|
|
|
/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:
|
2018-10-22 14:22:53 +00:00
|
|
|
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"
|
2018-09-19 14:49:34 +00:00
|
|
|
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>"
|