Remote Unlocking

2024-09-09
No Rating

Service

Enable/disable the device's individual unlocking license

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: unlock_license_switch

Data:

ColumnNameTypeconstraintDescription
license_idUnique identifier of the unlocking licenseint
enableWhether to enable or notbool

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"enable": true,
		"license_id": 240330
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: unlock_license_switch

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error
license_idUnique identifier of the unlocking licenseint

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"license_id": 240330,
		"result": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1234567890123
}

Update the device's unlocking license

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: unlock_license_update

Data:

ColumnNameTypeconstraintDescription
fileOffline license filestructOptional. Update with the latest license from the Flysafe server.
»urlFile URLtext
»fingerprintFile signaturetextFile MD5 signature

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"file": {
			"fingerprint": "xxxx",
			"url": "https://xx.oss-cn-hangzhou.aliyuncs.com/xx.kmz?Expires=xx&OSSAccessKeyId=xxx&Signature=xxx"
		}
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: unlock_license_update

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintNon-zero represents an error

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"result": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1234567890123
}

Get the device's unlocking license list

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: unlock_license_list

Data:

ColumnNameTypeconstraintDescription
device_model_domainDesignated license retrieval locationenum_int{"0":"Aircraft","3":"Dock"}Retrieval from the aircraft refers to the successfully imported unlocking licenses on the aircraft; retrieval from the dock refers to the unlocking licenses approved on the Flysafe website.

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"device_model_domain": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: unlock_license_list

Data:

ColumnNameTypeConstraintDescription
resultReturn codeintNon-zero represents an error
device_model_domainUnlocking license locationenum_int{"0":"Aircraft","3":"Dock"}
consistenceLicense consistencyboolWhether the currently imported licenses on the aircraft match the licenses approved by the server
licensesLicense listarray{"size": -, "item_type": struct}
»common_fieldsCommon informationstruct
»»license_idUnique identifier of the unlocking licenseint
»»nameUnlocking license nametext
»»typeUnlocking license typeenum_int{"0":"Authorization zone unlocking","1":"Custom circular area unlocking","2":"Country/region unlocking","3":"Altitude limit unlocking","4":"Custom polygon area unlocking","5":"Power unlocking","6":"RID unlocking"}
»»group_idUnique identifier of the group where the license is locatedintAll licenses applied for by a user account for a device belong to one group
»»user_idAccount of the user to whom the license belongstextApplying for an unlocking license on the Flysafe website requires providing a DJI account or dock SN. The dock is also considered a type of user, and the Flysafe website assigns a unique ID to each dock
»»device_snDevice serial number (SN) bound to the licensetext
»»begin_timeStart timestamp of validity periodintSecond-level UNIX timestamp
»»end_timeExpiration timestampintSecond-level UNIX timestamp
»»user_onlyWhether to verificate the user accountbool
»»enabledWhether to enable or notbool
»area_unlockAuthorization zone unlocking license informationstruct
»»area_idsCollection of area identifiersarray{"size": -, "item_type": enum_int}
»circle_unlockCustom circular area unlocking license informationstruct
»»radiusArea radiusint{"unit":"Meters / m"}
»»latitudeCenter latitudedouble{"max":90,"min":-90}Angle value, negative for south latitude, positive for north latitude, precision to six decimal places
»»longitudeCenter longitudedouble{"max":180,"min":-180}Angle value, positive for east longitude, negative for west longitude, precision to six decimal places
»»heightAltitude limitint{"max":65535,"min":0,"unit":"Meters / m"}
»country_unlockCountry/region unlocking license informationstruct
»»country_numberCountry/region numeric codeenum_int{}See ISO_3166-1 international standard (https://en.wikipedia.org/wiki/ISO_3166-1)
»»heightAltitude limitint{"max":65535,"min":0,"unit":"Meters / m"}
»height_unlockAltitude limit unlocking license informationstruct
»»heightAltitude limitint{"max":65535,"min":0,"unit":"Meters / m"}
»polygon_unlockCustom polygon area unlocking license informationstruct
»»pointsCollection of polygon vertex GPS coordinatesarray{"size": -, "item_type": struct}
»»»latitudeLatitudedouble{"max":90,"min":-90}Angle value, negative for south latitude, positive for north latitude, precision to six decimal places
»»»longitudeLongitudedouble{"max":180,"min":-180}Angle value, positive for east longitude, negative for west longitude, precision to six decimal places
»power_unlockPower unlocking license informationstruct
»rid_unlockRID unlocking license informationstruct
»»levelRID typeenum_int{"1":"EU RID unlocking","2":"China RID unlocking"}

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"consistence": false,
		"device_model_domain": 0,
		"licenses": [
			{
				"area_unlock": {
					"area_ids": [
						115001769,
						8724
					]
				},
				"common_fields": {
					"begin_time": 1696948115,
					"device_sn": "xxxxxxxxx",
					"enabled": true,
					"end_time": 2145916800,
					"group_id": 2896,
					"license_id": 240330,
					"name": "Unlocking for XXX Area",
					"type": 0,
					"user_id": "xxxxxxxxx",
					"user_only": false
				}
			},
			{
				"circle_unlock": {
					"height": 500,
					"latitude": 22.60309,
					"longitude": 113.947815,
					"radius": 1581
				},
				"common_fields": {
					"begin_time": 1696948115,
					"device_sn": "xxxxxxxxx",
					"enabled": false,
					"end_time": 2145916800,
					"group_id": 2896,
					"license_id": 240331,
					"name": "Unlocking for XXX Circular Area",
					"type": 1,
					"user_id": "xxxxxxxxx",
					"user_only": false
				}
			},
			{
				"common_fields": {
					"begin_time": 1696948115,
					"device_sn": "xxxxxxxxx",
					"enabled": false,
					"end_time": 2145916800,
					"group_id": 2896,
					"license_id": 240332,
					"name": "Unlocking for China Country/Region",
					"type": 2,
					"user_id": "xxxxxxxxx",
					"user_only": false
				},
				"country_unlock": {
					"country_number": 156,
					"height": 500
				}
			},
			{
				"common_fields": {
					"begin_time": 1696948115,
					"device_sn": "xxxxxxxxx",
					"enabled": false,
					"end_time": 2145916800,
					"group_id": 2896,
					"license_id": 240333,
					"name": "Unlocking for XXX Altitude",
					"type": 3,
					"user_id": "xxxxxxxxx",
					"user_only": false
				},
				"height_unlock": {
					"height": 500
				}
			},
			{
				"common_fields": {
					"begin_time": 1696948115,
					"device_sn": "xxxxxxxxx",
					"enabled": false,
					"end_time": 2145916800,
					"group_id": 2896,
					"license_id": 240334,
					"name": "Unlocking for XXX Polygon Area",
					"type": 4,
					"user_id": "xxxxxxxxx",
					"user_only": false
				},
				"polygon_unlock": {
					"points": [
						{
							"latitude": 22.55403932,
							"longitude": 113.90488828
						},
						{
							"latitude": 22.55520018,
							"longitude": 113.92180215
						},
						{
							"latitude": 22.54656858,
							"longitude": 113.92051272
						}
					]
				}
			},
			{
				"common_fields": {
					"begin_time": 1696948115,
					"device_sn": "xxxxxxxxx",
					"enabled": false,
					"end_time": 2145916800,
					"group_id": 2896,
					"license_id": 240335,
					"name": "Unlocking for XXX Power",
					"type": 5,
					"user_id": "xxxxxxxxx",
					"user_only": false
				},
				"power_unlock": {}
			},
			{
				"common_fields": {
					"begin_time": 1696948115,
					"device_sn": "xxxxxxxxx",
					"enabled": false,
					"end_time": 2145916800,
					"group_id": 2896,
					"license_id": 240336,
					"name": "Unlocking for XXX RID",
					"type": 6,
					"user_id": "xxxxxxxxx",
					"user_only": false
				},
				"rid_unlock": {
					"level": 1
				}
			}
		],
		"result": 0
	},
	"gateway": "",
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655
}
If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.