Help Center/ KooDrive/ API Reference/ API/ Space Management/ Listing Departments Spaces
Updated on 2024-07-30 GMT+08:00

Listing Departments Spaces

Function

List department spaces.

URI

GET /koodrive/ose/v1/space/departmentList

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

offset

Yes

String

Offset. Minimum value: 0.

limit

Yes

String

Maximum number of records to be returned. Value range: 1 to 100.

keyWord

No

String

Search keyword. You can use name and administrator as the search criteria.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Authorization

Yes

String

Access token. Token authentication is used to call KooDrive APIs. A token indicates the permission. When an API is called, the token is added to the request header to obtain the operation permission. For details about how to obtain an access token, see the corresponding developer guide. The format is Bearer+{access_token}.

X-Traceid

No

String

Message log trace ID. The value contains 58 bits.

language

No

String

Language code, which complies with the internationalization specifications. For example, en-US indicates English (United States). English (United States) is used by default.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

String

Error code.

msg

String

Error message.

total

String

Total number of records.

departments

Array of departmentSpaceInfo objects

Department space information.

Table 4 departmentSpaceInfo

Parameter

Type

Description

id

String

Department ID.

parentId

String

ID of the parent department in KooDrive.

name

String

Department name.

administrators

String

Administrators of the department.

status

String

Space status.

capacity

Long

Space size.

spaceUsed

String

Size of the used space.

containerId

String

Space ID.

bizRootFileId

String

ID of the KooDrive root directory.

tenantId

String

Tenant ID.

userNum

Integer

Number of users.

createTime

String

Creation time.

modifier

String

ID of the user who updated the information.

updateTime

String

Update time.

ownerId

String

Owner ID.

bizSboxFileId

String

ID of the safe root directory.

Example Requests

Lists the spaces of up to 10 departments.

GET /koodrive/cloudfile/v1/space/departmentList?offset=0&limit=10

Authorization:Bearer+10f88**********4791e9ff

Example Responses

Status code: 200

Department space list.

{
  "total" : 364,
  "departments" : [ {
    "tenantId" : "40086000004871666",
    "creator" : "369528171409614001",
    "createTime" : "2023-11-14T20:39:06.000Z",
    "modifier" : "369528171409614001",
    "updateTime" : "2023-12-26T11:40:08.000Z",
    "ownerId" : "1289173668999530369",
    "status" : 0,
    "capacity" : 1,
    "spaceUsed" : 654777,
    "containerId" : "IAADfsBFCO6WtAtuAb7e92cde625843cfb7f4ceba802e0b",
    "bizRootFileId" : "DEUI7pa0C24ArootIAADfsBFCO6WtAtuAb7e92cde625843cfb7f4ceba802e0b",
    "bizSboxFileId" : "DEUI7pa0C24AsboxIAADfsBFCO6WtAtuAb7e92cde625843cfb7f4ceba802e0b",
    "id" : "1289173668999530369",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953477584",
    "userNum" : 1
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173650183882753",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953475619"
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173631275960193",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953473454"
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173612200265729",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953470101"
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173593258788737",
    "parentId" : "1289171275545118721",
    "name" : "Department 169995346896"
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173574392809473",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953466973"
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173555140953985",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953463567"
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173535931041664",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953461741"
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173517174114305",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953459399"
  }, {
    "tenantId" : "40086000004871666",
    "id" : "1289173498115196929",
    "parentId" : "1289171275545118721",
    "name" : "Department 1699953457405"
  } ],
  "code" : 0,
  "msg" : "OK"
}

Status Codes

Status Code

Description

200

Department space list.