V1.0
Version 1.0.2
Update: V1.0.2 (2021-08-31) Add URL Encode for URI FileName
Update: V1.0.1 (2021-08-23) Add FileSize in PROPERTY API
Update: V1.0.0 (2021-08-19) Release
APIs
API | Method | Action | URI | POST | Return |
---|---|---|---|---|---|
UPLOAD | POST | /api/v1.0/upload/{user} | URI | POST | JSON |
FILES | POST | /api/v1.0/files/{user} | URI | POST | JSON |
DROP | POST | /api/v1.0/drop/{user}/{fileName} | URI | POST | JSON |
PROPERTY | GET | /api/v1.0/property/{user}/{fileName} | URI | - | JSON |
DOWNLOAD | GET | /api/v1.0/download/{user}/{fileName} | URI | - | (binary) |
Example:
- $ curl -X POST -F pass=XXXXXXXX -F file=@file.bin https://update.solid-corp.com/api/v1.0/upload/user
- $ curl -X POST -F pass=XXXXXXXX https://update.solid-corp.com/api/v1.0/files/user
- $ curl -X POST -F pass=XXXXXXXX https://update.solid-corp.com/api/v1.0/drop/user/file.bin
- $ curl https://update.solid-corp.com/api/v1.0/property/user/file.bin
- $ curl https://update.solid-corp.com/api/v1.0/download/user/file.bin
URI
Name | Value | APIs | ||||
---|---|---|---|---|---|---|
UPLOAD | FILES | DROP | PROPERTY | DOWNLOAD | ||
{user} | User ID Text | ✔ | ✔ | ✔ | ✔ | ✔ |
{fileName} | Target File Name (URL Encode) |
- | - | ✔ | ✔ | ✔ |
Example:
- HTML: <img src="https://update.solid-corp.com/api/beta/download/user/image.jpg" />
POST (multipart/form-data)
Name | Value | APIs | ||||
---|---|---|---|---|---|---|
UPLOAD | FILES | DROP | PROPERTY | DOWNLOAD | ||
pass | Password Text | ✔ | ✔ | ✔ | - | - |
file | Base64 (filename: NO URL Encode) |
✔ | - | - | - | - |
JSON
Key | Value | APIs | ||||
---|---|---|---|---|---|---|
UPLOAD | FILES | DROP | PROPERTY | DOWNLOAD | ||
result | Result Code RESULT | ✔ | ✔ | ✔ | ✔ | Error |
description | Description | ✔ | ✔ | ✔ | ✔ | Error |
file | File Name | OK | - | - | OK | - |
md5 | MD5 Hash | OK | - | - | OK | - |
sha1 | SHA1 Hash | OK | - | - | OK | - |
size New | File Size (Bytes) | OK | - | - | OK | - |
date | Last Modify (YYYY/MM/DD) | OK | - | - | OK | - |
time | Last Modify (HH/II/SS) | OK | - | - | OK | - |
timezone | Last Modify (Asia/Tokyo) | OK | - | - | OK | - |
w3c | Last Modify (W3C Format) | OK | - | - | OK | - |
files | Array File Name | - | OK | - | - | - |
Example:
{ "result":"0", "description":"OK", "file":"file.bin", "md5":"29a25648d6d004a40efdb1ceceaeb3b5", "sha1":"daf126cb7b28535f927b38a08170d13f255f16df", "size":"12345", "date":"2021\/08\/17", "time":"17:53:46", "timezone":"Asia\/Tokyo", "w3c":"2021-08-17T17:53:46+09:00" }
{ "result":"0", "description":"OK", "files": [ "file1.bin", "file2.ini", "file3.exe", "file4.txt", "file5.log" }
RESULT
Status | Result | Description |
---|---|---|
OK | 0 | OK |
Error | 1 | File is Empty |
2 | User or Password Error | |
3 | File Not Found | |
4 | Serial No is Empty | |
404 | Page Not Found |
Example:
{ "result":"0", "description":"OK" }
{ "result":"1", "description":"File is Empty" }
{ "result":"2", "description":"User or Password Error" }
{ "result":"3", "description":"File Not Found" }
{ "result":"4", "description":"Serial No is Empty" }
{ "result":"404", "description":"Page Not Found" }