Request Headers (Applies to all methods)
POST
/api/apps/{appID}/buckets/{bucketID}/filters/{filterID}/push/subscriptions/things
Subscribe the current authenticated thing to the filter. If the target bucket does not exist, the bucket will be created before subscribing the thing to it. The thing becomes the bucket owner in this case.
Can be performed with thing credentials. The thing needs to have the query permission to the bucket where the filter belongs. If the target bucket does not exist, the thing also needs to have the bucket creation permission.
This request requires empty body.
Content-Type (None)
Content-Type application/vnd.kii.FilterNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "FILTER_NOT_FOUND". |
message | string | The error message. |
Content-Type application/vnd.kii.PushSubscriptionAlreadyExistsException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "PUSH_SUBSCRIPTION_ALREADY_EXISTS". |
message | string | The error message. |
topicID | string | The ID of the topic where the subscription already exists |
objectScope | ObjectScope | The scope of the topic |
appID | string | The ID of the application. |
userID | string | The ID of the user. Only provided for a user-scope bucket. |
groupID | string | The ID of the group. Only provided for a group-scope bucket. |
thingID | string | The ID of the thing. Only provided for a thing-scope bucket. |
type | string | One of "APP", "APP_AND_USER", "APP_AND_GROUP", or "APP_AND_THING". |
subject | string | The subject that is already subscribed to the topic/filter |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |
POST
/api/apps/{appID}/buckets/{bucketID}/filters/{filterID}/push/subscriptions/things
Subscribe the current authenticated thing to the filter with a push configuration. If the target bucket does not exist, the bucket will be created before subscribing the thing to it. The thing becomes the bucket owner in this case.
Can be performed with thing credentials. The thing needs to have the query permission to the bucket where the filter belongs. If the target bucket does not exist, the thing also needs to have the bucket creation permission.
Content-Type application/vnd.kii.CreatePushSubscriptionRequest+json
The data for configuring the push message parameters. the thing will receive the push messages through this subscription.
{
"pushConfiguration": "[PushConfiguration]"
}
Content-Type (None)
Content-Type application/vnd.kii.FilterNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "FILTER_NOT_FOUND". |
message | string | The error message. |
Content-Type application/vnd.kii.PushSubscriptionAlreadyExistsException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "PUSH_SUBSCRIPTION_ALREADY_EXISTS". |
message | string | The error message. |
topicID | string | The ID of the topic where the subscription already exists |
objectScope | ObjectScope | The scope of the topic |
appID | string | The ID of the application. |
userID | string | The ID of the user. Only provided for a user-scope bucket. |
groupID | string | The ID of the group. Only provided for a group-scope bucket. |
thingID | string | The ID of the thing. Only provided for a thing-scope bucket. |
type | string | One of "APP", "APP_AND_USER", "APP_AND_GROUP", or "APP_AND_THING". |
subject | string | The subject that is already subscribed to the topic/filter |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |