summaryrefslogtreecommitdiff
path: root/docs/src/HTTP-APIs/File-Metadata.md
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-06-10 17:09:47 -0600
committerGitHub <noreply@github.com>2017-06-10 17:09:47 -0600
commite3fb3aba33645ef1c7ba1d1556c806d7c0eb853b (patch)
treee65b5a0dc7579b0af904c487570c5c5ade742f7b /docs/src/HTTP-APIs/File-Metadata.md
parent427dff52c3db481dff38dd1eee83f93e54ea8065 (diff)
parent4d767c13f15b24fdbfcb610589e757a98c931d70 (diff)
Merge pull request #159 from ponzu-cms/ponzu-dev
[cli] adding documentation server for local use
Diffstat (limited to 'docs/src/HTTP-APIs/File-Metadata.md')
-rw-r--r--docs/src/HTTP-APIs/File-Metadata.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/src/HTTP-APIs/File-Metadata.md b/docs/src/HTTP-APIs/File-Metadata.md
new file mode 100644
index 0000000..19d6ab6
--- /dev/null
+++ b/docs/src/HTTP-APIs/File-Metadata.md
@@ -0,0 +1,29 @@
+title: File Metadata HTTP API
+
+Ponzu provides a read-only HTTP API to get metadata about the files that have been uploaded to your system. As a security and bandwidth abuse precaution, the API is only queryable by "slug" which is the normalized filename of the uploaded file.
+
+---
+
+### Endpoints
+
+#### Get File by Slug (single item)
+<kbd>GET</kbd> `/api/uploads?slug=<Slug>`
+
+##### Sample Response
+```javascript
+{
+ "data": [
+ {
+ "uuid": "024a5797-e064-4ee0-abe3-415cb6d3ed18",
+ "id": 6,
+ "slug": "filename.jpg",
+ "timestamp": 1493926453826, // milliseconds since Unix epoch
+ "updated": 1493926453826,
+ "name": "filename.jpg",
+ "path": "/api/uploads/2017/05/filename.jpg",
+ "content_length": 357557,
+ "content_type": "image/jpeg",
+ }
+ ]
+}
+``` \ No newline at end of file