Files
fnx_web/res/template/apidoc.html

93 lines
3.2 KiB
HTML
Raw Normal View History

{{define "apidoc"}}<!DOCTYPE html>
<html>
2017-11-10 12:39:55 +01:00
<head>
{{template "meta_tags" "API Documentation"}}
{{template "user_style" .}}
2018-07-09 21:41:17 +02:00
<style>
.api_doc_details{
border-top: 1px solid;
border-bottom: 1px solid;
2019-07-16 22:07:10 +02:00
margin: 15px 0 15px 0;
2018-07-09 21:41:17 +02:00
}
.api_doc_details > summary {
padding: 2px;
font-family: monospace;
}
.api_doc_details > summary > .method {
display: inline-block;
width: 80px;
}
.api_doc_details > div {
padding: 8px;
}
.api_doc_details.request_get{ border-color: #3636ff; background-color: rgba(32, 32, 255, 0.2);} /* GET requests */
.api_doc_details.request_post{ border-color: #00d000; background-color: rgba(0, 255, 0, 0.05);} /* POST requests */
.api_doc_details.request_delete{border-color: #B00000; background-color: rgba(255, 0, 0, 0.05);} /* DELETE requests */
.api_doc_details.request_put{ border-color: #B06000; background-color: rgba(255, 128, 0, 0.05);} /* PUT requests */
.api_doc_details.request_patch{ border-color: #6000B0; background-color: rgba(128, 0, 255, 0.1);} /* PATCH requests */
</style>
2017-11-10 12:39:55 +01:00
</head>
<body>
2019-09-17 23:38:40 +02:00
{{template "page_top" .}}
<h1>Pixeldrain API Documentation</h1>
<div class="page_content"><div class="limit_width">
2017-11-10 12:39:55 +01:00
<p>
Welcome to the Pixeldrain API documentation.
<br/>
2018-06-21 23:41:50 +02:00
The methods for uploading and retrieving files don't require an
API key. The methods for creating and retrieving lists also
don't require an API key. All methods which delete or modify a
2017-11-10 12:39:55 +01:00
resource <strong>do</strong> require an API key.
<br/>
API keys can be obtained from the login API.
2018-06-07 21:03:35 +02:00
</p>
<p>
Some JSON responses include fields which end in "_href" (some
people don't know this, but "href" stands for "Hypertext
Reference", the more you know). These point to different places
in the API, which you can retrieve with a GET request. The path
is to be appended to the API URL, so "/file/someid/thumbnail"
becomes "{{apiUrl}}/file/someid/thumbnail".
</p>
<p>
The base URL for the API is "{{apiUrl}}", all paths below are
relative to that URL.
2017-11-10 12:39:55 +01:00
</p>
2018-06-21 23:41:50 +02:00
2018-08-06 23:33:03 +02:00
<h2>Form value order</h2>
<p>
I recommend you put files at the end of every file upload form.
By doing this the pixeldrain server can respond to malformed
requests before the file upload finishes and this may save you a
lot of time and bandwidth when uploading large files. Make sure
your HTTP client has support for premature responses, pixeldrain
uses them a lot. If the server responds before your request is
finished it will always indicate an error and you may abort the
connection.
</p>
2017-11-10 12:39:55 +01:00
<h2>File Methods</h2>
{{template "api-file-post"}}
{{template "api-file-id-get"}}
{{template "api-file-id-info-get"}}
{{template "api-file-id-thumbnail-get"}}
2019-02-12 21:51:01 +01:00
{{/*template "api-file-id-delete"*/}}
2018-06-21 23:41:50 +02:00
2017-11-10 12:39:55 +01:00
<h2>List Methods</h2>
{{template "api-list-post"}}
2017-12-11 23:21:08 +01:00
{{template "api-list-get"}}
2019-07-06 18:41:16 +02:00
<h2>Filesystem Methods</h2>
{{template "api-filesystem-path-post"}}
{{template "api-filesystem-path-get"}}
{{template "api-filesystem-path-delete"}}
2019-09-17 23:38:40 +02:00
</div></div>
{{template "page_bottom" .}}
2017-11-10 12:39:55 +01:00
{{template "analytics"}}
</body>
</html>
2018-06-21 23:41:50 +02:00
{{end}}