Partner API
Updated: 2021-05-14
This API provides various functionalities for managing enterprises within the Fileshow system. Below are the sections and corresponding functionalities:
- Create an Enterprise
- Retrieve Enterprise Information
- List Enterprises
- Place an Order
- Get Admin Console Login Link
- Get Developer Authorization
- Get Enterprise Statistics
- Set Daily External Link Traffic Limit
API Domain
Host: app.fileshow.com
Create an Enterprise
Request
POST /m-api/1/thirdparty/create_ent HTTP/1.1
Parameters
Parameter | Required | Description |
---|---|---|
client_id | Yes | The client_id assigned by Fileshow. |
out_id | Yes | The unique ID of the enterprise in the partner's system. |
ent_name | Yes | The name of the enterprise. |
member_count | No | The member limit; defaults to 1000 if not provided. |
days | No | Trial days; defaults to three months, with a maximum of 90 days. |
space | No | Storage space in GB; defaults to 500 , with a maximum of 51200 GB (50 TB). |
account | No | Admin account; if not provided, no admin account is created. Must be globally unique. |
dateline | Yes | The current Unix timestamp in seconds. |
sign | Yes | The signature. |
Extended Parameters
Used for passing special initial data for the enterprise. The prefix for these parameters is __setting_
, e.g., __setting_site_url
.
Response
Success HTTP 200
{
"id": Enterprise unique ID (number),
"end_dateline": Expiration date, Unix timestamp (number),
"account": Admin account, if not specified in parameters then not returned (string),
"password": Admin password, if admin account is not specified then not returned (string)
}
Retrieve Enterprise Information
Request
POST /m-api/1/thirdparty/ent_info HTTP/1.1
Parameters
Parameter | Required | Description |
---|---|---|
client_id | Yes | The client_id assigned by Fileshow. |
out_id | Yes | The unique ID of the enterprise in the partner's system. |
dateline | Yes | The current Unix timestamp in seconds. |
sign | Yes | The signature. |
Response
Success HTTP 200
{
"id": Enterprise ID (number),
"name": Enterprise name (string),
"trial": Indicates if trial (1 for trial, 0 for paid) (number),
"end_dateline": Expiration date, Unix timestamp (number),
"member_limit": Member limit (number),
"member_count": Current number of members (number),
"space": Space limit in bytes (number),
"size": Used space in bytes (number)
}
List Enterprises
Request
POST /m-api/1/thirdparty/ent_list HTTP/1.1
Parameters
Parameter | Required | Description |
---|---|---|
client_id | Yes | The client_id assigned by Fileshow. |
begin_date | No | Fetch enterprises with creation date >= begin_date , format: YYYY-MM-DD |
end_date | No | Fetch enterprises with creation date < end_date , format: YYYY-MM-DD |
start | No | Start position; defaults to 0 . |
size | No | Number of records to fetch; defaults to 100 , maximum 1000 . |
order | No | Sorting order; defaults to asc (ascending). Use desc for descending order. |
dateline | Yes | The current Unix timestamp in seconds. |
sign | Yes | The signature. |
Response
Success HTTP 200
{
"list": [
{
"id": Enterprise ID (number),
"out_id": Unique ID in partner system (string),
"name": Enterprise name (string),
"trial": Indicates if trial (1 for trial, 0 for paid) (number),
"end_dateline": Expiration date, Unix timestamp (number),
"member_limit": Member limit (number),
"member_count": Current number of members (number),
"space": Space limit in bytes (number),
"size": Used space in bytes (number),
"account": Admin account (string)
},
...
]
}
Place an Order
Request
POST /m-api/1/thirdparty/order HTTP/1.1
This API can only be called by authorized agents, and the operation takes effect immediately.
Common Parameters
Parameter | Required | Description |
---|---|---|
client_id | Yes | The client_id assigned by Fileshow. |
out_id | Yes | The unique ID of the enterprise in the partner's system. |
dateline | Yes | The current Unix timestamp in seconds. |
sign | Yes | The signature. |
Trial Extension Parameters
Parameter | Required | Description |
---|---|---|
type | Yes | Fixed value trial.extend . |
days | Yes | Number of days to extend the trial. |
Purchase Parameters
Parameter | Required | Description |
---|---|---|
type | Yes | Fixed value subscribe . |
member_count | Yes | Number of members. |
space | Yes | Storage space in GB. |
month | Yes | Number of months for the purchase. |
Renewal Parameters
Parameter | Required | Description |
---|---|---|
type | Yes | Fixed value renew . |
month | Yes | Number of months for renewal. |
Upgrade Parameters
Parameter | Required | Description |
---|---|---|
type | Yes | Fixed value upgrade . |
member_count | Yes | Number of additional members. |
space | Yes | Additional storage space in GB. |
Unsubscribe Parameters
Parameter | Required | Description |
---|---|---|
type | Yes | Fixed value unsubscribe . |
Response
Success HTTP 200
Get Developer Authorization
Request
POST /m-api/1/thirdparty/get_client_id HTTP/1.1
Parameters
Parameter | Required | Description |
---|---|---|
client_id | Yes | The client_id assigned by Fileshow. |
out_id | Yes | The unique ID of the enterprise in the partner's system. |
title | Yes | Caller name, used for notes. |
dateline | Yes | The current Unix timestamp in seconds. |
sign | Yes | The signature. |
Response
Success HTTP 200
{
"client_id": "Authorization ID",
"client_secret": "Authorization Secret"
}
Get Admin Console Login Link
Request
POST /m-api/1/thirdparty/ent_sso_url HTTP/1.1
Parameters
Parameter | Required | Description |
---|---|---|
client_id | Yes | The client_id assigned by Fileshow. |
out_id | Yes | The unique ID of the enterprise in the partner's system. |
dateline | Yes | The current Unix timestamp in seconds. |
sign | Yes | The signature. |
Response
Success HTTP 200
{
"url": "Admin console login link (string)"
}
Get Enterprise Statistics
POST /m-api/1/thirdparty/ent_daily_stats HTTP/1.1
Request Parameters
Parameter | Required | Description |
---|---|---|
client_id | Yes | The client_id assigned by Fileshow. |
out_id | Yes | The unique ID of the enterprise in the partner's system. |
type | Yes | Type of statistics. Use flow for querying traffic data. |
start_date | Yes | Start date (inclusive) in the format YYYY-MM-DD , e.g., 2021-02-23 . |
end_date | No | End date (inclusive) in the format YYYY-MM-DD . If not provided, defaults to the latest available day. |
dateline | Yes | The current Unix timestamp in seconds. |
sign | Yes | The signature for the request. |
Notes
- The statistics are not real-time. Data for a given day is available the following day.
- A single query can return up to one year's worth of data.
Response
Success HTTP 200
{
"list": [
{
"date": "2021-02-23", // The date of the statistics (string)
"download": 123456, // Regular download traffic in bytes (number)
"link": 789012, // External link download traffic in bytes (number)
"preview": 345678 // Preview traffic in bytes (number)
},
...
]
}
Set Daily External Link Traffic Limit
POST /m-api/1/thirdparty/set_ent_setting HTTP/1.1
Request Parameters
Parameter | Required | Description |
---|---|---|
client_id | Yes | The client_id assigned by Fileshow. |
out_id | Yes | The unique ID of the enterprise in the partner's system. |
max_link_flow | Yes | The daily external link traffic limit in bytes. Use -1 for unlimited. |
dateline | Yes | The current Unix timestamp in seconds. |
sign | Yes | The signature for the request. |
Notes
- This setting is ineffective for trial enterprises.
Response
Success HTTP 200