Pastebin API
INTRO
API documentation of https://foutaise.org/paste/
GET https://foutaise.org/paste/api/help
Display this API documentation.
Response
text/html
POST https://foutaise.org/paste/api/pastes
Add a paste.
Request data
data: multipart/form-data (required)
Content of the new paste.
Response
text/plain: url of new paste
Example
curl -F 'data=<-' https://foutaise.org/paste/api/pastes/ < file
GET https://foutaise.org/paste/api/pastes
List available pastes.
Request header
Authorization (required)
The Authorization header must start with Apikey, followed by the user's API Key.
Response
application/json: array of objects with the following properties
{
url: string,
mimetype: string,
inserttime: string
}
Example
curl -H "Authorization: Apikey <your-api-key>" \
https://foutaise.org/paste/api/pastes
DELETE https://foutaise.org/paste/api/pastes/{pasteid}
Delete a paste.
Request header
Authorization (required)
The Authorization header must start with Apikey, followed by the user's API Key.
URI parameter
pasteid: string (required)
Id of the paste to delete.
Example
curl -H "Authorization: Apikey <your-api-key>" \
-X DELETE \
https://foutaise.org/paste/api/pastes/9238f7b6ff
DELETE https://foutaise.org/paste/api/pastes/purge/{ndays}
Purge pastes older than {ndays}.
Request header
Authorization (required)
The Authorization header must start with Apikey, followed by the user's API Key.
URI parameter
ndays: uint (required)
Number of days before pastes deletion.
Example
curl -H "Authorization: Apikey <your-api-key>" \
-X DELETE \
https://foutaise.org/paste/api/pastes/purge/21