Authentication

Basic Information

Description

Authenticate requests by setting the Authorization header with a valid API key.

We accept just the API key:

 "Authorization": "14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"

or Basic type and the API key:

"Authorization": "Basic 14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"

Make sure you've stored your API key somewhere secure and never share them publicly.

Image Upload

Basic Information

Path: /api/v2/upload

Method: POST

Description

Image Upload API。

Parameters

Headers

Name Value Required Example Remark
Content-Type multipart/form-data Required
Authorization Not Required Refer Authentication

Body

Name Type Required Example Remark
smfile file Required The image to be uploaded.
format text Not Required json Return Type: json、xml. Default json

Return Data

Name Type Required Default Value Remark Other Info
success boolean Required Request Status
code string Required Request Status Code

Enum: error,success

message string Required Message
data object Not Required
├─ width integer Required Width
├─ height integer Required Height
├─ filename string Required Filename
├─ storename string Required Store name
├─ size integer Required Image Size
├─ path string Required Image Path
├─ hash stringRequired Image Deletion HASH
├─ urlstring Required Image URL

format: uri

├─ delete string Required Image Deletion Link

format: uri

├─ page string Required Image Page Link

format: uri

RequestId string Required Request ID

IP Based Temporary Upload History

Basic Information

Path: /api/v2/history

Method: GET

Description

Get IP-based temporary upload history, this will return upload data for your IP in the previous hour.

Parameters

Query

Name Required Example Remark
format Not Required json Return Type: json、xml. Default json

Return Data

Name Type Required Default Value Remark Other Info
success boolean Required Status
code string Required
message string Required Message
data object [] Not Required

item type: object

├─ width integer Required Width
├─ height integer Required Height
├─ filename string Required Original Image Name
├─ storename string Required Store Image Name
├─ size integer Required Image Size
├─ path string Required Image Path
├─ hash string RequiredImage Deletion HASH
├─ url string Required Image URL
├─ delete string Required Image Deletion Link
├─ page string Required Image Page Link
RequestId string Required Request ID

Upload History

Basic Information

Path: /api/v2/upload_history

Method: GET

Description

Get image upload history.

Parameters

Headers

Name Value Required Remark
Content-Type multipart/form-data Required
Authorization Required Refer Authentication

Return Data

Name Type Required Default Value Remark Other Info
success boolean Required Status
code string Required
message string Required Message
data object [] Not Required

item type: object

├─ width integer Required Width
├─ height integer Required Height
├─ filename string Required Original Image Name
├─ storename string Required Store Image Name
├─ size integer Required Image Size
├─ path string Required Image Path
├─ created_at string Required Timestamp of creation
├─ hash string RequiredImage Deletion HASH
├─ url string Required Image URL
├─ delete string Required Image Deletion Link
├─ page string Required Image Page Link
RequestId string Required Request ID

User Basic Information

Basic Information

Path: /api/v2/profile

Method: POST

Description

Return Basic information.

Parameters

Headers

Name Value Required Remark
Content-Type multipart/form-data Required
Authorization Required Refer Authentication

Return Data

Name Type Required Default Value Remark Other Info
success boolean Required Status
code string Required
message string Required Message
data object [] Not Required

item type: object

├─ username string Required Username
├─ email string Required Email
├─ role string Required User Group Name
├─ group_expire string Required User Group Expire Date
├─ email_verified number Required Email Verification(0 for not verified, 1 for verified)
├─ disk_usage string Required Disk Usage
├─ disk_usage_raw number Required Disk RAW Usage(Byte)
├─ disk_limit string Required Disk Limit
├─ disk_limit_raw number Required Disk RAW Limit(Byte)
RequestId string Required Request ID

Image Deletion

Basic Information

Path: /api/v2/delete/{hash}

Method: GET

Description

API for image deletion.

Parameters

Path

Name Example Remark
hash lYz1Be2MZrJb3FhUpCaciHSIWd Image Deletion ID

Query

Name Required Example Remark
format Not Required json Return Type: json、xml. Default json

Return Data

NameTypeRequiredDeafault ValueRemarkOther Info
success boolean Not Required Status
code string Not Required Status Code
message string Not Required Message
RequestId string Not Required Request ID

Clear IP Based Temporary Upload History

Basic Information

Path: /api/v2/clear

Method: GET

Description

Clear the Upload History for your IP.

Parameters

Query

Name Required Example Remark
format Not Required json Return Type: json、xml. Default json

Return Data

Name Type Required Default Value Remark Other Info
success boolean Not Required Request Status
code string Not Required Request Status Code
message string Not Required Message
RequestId string Not Required Request ID