Skip to content

Create SaaS Subscription

API Address:/v2/quecrule/{version}/openapi/subscribe/saas

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

API Description:Create SaaS user subscription

Request Example:

javascript
{
  "msgTypes": [
    101
  ],
  "queueName": "a.000000026106.testAbc",
  "subscribeName": "test"
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
subscribeDTOSubscription informationbodytrueOpenApiSubscribeSaasDTOOpenApiSubscribeSaasDTO
  msgTypesMessage types, 101-Product information change\n102-Device information change\n103-Thing model publication information change\n104-Product authorization information\n105-User domain (App) authorization informationtruearrayinteger
  queueNameQueue nametruestring
  subscribeNameSubscription name, maximum length 128 characters, supports Chinese, uppercase and lowercase English characters (case-sensitive), numbers, underscores (_), hyphens (-), does not support slashes (/), spaces, or other characterstruestring
versionCurrent version, valid value:r1pathtruestring

Response Status:

Status CodeDescriptionSchema
200OKActionResultOfOpenApiSubscribeIdDTO
201Created
401Unauthorized
403Forbidden
404Not Found
16002The queue name does not exist
16018The number of subscription rules is out of limit
16024The message subscription is not enabled, please go to the SaaS development Guide to apply for enabling
50000Service exception
50004Parameter null or empty
50005Parameter check error
70017The product does not exist
70060Permission Denied
70130The device does not exist
91004Token incorrect
91005Doesn't have permission

Response Parameters:

Parameter NameParameter DescriptionTypeSchema
codeReturn codeinteger(int32)integer(int32)
dataObjectOpenApiSubscribeIdDTOOpenApiSubscribeIdDTO
  subscribeIdSubscription IDinteger(int64)
msgPrompt messagestring
pageNumCurrent page numberinteger(int32)integer(int32)
pageSizeItems per pageinteger(int32)integer(int32)
pagesTotal pagesinteger(int32)integer(int32)
totalTotal countinteger(int32)integer(int32)

Response Example:

javascript
{
	"code": 0,
	"data": {
		"subscribeId": 1
	},
	"msg": "",
	"pageNum": 0,
	"pageSize": 0,
	"pages": 0,
	"total": 0
}