Help Center/ KooDrive/ API Reference/ API/ Space Management/ Obtains space information.
Updated on 2025-08-28 GMT+08:00

Obtains space information.

Function

Obtains space information. (A user may have multiple spaces. This API is used to obtain the space information list.)

URI

GET /koodrive/ose/v2/space/{owner_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

owner_id

Yes

String

User ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

type

No

String

Space type.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-User-Id

Yes

String

User ID, which is used for app authentication.

X-Date

Yes

String

Date, which is used for app authentication.

Host

Yes

String

Address, which is used for app authentication.

Authorization

Yes

String

  1. The format is Bearer {app_access_token}. The application-level token needs to be passed for calling by an application server. The token is obtained by calling an API using clientid and clientSecret obtained during application creation. 2. The application is the KooDrive server.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

code

Integer

Information code.

msg

String

Information.

data

Array of SpaceInfoV2 objects

Space list.

Table 5 SpaceInfoV2

Parameter

Type

Description

type

String

Owner type. 0: department space; 1: individual space; 2: group space.

status

String

Status.

ownerId

String

Space owner.

  1. For a department space, the department ID is returned.

  2. For an individual space, the user ID is returned.

  3. For a group space, the group ID is returned.

containerId

String

Space ID.

bizRootFileId

String

ID of the service root directory, which stores unencrypted common files.

bizSboxFileId

String

ID of the service safe directory, which stores encrypted files.

capacity

String

Space size.

spaceUsed

String

Size of the used space.

tenantId

String

Tenant ID.

creator

String

Creator.

modifier

String

Modifier ID.

rootFileId

String

ID of the space root directory.

Example Requests

Obtains space information. (A user may have multiple spaces. This API is used to obtain the space information list.)

GET /koodrive/ose/v2/space/12156464

Authorization: HMAC-SHA256 AppId=a378331eca141163119eb602adb67b7802cc79cd33ba44c7d2fe61d1586c96a1,SignedHeaders=host;x-date;x-user-id,Signature=bd355f202be40f95bf9510fd7bd48ad711a7d144c01df07d515ee0fbf3a47416
X-User-Id: 1505084218764547200
Host: 10.32.45.165
X-Date: 20240909T033325Z

Example Responses

Status code: 200

Response to the request for obtaining space information.

{
  "data" : {
    "tenantId" : "0929b397a3424384b32cf8f96d9f35e4",
    "creator" : "1465814559892958208",
    "modifier" : "1465814559892958208",
    "ownerId" : 1517293342025685000,
    "type" : 1,
    "status" : 0,
    "capacity" : 1,
    "spaceUsed" : 0,
    "containerId" : "IAACk0hRXpq9DAWkA1537830432752646913",
    "rootFileId" : "HFNKeRWAxXJU4ittbTKM7OQCFOOojMDWV",
    "bizRootFileId" : "DFFemr0MBaQArootIAACk0hRXpq9DAWkA1537830432752646913",
    "bizSboxFileId" : "DFFemr0MBaQAsboxIAACk0hRXpq9DAWkA1537830432752646913",
    "operatorId" : 1465814559892958200,
    "name" : "121-2"
  },
  "code" : 0,
  "msg" : "Operation successful."
}

Status Codes

Status Code

Description

200

Response to the request for obtaining space information.