Department and Member Operations

Updated: 2022-11-22

Member and Department Synchronization API

(Note: The following interfaces require enterprise account synchronization feature to be enabled.)

Enterprise Member and Department API

Other APIs

API Domain

Host: app.fileshow.com

Add or Modify Synchronized Member

POST /m-open/1/ent/add_sync_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
out_id Yes Unique ID of the member in the external system
member_name Yes Display name of the member
account Yes Login account of the member in the external system
member_email No Email address of the member
member_phone No Contact phone number of the member
member_title No Position/title of the member
password No Required if account password needs verification by server
state - Account status: 1 for enabled during add, 0 for disabled during modify
expire No Temporary account expiration date in Unix timestamp (date part only), 0 removes expiration date
group_out_ids No Unique IDs of departments where the member belongs in the external system; empty string denotes top-level; not specifying during add means member won't appear in member management
leader_out_id No Unique ID of the direct supervisor in the external system; use empty string to remove supervisor attribute during modify
leader_account No Login account of the direct supervisor in the external system; use empty string to remove supervisor attribute during modify
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Note: When adding a member, if group_out_ids parameter is not specified, the member won't appear in member management in the enterprise backend. You also need to call Add Members to Synchronized Department.

Response

HTTP 200

{
  "member_id": User ID (number),
  "state": User state, 1 for enabled, 0 for disabled (number)
}

Note: Enabled accounts exceeding enterprise account limits will be forcefully disabled.


Remove Synchronized Member

POST /m-open/1/ent/del_sync_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
dateline Yes Current Unix timestamp in seconds
members Yes Unique IDs of members in the external system, separated by commas
sign Yes Signature

Response

HTTP 200


Add or Modify Synchronized Department

POST /m-open/1/ent/add_sync_group HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
out_id Yes Unique ID of the department in the external system
name Yes Display name of the department
parent_out_id No Unique ID of the parent department in the external system; empty string indicates top-level; used for moving department during modify
orderby No Display order, ascending numeric order
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Remove Synchronized Department

POST /m-open/1/ent/del_sync_group HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
groups Yes Unique IDs of departments in the external system, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Add Members to Synchronized Department

POST /m-open/1/ent/add_sync_group_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
group_out_id No Unique ID of the department in the external system; not specifying denotes top-level
members Yes Unique IDs of members in the external system, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Remove Members from Synchronized Department

POST /m-open/1/ent/del_sync_group_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
group_out_id No Unique ID of the department in the external system; not specifying denotes top-level
members Yes Unique IDs of members in the external system, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Remove Department from Synchronized Member

POST /m-open/1/ent/del_sync_member_group HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
members Yes Unique IDs of members in the external system, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Get Member Information by External Account

POST /m-open/1/ent/get_member_by_out_id HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
out_ids - External member IDs, separated by commas
user_ids - External member login accounts, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Only one of out_ids or user_ids needs to be provided.

Response Format

JSON

Response

{
    "{out_id}":
    {
        "member_id": Member ID,
        "account": Member external system login account,
        "member_name": Member display name,
        "member_email": Member email,
        "member_phone": Member phone number,
        "member_title": Member title,
        "state": Member status, `1` for enabled, `0` for disabled,
        "expire": Temporary account expiration Unix timestamp in seconds; not returned if no expiration date
    },
    ...
}
Field Type Description
{out_id} string Unique external system member ID
member_id number Member ID
account string Member external system login account
member_name string Member display name
member_email string Member email
member_phone string Member phone number
member_title string Member title
state number Member status, 1 for enabled, 0 for disabled
expire number Temporary account expiration timestamp in seconds; not returned if no expiration date

Get Department Information by External Department ID

POST /m-open/1/ent/get_group_by_out_id HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
out_ids - External department IDs, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response Format

JSON

Response

{
    "{out_id}":
    {
        "group_id": Department ID (number),
        "name": Department name (string),
        "out_id": External department ID (string),
        "parent_id": Parent department ID (number)
    },
    ...
}

Add Administrator

POST /m-open/1/ent/add_sync_admin HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
out_id Yes Unique ID of the member in the external system
member_email No Member email
type No 1 for super administrator, 0 for administrator
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Add Member

POST /m-open/1/ent/add_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
account Yes Login account (must be an email for public cloud)
password Yes Initial password
member_name Yes Display name
member_phone No Contact phone number
member_title No Position title
state No Account status, 1 for enabled, 0 for disabled
group_path No Member's department path
create_personal_org No Initialize personal library, 1 for yes, 0 for no
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Where group_path indicates the hierarchical relationship of departments, e.g., Beijing Branch/Sales Department.

Response

HTTP 200

{
  "member_id": User ID (number),
  "state": User status, `1` for enabled, `0` for disabled (number)
}

Note: If the number of enabled accounts exceeds the enterprise account limit, they will be forcibly disabled.


Modify Member

POST /m-open/1/ent/set_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
account Yes Login account
member_name No Display name
member_phone No Contact phone number
member_title No Position title
password No Password (not supported for public cloud)
state No Account status, 1 for enabled, 0 for disabled
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200

{
  "member_id": User ID (number),
  "state": User status, `1` for enabled, `0` for disabled (number)
}

Remove Member

POST /m-open/1/ent/del_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
members Yes Member login accounts, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Add Department

POST /m-open/1/ent/add_group HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
group_name Yes Display name of the department
parent_group_path No If the department is under another department, specify the parent department's path; empty string or not provided indicates top-level
orderby No Display order, displayed numerically from smallest to largest
state No Department status, 1 for enabled, 0 for disabled
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200

{
    "group_id": Department ID (number)
}

Modify Department

POST /m-open/1/ent/set_group HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
group_path No Department path to be modified
group_name No Display name
parent_group_path No Move department: specify the parent department's path; empty string indicates moving to top level
orderby No Display order, displayed numerically from smallest to largest
state No Department status, 1 for enabled, 0 for disabled
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Remove Department

POST /m-open/1/ent/del_group HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
groups No Department paths to be removed, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Add Department Member

POST /m-open/1/ent/add_group_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
group_path Yes Department path; empty string indicates top level
members Yes Member accounts, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Remove Member from Department

POST /m-open/1/ent/del_group_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
group_path Yes Department path; empty string indicates top level
members Yes Member accounts, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Remove Member's Department

POST /m-open/1/ent/del_member_group HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
members Yes Member accounts, separated by commas
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response

HTTP 200


Member List

POST /m-open/1/ent/get_members HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
start No Starting position of records, default is 0
size No Number of records to return, default is 20
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response Format

JSON

Response

{
    list:
    [
        {
            "member_id": Member ID (number),
            "out_id": Member's unique ID in external system (string),
            "account": Member's login account in external system (string),
            "member_name": Member's display name (string),
            "member_email": Member's email (string),
            "member_phone": Contact phone number (string),
            "member_title": Position title (string),
            "state": Member's status, `1` for enabled, `0` for disabled (number),
            "expire": Temporary account expiration timestamp in seconds, not returned if there is no expiration (number)
        },
        ...
    ],
    count: Total number of members (number)
}

Get Member Information

POST /m-open/1/ent/get_member HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
member_id No Member ID
out_id No Member's unique ID in external system
account No Member's login account in external system
email No For public cloud accounts, search by login email
show_groups No Whether to return the departments the member belongs to; 1 to return, 0 not to return, default is not to return
show_orgs No Whether to return the libraries the member is involved in; 1 to return, 0 not to return, default is not to return
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Note: One of member_id, out_id, email, or account must be provided in the parameters.

Response Format

JSON

Response

{
    "member_id": Member ID (number),
    "out_id": Member's unique ID in external system (string),
    "account": Member's login account in external system (string),
    "member_name": Member's display name (string),
    "member_email": Member's email (string),
    "member_phone": Contact phone number (string),
    "member_title": Position title (string),
    "state": Member's status, `1` for enabled, `0` for disabled (number),
    "expire": Temporary account expiration timestamp in seconds, not returned if there is no expiration (number)
    "groups" :
    [
        {
            "id": Department ID (number),
            "name": Department name (string),
            "group_code": Internal code (string),
            "out_id": Department's unique ID in external system (number)
        },
        ...
    ],
    "orgs":
    [
        {
            "id": Library ID (number),
            "name": Library name (string),
            "type": Type, `20` for personal library (number),
            "owner": Library owner (string),
            "owner_id": Library owner ID (number),
            "member_count": Number of members in the library (number),
            "size_total": Library space quota in bytes, `-1` indicates unlimited (number),
            "size_used": Used space in the library in bytes (number),
            "mount_id": Library space ID (number),
            "roles": {
                "role_id": Role name (string),
                ...
                // Multiple roles may exist; role information is not returned if the member is the library owner
            }
        },
        ...
    ]
}

Department List

POST /m-open/1/ent/get_groups HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response Format

JSON

Response

[
    {
        "id": Department ID (number),
        "name": Department name (string),
        "out_id": Department's unique ID in external system (string),
        "parent_id": Parent department ID, `0` for top level (number)
    }
]

List Members in a Department

POST /m-open/1/ent/get_group_members HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
group_id Yes Department ID
group_path No Department path
out_id No External system department ID
show_child No 1 to return members within subordinate departments, default 0 not to return
start No Starting position of records, default 0
size No Number of records to return, default 20
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

One of group_id, out_id, or group_path must be provided.

Response Format

JSON

Response

{
    list:
    [
        {
            "member_id": Member ID (number),
            "out_id": Member's unique ID in external system (string),
            "account": Member's login account in external system (string),
            "member_name": Member's display name (string),
            "member_email": Member's email (string),
            "member_phone": Contact phone number (string),
            "member_title": Position title (string),
            "state": Member's status, `1` for enabled, `0` for disabled (number),
            "expire": Temporary account expiration timestamp in seconds, not returned if there is no expiration (number)
        },
        ...
    ],
    count: Total number of members (number)
}

Role List

POST /m-open/1/ent/get_roles HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Response Format

JSON

Response

[
    {
        "id": Role ID (number),
        "name": Role name (string),
    },
    ...
]

Management Logs

POST /m-open/1/ent/log HTTP/1.1

Request Parameters

Parameter Required Description
client_id Yes client_id obtained from enterprise authorization management
type No Type, default returns all types
orderby No asc for ascending order, default desc for descending order
start_dateline No Unix timestamp in seconds; retrieves logs where operation time >= start_dateline, default no limit
end_dateline No Unix timestamp in seconds; retrieves logs where operation time < end_dateline, default no limit
start No Starting position, default 0
size No Number of logs to retrieve, default 100, maximum 1000
dateline Yes Current Unix timestamp in seconds
sign Yes Signature

Type Values

Type Description
1 Sub-administrator
2 Member information
3 Enterprise settings
4 Organizational structure
5 Roles
6 Member devices
7 Storage points
8 File libraries
9 Development authorization

Response Format

JSON

Response

{
    "total": Total number of matched logs (number),
    "list": [
        {
            "type": Type (number),
            "admin": Administrator (string),
            "content": Log content (string),
            "ip": IP address (string),
            "dateline": Operation time in seconds (number)
        },
        ...
    ]
}