Skip to main content
Version: V4.0

Space Management API


Get Space List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
space_idStringBodySpace ID
space_nameStringBodySpace name
parent_space_idStringBodyParent space ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_space_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0db",
"space_name": "my room",
"parent_space_id": "f8b5a73f8dd84abaa94dcs248be49b0db"
}
]
}

Failure Return Example

See Failure Return Example



Get Space Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
space_idStringBodyYesSpace ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
space_nameStringBodySpace ID
parent_space_idStringBodyParent space ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_space_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"space_id": "r31adc223cc4b3bedb6bd4742dedcfa53"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"space_name": "my room",
"parent_space_id": "f8b5a73f8dd84abaa94dcs248be49b0db"
}
}

Failure Return Example

See Failure Return Example



Create Space Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
space_nameStringBodyYesSpace name
parent_space_idStringBodyYesParent space ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
space_idStringBodySpace ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_space_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"space_name": "my room",
"parent_space_id": "f8b5a73f8dd84abaa94dcs248be49b0db"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0db"
}
}

Failure Return Example

See Failure Return Example



Update Space Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
space_nameStringBodyYesSpace name
space_idStringBodyYesSpace ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_space_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"space_name": "my room",
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0d2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Delete Space Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
space_idStringBodyYesSpace ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_space_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0d2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Space Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
spaces[]Object<space>BodyYesSpace information

space description

Parameter NameTypeLocationRequiredDescription
space_idStringBodyYesSpace ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_space_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"spaces": [
{
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example