Requests

Get device binding information

Topic: thing/product/{gateway_sn}/requests

Direction: up

Method: airport_bind_status

Data:

Column
Name
Type
constraint
Description

devices

Device object collection

array

{"size": 2, "item_type": struct}

»sn

Device serial number (SN)

text

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"devices": [
			{
				"sn": "drone-sn"
			},
			{
				"sn": "dock-sn"
			}
		]
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/requests_reply

Direction: down

Method: airport_bind_status

Data:

Column
Name
Type
constraint
Description

result

Return code

int

Non-zero represents an error

output

Output

struct

»bind_status

Binding information

array

{"size": 2, "item_type": struct}

»»sn

Device serial number (SN)

text

»»is_device_bind_organization

Whether the device is bound to the organization

bool

{"false":"No","true":"Yes"}

»»organization_id

Organization ID

text

»»organization_name

Organization name

text

»»device_callsign

Device name in the organization

text

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"output": {
			"bind_status": [
				{
					"device_callsign": "Device organization callsign",
					"is_device_bind_organization": true,
					"organization_id": "12345678",
					"organization_name": "12345",
					"sn": "12345"
				},
				{
					"device_callsign": "Device organization callsign",
					"is_device_bind_organization": true,
					"organization_id": "12345678",
					"organization_name": "12345",
					"sn": "12345"
				}
			]
		},
		"result": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Query organization information corresponding to device binding

Topic: thing/product/{gateway_sn}/requests

Direction: up

Method: airport_organization_get

Data:

Column
Name
Type
constraint
Description

device_binding_code

Device binding code

text

organization_id

Organization ID

text

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"device_binding_code": "device_binding_code",
		"organization_id": "organization_id"
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/requests_reply

Direction: down

Method: airport_organization_get

Data:

Column
Name
Type
constraint
Description

result

Return code

int

Non-zero represents an error

output

Output

struct

»organization_name

Organization name

text

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"output": {
			"organization_name": "organization_name"
		},
		"result": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Bind device to organization

Topic: thing/product/{gateway_sn}/requests

Direction: up

Method: airport_organization_bind

Data:

Column
Name
Type
constraint
Description

bind_devices

Binding parameter list

array

{"size": 2, "item_type": struct}

»device_binding_code

Device binding code

text

»organization_id

Organization ID

text

»device_callsign

Device name in the organization

text

»sn

Device serial number (SN)

text

»device_model_key

Product enumeration value

text

Reference to Product Support

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"bind_devices": [
			{
				"device_binding_code": "device_binding_code",
				"device_callsign": "dock-device-callsign",
				"device_model_key": "3-1-0",
				"organization_id": "organization_id",
				"sn": "dock-sn"
			},
			{
				"device_binding_code": "device_binding_code",
				"device_callsign": "drone-device-callsign",
				"device_model_key": "0-67-0",
				"organization_id": "organization_id",
				"sn": "drone-sn"
			}
		]
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/requests_reply

Direction: down

Method: airport_organization_bind

Data:

Column
Name
Type
constraint
Description

result

Return code

int

Non-zero represents an error

output

Output

struct

»err_infos

Error information

array

{"size": 2, "item_type": struct}

»»sn

Device serial number (SN)

text

»»err_code

Error code

int

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"output": {
			"err_infos": [
				{
					"err_code": 210231,
					"sn": "dock-sn"
				},
				{
					"err_code": 210231,
					"sn": "drone-sn"
				}
			]
		},
		"result": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Last updated