pubnub_app_context
Manage user profiles, channel metadata, and membership relationships in PubNub applications. Perform CRUD operations like get, set, remove, and getAll to handle App Context objects efficiently.
Instructions
Manages PubNub App Context (Objects API) for users, channels, and memberships. Supports CRUD operations including get, set, remove, and getAll. Use this tool to manage user profiles, channel metadata, and membership relationships in your PubNub application.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
data | No | Data object for set/remove operations. For users: {name, externalId, profileUrl, email, custom}. For channels: {name, description, custom}. For memberships: {channels: [...]} | |
id | Yes | Identifier: UUID for users, channel name for channels, UUID for memberships (for membership getAll, use channel name to get channel members) | |
operation | Yes | Operation to perform: "get" to retrieve, "set" to create/update, "remove" to delete, "getAll" to list all | |
options | No | Optional parameters for the operation | |
type | Yes | Type of App Context object: "user" for user metadata, "channel" for channel metadata, "membership" for user-channel relationships |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"data": {
"description": "Data object for set/remove operations. For users: {name, externalId, profileUrl, email, custom}. For channels: {name, description, custom}. For memberships: {channels: [...]}"
},
"id": {
"description": "Identifier: UUID for users, channel name for channels, UUID for memberships (for membership getAll, use channel name to get channel members)",
"type": "string"
},
"operation": {
"description": "Operation to perform: \"get\" to retrieve, \"set\" to create/update, \"remove\" to delete, \"getAll\" to list all",
"enum": [
"get",
"set",
"remove",
"getAll"
],
"type": "string"
},
"options": {
"additionalProperties": false,
"default": {},
"description": "Optional parameters for the operation",
"properties": {
"filter": {
"description": "Filter expression for results",
"type": "string"
},
"ifMatchesEtag": {
"description": "ETag for conditional updates",
"type": "string"
},
"include": {
"description": "Additional include options"
},
"includeChannelFields": {
"default": true,
"description": "Include channel fields in membership responses",
"type": "boolean"
},
"includeCustomChannelFields": {
"default": true,
"description": "Include custom channel fields in membership responses",
"type": "boolean"
},
"includeCustomFields": {
"default": true,
"description": "Include custom fields in response",
"type": "boolean"
},
"includeCustomUuidFields": {
"default": true,
"description": "Include custom UUID fields in channel member responses",
"type": "boolean"
},
"includeTotalCount": {
"default": false,
"description": "Include total count in paginated response",
"type": "boolean"
},
"includeUuidFields": {
"default": true,
"description": "Include UUID fields in channel member responses",
"type": "boolean"
},
"limit": {
"description": "Number of objects to return (max 100)",
"type": "number"
},
"page": {
"description": "Pagination object from previous response"
},
"sort": {
"description": "Sort criteria (e.g., {id: \"asc\", name: \"desc\"})"
}
},
"type": "object"
},
"type": {
"description": "Type of App Context object: \"user\" for user metadata, \"channel\" for channel metadata, \"membership\" for user-channel relationships",
"enum": [
"user",
"channel",
"membership"
],
"type": "string"
}
},
"required": [
"type",
"operation",
"id"
],
"type": "object"
}