This plugin adds support for a whole range of modern web service connections to Openfire/XMPP via the embedded Jetty web server in a different way to the traditional persistent client XMPP session over TCP/5222 or Bosh/7443 or Websockets/7443 used by native binary clients.
It uses :
- JWTs (JSON Web Tokens) instead of traditional username/passwords combined with Web Authentication and Web Credentials to authenticate user requests and manage the user permissions and entitlements that apply for the request or entitlement.
- REST APIs to make requests and receive immediate responses.
- Server Sent Events (SSE) and
- Web-Push to push events to users when they are online or offline.
A user has a singleton xmpp session in Openfire that is created on demand and removed when it expires. This single user session can have many active REST and SSE connections depending on how many browsers tabs, browser windows or browser instances are connected to Openfire from applications in web pages opened on behalf of the user.
The xmpp session has the full feature set of an XMPP client that is based on Smack/Spark. It also has User Interface (UI) consisting of web-components that can bind directly to Spark features. For example, a contacts roster widget and a chat conversation widget. that work independent of each other and can be hosted in different web pages or different browsers but end up pointing at the same xmpp session.
A fully working XMPP client can be constructed in a web page with minimal HTML and JavaScript.
SparkWeb REST API adds support for a whole range of modern web service connections to Openfire/XMPP
0.0.1-SNAPSHOT
provides chat services for the authenticated user.
provides groupchat services to manage contacts
provides presence services
provides meeting and other collaboration services
provides user services for the authenticated user.
provides user roster services to manage contacts
provides server-side Web Authentication services
provides server-side Web Push services
Access global and user properties
Create, update and delete Openfire bookmarks
- http
- https
- application/json
- application/json
Type: apikey
Method | URI | Name | Summary |
---|---|---|---|
POST | /sparkweb/api/rest/bookmark | create bookmark | Bookmark API - Create a new bookmark |
DELETE | /sparkweb/api/rest/bookmark/{bookmarkID} | delete bookmark | Bookmark API - Delete a specific bookmark |
DELETE | /sparkweb/api/rest/bookmark/{bookmarkID}/{name} | delete bookmark property | Bookmark API - Delete a bookmark property |
GET | /sparkweb/api/rest/bookmark/{bookmarkID} | get bookmark | Bookmark API - Get a specific bookmark |
GET | /sparkweb/api/rest/bookmarks | get bookmarks | Bookmark API - Get all bookmark |
PUT | /sparkweb/api/rest/bookmark/{bookmarkID} | update bookmark | Bookmark API - Update a specific bookmark |
POST | /sparkweb/api/rest/bookmark/{bookmarkID}/{name} | update bookmark property | Bookmark API - Create/Update a bookmark property |
Method | URI | Name | Summary |
---|---|---|---|
GET | /sparkweb/api/rest/chat/messages | get chat conversations | Get chat messages |
POST | /sparkweb/api/rest/chat/chatstate/{state}/{to} | post chat state | Post chat state indicator |
POST | /sparkweb/api/rest/chat/message/{to} | post message | Post chat message |
Method | URI | Name | Summary |
---|---|---|---|
GET | /sparkweb/api/rest/preview/{quality}/{url} | preview link | Request URL preview |
GET | /sparkweb/api/rest/upload/{fileName}/{fileSize} | upload request | Request file upload |
Method | URI | Name | Summary |
---|---|---|---|
POST | /sparkweb/api/rest/roster | create roster | Create roster entry |
DELETE | /sparkweb/api/rest/roster/{jid} | delete roster item | Remove roster entry |
GET | /sparkweb/api/rest/roster | get user roster | Retrieve user roster |
PUT | /sparkweb/api/rest/roster/{jid} | update roster item | Update roster entry |
Method | URI | Name | Summary |
---|---|---|---|
GET | /sparkweb/api/rest/config/global | get global config | Global and User Properties - List global properties affecting this user |
GET | /sparkweb/api/rest/config/properties | get user config | Global and User Properties - List User Properties |
POST | /sparkweb/api/rest/config/properties | post user config | Global and User Properties - Update user properties |
Method | URI | Name | Summary |
---|---|---|---|
GET | /sparkweb/api/rest/groupchat/messages | get group chat conversations | Get groupchat messages |
GET | /sparkweb/api/rest/groupchat/room/{roomName}/chathistory | get m u c room history | Get room history |
GET | /sparkweb/api/rest/groupchat/room/{roomName} | get m u c room JSON 2 | Get chat room |
GET | /sparkweb/api/rest/groupchat/room/{roomName}/occupants | get m u c room occupants | Get room occupants |
GET | /sparkweb/api/rest/groupchat/room/{roomName}/participants | get m u c room participants | Get room participants |
GET | /sparkweb/api/rest/groupchat/rooms | get m u c rooms | Get chat rooms |
POST | /sparkweb/api/rest/groupchat/room/{roomName}/{invitedJid} | invite to room | Invite another user |
PUT | /sparkweb/api/rest/groupchat/room/{roomName} | join room | Join groupchat |
DELETE | /sparkweb/api/rest/groupchat/room/{roomName} | leave room | Leave groupchat |
POST | /sparkweb/api/rest/groupchat/room/{roomName} | post to room | Post a message to a groupchat |
Method | URI | Name | Summary |
---|---|---|---|
GET | /sparkweb/api/rest/presence/roster | get user roster with presence | Get contacts presence |
POST | /sparkweb/api/rest/presence | post presence | Set Presence |
GET | /sparkweb/api/rest/presence/{target} | probe presence | Probe a target user presence |
Method | URI | Name | Summary |
---|---|---|---|
POST | /sparkweb/api/rest/user/groups/{groupName} | add user to group | Add user to a group |
POST | /sparkweb/api/rest/user/groups | add user to groups | Add user to groups |
DELETE | /sparkweb/api/rest/user | delete user | Delete authenticated user |
DELETE | /sparkweb/api/rest/user/groups/{groupName} | delete user from group | Delete user from group |
DELETE | /sparkweb/api/rest/user/groups | delete user from groups | Delete user from groups |
GET | /sparkweb/api/rest/user | get user | Get authenticated user |
GET | /sparkweb/api/rest/user/groups | get user groups | Get user's groups |
GET | /sparkweb/api/rest/users | get users | Get users |
PUT | /sparkweb/api/rest/user | update user | Update authenticated user |
Method | URI | Name | Summary |
---|---|---|---|
POST | /sparkweb/api/rest/webauthn/authenticate/finish/{username} | webauthn authenticate finish | Web Authentication - End Authentication |
POST | /sparkweb/api/rest/webauthn/authenticate/start/{username} | webauthn authenticate start | Web Authentication - Start Authentication |
POST | /sparkweb/api/rest/webauthn/register/finish/{username} | webauthn register finish | Web Authentication - Finish Registration |
POST | /sparkweb/api/rest/webauthn/register/start/{username} | webauthn register start | Web Authentication - Start Registration |
Method | URI | Name | Summary |
---|---|---|---|
GET | /sparkweb/api/rest/webpush/subscribers | get push subscribers | Web Push - Get all web push subscribers |
GET | /sparkweb/api/rest/webpush/vapidkey | get web push public key | Web Push - Get the webpush vapid key |
POST | /sparkweb/api/rest/webpush/publish/{target} | post web push | Web Push - Send a text message to all subscriptions of another user |
POST | /sparkweb/api/rest/webpush/subscribe/{resource} | post web push subscription | Web Push - Store web push subscription for this user |
POST /sparkweb/api/rest/user/groups/{groupName}
Add authenticated user to a collection of groups. When a group that is provided does not exist, it will be automatically created if possible.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
groupName | path |
string | string |
✓ | The name of the group that the user is to be added to. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The user was added to all groups. | schema | |
400 | Bad Request | The group could not be found. | schema |
Status: OK
Status: Bad Request
POST /sparkweb/api/rest/user/groups
Add authenticated user to a collection of groups. When a group that is provided does not exist, it will be automatically created if possible.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
body | body |
UserGroupsEntity | models.UserGroupsEntity |
✓ | A collection of names for groups that the user is to be added to. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The user was added to all groups. | schema | |
404 | Not Found | One or more groups could not be found. | schema |
Status: OK
Status: Not Found
POST /sparkweb/api/rest/bookmark
This endpoint is used to create a new bookmark
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
body | body |
Bookmark | models.Bookmark |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
POST /sparkweb/api/rest/roster
Add a roster entry to the roster (buddies / contact list) of a particular user.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
body | body |
RosterItemEntity | models.RosterItemEntity |
✓ | The definition of the roster entry that is to be added. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The entry was added to the roster. | schema | |
400 | Bad Request | A roster entry cannot be added to a 'shared group' (try removing group names from the roster entry and try again). | schema | |
404 | Not Found | No user of with this username exists. | schema | |
409 | Conflict | A roster entry already exists for the provided contact JID. | schema |
Status: OK
400 - A roster entry cannot be added to a 'shared group' (try removing group names from the roster entry and try again).
Status: Bad Request
Status: Not Found
Status: Conflict
DELETE /sparkweb/api/rest/bookmark/{bookmarkID}
This endpoint is used to delete a specific bookmark
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
bookmarkID | path |
string | string |
✓ |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
default | successful operation | schema |
successful operation
empty schema
DELETE /sparkweb/api/rest/bookmark/{bookmarkID}/{name}
This endpoint is used to delete a bookmark property
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
bookmarkID | path |
string | string |
✓ | |||
name | path |
string | string |
✓ |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
DELETE /sparkweb/api/rest/roster/{jid}
Removes one of the roster entries (contacts) of the authenticated user.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
jid | path |
string | string |
✓ | The JID of the entry/contact to remove. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | Roster entry removed | schema | |
400 | Bad Request | A roster entry cannot be removed from a 'shared group'. | schema | |
404 | Not Found | No user of with this username exists, or its roster did not contain this entry. | schema |
Status: OK
Status: Bad Request
Status: Not Found
DELETE /sparkweb/api/rest/user
Delete authenticated user in Openfire.
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The Openfire user was deleted. | schema | |
404 | Not Found | No user with that username was found. | schema |
Status: OK
Status: Not Found
DELETE /sparkweb/api/rest/user/groups/{groupName}
Removes a user from a group.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
groupName | path |
string | string |
✓ | The name of the group that the user is to be added to. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The user was taken out of the group. | schema | |
400 | Bad Request | The group could not be found. | schema |
Status: OK
Status: Bad Request
DELETE /sparkweb/api/rest/user/groups
Removes a user from a collection of groups..
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
body | body |
UserGroupsEntity | models.UserGroupsEntity |
✓ | A collection of names for groups that the user is to be added to. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The user was taken out of the group. | schema | |
404 | Not Found | One or more groups could not be found. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/bookmark/{bookmarkID}
This endpoint is used to retrieve a specific bookmark
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
bookmarkID | path |
string | string |
✓ |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
GET /sparkweb/api/rest/bookmarks
This endpoint is used to retrieve all bookmarks
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
GET /sparkweb/api/rest/chat/messages
Retrieves chat messages from Openfire messages archive
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
end | query |
string | string |
The end date in MM/dd/yy format | |||
keywords | query |
string | string |
Search keywords | |||
start | query |
string | string |
The start date in MM/dd/yy format | |||
to | query |
string | string |
The message target |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The messages were retrieved. | schema | |
400 | Bad Request | The messages could not be retrieved. | schema |
Status: OK
Status: Bad Request
GET /sparkweb/api/rest/config/global
Endpoint will retrieve all Openfire Global properties that are used by this authenticated user.
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
GET /sparkweb/api/rest/groupchat/messages
Retrieves chat groupchat messages from Openfire messages archive
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
end | query |
string | string |
The end date in MM/dd/yy format | |||
keywords | query |
string | string |
Search keywords | |||
room | query |
string | string |
The groupchat room used | |||
service | query |
string | string |
"conference" |
The groupchat service name | ||
start | query |
string | string |
The start date in MM/dd/yy format |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The messages were retrieved. | schema | |
400 | Bad Request | The messages could not be retrieved. | schema |
Status: OK
Status: Bad Request
GET /sparkweb/api/rest/groupchat/room/{roomName}/chathistory
Get messages that have been exchanged in a specific multi-user chat room.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
roomName | path |
string | string |
✓ | The name of the MUC room | ||
serviceName | query |
string | string |
"conference" |
The name of the MUC service. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The chat room message history | schema | |
404 | Not Found | The chat room (or its service) can not be found or is not accessible. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/groupchat/room/{roomName}
Get information of a specific multi-user chat room.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
roomName | path |
string | string |
✓ | The name of the MUC room | ||
expandGroups | query |
boolean | bool |
For all groups defined in owners, admins, members and outcasts, list individual members instead of the group name. | |||
serviceName | query |
string | string |
"conference" |
The name of the MUC service. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The chat room | schema | |
404 | Not Found | The chat room (or its service) can not be found or is not accessible. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/groupchat/room/{roomName}/occupants
Get all occupants of a specific multi-user chat room.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
roomName | path |
string | string |
✓ | The name of the MUC room | ||
serviceName | query |
string | string |
"conference" |
The name of the MUC service. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The chat room occupants | schema | |
404 | Not Found | The chat room (or its service) can not be found or is not accessible. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/groupchat/room/{roomName}/participants
Get all participants of a specific multi-user chat room.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
roomName | path |
string | string |
✓ | The name of the MUC room | ||
serviceName | query |
string | string |
"conference" |
The name of the MUC service. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The chat room participants | schema | |
404 | Not Found | The chat room (or its service) can not be found or is not accessible. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/groupchat/rooms
Get a list of all multi-user chat rooms of a particular chat room service.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
expandGroups | query |
boolean | bool |
For all groups defined in owners, admins, members and outcasts, list individual members instead of the group name. | |||
search | query |
string | string |
Search/Filter by room name. | |||
This act like the wildcard search %String% | |||||||
serviceName | query |
string | string |
"conference" |
The name of the MUC service for which to return all chat rooms. | ||
type | query |
string | string |
"public" |
Room type-based filter: 'all' or 'public' |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | All chat rooms. | schema | |
404 | Not Found | MUC service does not exist or is not accessible. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/webpush/subscribers
This endpoint is used to obtain all web push subscribers
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
GET /sparkweb/api/rest/user
Retrieve a user that is defined in Openfire.
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The Openfire user was retrieved. | schema | |
404 | Not Found | No user with that username was found. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/config/properties
Endpoint to retrieve a list of all config properties for the authenticated user.
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
GET /sparkweb/api/rest/user/groups
Retrieve names of all groups that a particular user is in.
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The names of the groups that the user is in. | schema |
Status: OK
GET /sparkweb/api/rest/roster
Get a list of all roster entries (buddies / contact list) of a authenticated user.
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | All roster entries | schema | |
404 | Not Found | No user with that username was found. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/presence/roster
Retrieve a list of all roster entries (buddies / contact list) with presence of a authenticated user.
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | All roster entries with presence | schema | |
400 | Bad Request | No xmpp connection found for authenticated user. | schema |
Status: OK
Status: Bad Request
GET /sparkweb/api/rest/users
Retrieve all users defined in Openfire (with optional filtering).
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
propertyKey | query |
string | string |
Filter by a user property name. | |||
propertyValue | query |
string | string |
Filter by user property value. Note: This can only be used in combination with a property name parameter | |||
search | query |
string | string |
Search/Filter by username. This act like the wildcard search %String% |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | A list of Openfire users. | schema |
Status: OK
GET /sparkweb/api/rest/webpush/vapidkey
This endpoint is used to obtain the vapid key need by the client to sign web push messages
- application/json
- authorization
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
POST /sparkweb/api/rest/groupchat/room/{roomName}/{invitedJid}
Invite another user to a groupchat
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
invitedJid | path |
string | string |
✓ | The xmpp address of the person to be invited | ||
roomName | path |
string | string |
✓ | The name of the MUC room | ||
serviceName | query |
string | string |
"conference" |
The name of the MUC service. | ||
body | body |
string | string |
✓ | The reason for the invitation |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The invitation has been sent | schema | |
404 | Not Found | The chat room (or its service) can not be found or is not accessible. | schema |
Status: OK
Status: Not Found
PUT /sparkweb/api/rest/groupchat/room/{roomName}
Join a groupchat by entering a MUC room
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
roomName | path |
string | string |
✓ | The name of the MUC room to join. | ||
serviceName | query |
string | string |
"conference" |
The name of the MUC service. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The user has joined groupchat | schema | |
404 | Not Found | The chat room (or its service) can not be found or is not accessible. | schema |
Status: OK
Status: Not Found
DELETE /sparkweb/api/rest/groupchat/room/{roomName}
Leave a groupchat by leaving a MUC room
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
roomName | path |
string | string |
✓ | The name of the MUC room to leave. | ||
serviceName | query |
string | string |
"conference" |
The name of the MUC service. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The user has left groupchat | schema | |
404 | Not Found | The chat room (or its service) can not be found or is not accessible. | schema |
Status: OK
Status: Not Found
POST /sparkweb/api/rest/chat/chatstate/{state}/{to}
Post a chat state to an xmpp address.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
state | path |
string | string |
✓ | The chat state to be posted. It can be 'composing', 'paused', 'active', 'inactive', 'gone' | ||
to | path |
string | string |
✓ | The JID of the target xmpp address. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The chat state was posted. | schema | |
400 | Bad Request | The chat state could not be posted. | schema |
Status: OK
Status: Bad Request
POST /sparkweb/api/rest/chat/message/{to}
post a chat message to an xmpp address.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
to | path |
string | string |
✓ | The JID of the target xmpp address. | ||
body | body |
string | string |
✓ | The text message to be posted |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The messages was posted. | schema | |
400 | Bad Request | The messages could not be posted. | schema |
Status: OK
Status: Bad Request
POST /sparkweb/api/rest/presence
Update the presence state of the authenticated user.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
show | query |
string | string |
The availability state of the authenticated user | |||
status | query |
string | string |
A detailed description of the availability state |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | Presence was set | schema | |
400 | Bad Request | No xmpp connection found for authenticated user. | schema |
Status: OK
Status: Bad Request
POST /sparkweb/api/rest/groupchat/room/{roomName}
Post a message to a groupchat
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
roomName | path |
string | string |
✓ | The name of the MUC room to post to. | ||
serviceName | query |
string | string |
"conference" |
The name of the MUC service. | ||
body | body |
string | string |
✓ | The text message to be posted |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The message is posted | schema | |
404 | Not Found | The chat room (or its service) can not be found or is not accessible. | schema |
Status: OK
Status: Not Found
POST /sparkweb/api/rest/config/properties
Endpoint will update user properties from an array of name/value pairs
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
body | body |
string | string |
✓ | A JSON array of name pairs (name/value) to set the value of a property |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
default | successful operation | schema |
successful operation
empty schema
POST /sparkweb/api/rest/webpush/publish/{target}
This endpoint is used to push a message with a payload to all subscriptions of the specified user
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
target | path |
string | string |
✓ | A valid Openfire username | ||
body | body |
string | string |
✓ | The text message to be pushed to the user |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
default | successful operation | schema |
successful operation
empty schema
POST /sparkweb/api/rest/webpush/subscribe/{resource}
This endpoint is used to save a subscription created by a web client for this user
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
resource | path |
string | string |
✓ | A resource name to tag the subscription | ||
body | body |
string | string |
✓ | The subscription as created by the web client |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
default | successful operation | schema |
successful operation
empty schema
GET /sparkweb/api/rest/preview/{quality}/{url}
Request for URL preview metadata.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
quality | path |
string | string |
✓ | The quality of the preview image on a scale 1-9. | ||
url | path |
string | string |
✓ | The url to be previewd. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The metadata was obtained. | schema | |
400 | Bad Request | The preview request failed. | schema |
Status: OK
Status: Bad Request
GET /sparkweb/api/rest/presence/{target}
Request the presence of an specific user
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
target | path |
string | string |
✓ | The username to be probed. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | Presence of user requested | schema | |
400 | Bad Request | No xmpp connection found for authenticated user or authenticated user is not premitted to probe user presence. | schema |
Status: OK
400 - No xmpp connection found for authenticated user or authenticated user is not premitted to probe user presence.
Status: Bad Request
PUT /sparkweb/api/rest/bookmark/{bookmarkID}
This endpoint is used to update a specific bookmark
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
bookmarkID | path |
string | string |
✓ | |||
body | body |
Bookmark | models.Bookmark |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
POST /sparkweb/api/rest/bookmark/{bookmarkID}/{name}
This endpoint is used to create or update a bookmark property value
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
bookmarkID | path |
string | string |
✓ | |||
name | path |
string | string |
✓ | |||
body | body |
string | string |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
PUT /sparkweb/api/rest/roster/{jid}
Update a roster entry to the roster (buddies / contact list) of a particular user.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
jid | path |
string | string |
✓ | The JID of the entry/contact to remove. | ||
body | body |
RosterItemEntity | models.RosterItemEntity |
✓ | The definition of the roster entry that is to be updated. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The entry was updated in the roster. | schema | |
400 | Bad Request | A roster entry cannot be updated with a 'shared group'. | schema | |
404 | Not Found | No user of with this username exists. | schema |
Status: OK
Status: Bad Request
Status: Not Found
PUT /sparkweb/api/rest/user
Update the authenticated user in Openfire.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
body | body |
UserEntity | models.UserEntity |
✓ | The definition of the authenticated user to update. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The Openfire user was updated. | schema | |
404 | Not Found | No user with that username was found. | schema |
Status: OK
Status: Not Found
GET /sparkweb/api/rest/upload/{fileName}/{fileSize}
Request for GET and PUT URLs needed to upload and share a file with other users.
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
fileName | path |
string | string |
✓ | The file name to be upload. | ||
fileSize | path |
string | string |
✓ | The size of the file to be uploaded. |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | The request was accepted. | schema | |
400 | Bad Request | The upload request failed. | schema |
Status: OK
Status: Bad Request
POST /sparkweb/api/rest/webauthn/authenticate/finish/{username}
This endpoint is used to finish the webauthn authentication proces
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
username | path |
string | string |
✓ | A valid Openfire username | ||
body | body |
string | string |
✓ | The assertion generated by the web client |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
POST /sparkweb/api/rest/webauthn/authenticate/start/{username}
This endpoint is used to start the webauthn authentication proces
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
username | path |
string | string |
✓ | A valid Openfire username |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
POST /sparkweb/api/rest/webauthn/register/finish/{username}
This endpoint is used to finish the webauthn registration proces
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
username | path |
string | string |
✓ | A valid Openfire username | ||
body | body |
string | string |
✓ | The credentials generated by the web client |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
POST /sparkweb/api/rest/webauthn/register/start/{username}
This endpoint is used to start the webauthn registration proces
- application/json
- authorization
Name | Source | Type | Go type | Separator | Required | Default | Description |
---|---|---|---|---|---|---|---|
username | path |
string | string |
✓ | A valid Openfire username | ||
body | body |
string | string |
✓ | The current Openfire password for the user |
Code | Status | Description | Has headers | Schema |
---|---|---|---|---|
200 | OK | successful operation | schema |
Status: OK
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
body | string | string |
||||
conversationID | int64 (formatted integer) | int64 |
||||
from | string | string |
||||
fromJID | JID | JID |
||||
roomEvent | boolean | bool |
||||
sentDate | date-time (formatted string) | strfmt.DateTime |
||||
stanza | string | string |
||||
to | string | string |
||||
toJID | JID | JID |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
bookmarkID | int64 (formatted integer) | int64 |
||||
globalBookmark | boolean | bool |
||||
groups | []string | []string |
||||
name | string | string |
||||
properties | []UserProperty | []*UserProperty |
||||
propertyNames | IteratorString | IteratorString |
||||
type | string | string |
||||
users | []string | []string |
||||
value | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
bookmarks | []Bookmark | []*Bookmark |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
chatRoom | string | string |
||||
conversationID | int64 (formatted integer) | int64 |
||||
conversationParticipants | []string | []string |
||||
external | boolean | bool |
||||
lastActivity | date-time (formatted string) | strfmt.DateTime |
||||
messageCount | int32 (formatted integer) | int32 |
||||
messages | []ArchivedMessage | []*ArchivedMessage |
||||
participantList | []string | []string |
||||
participants | []JID | []*JID |
||||
room | JID | JID |
||||
startDate | date-time (formatted string) | strfmt.DateTime |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
conversations | []Conversation | []*Conversation |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
domain | string | string |
||||
node | string | string |
||||
resource | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
chatRooms | []MUCRoomEntity | []*MUCRoomEntity |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
adminGroups | []string | []string |
||||
admins | []string | []string |
||||
allowPM | string | string |
||||
broadcastPresenceRoles | []string | []string |
||||
canAnyoneDiscoverJID | boolean | bool |
||||
canChangeNickname | boolean | bool |
||||
canOccupantsChangeSubject | boolean | bool |
||||
canOccupantsInvite | boolean | bool |
||||
creationDate | date-time (formatted string) | strfmt.DateTime |
||||
description | string | string |
||||
logEnabled | boolean | bool |
||||
loginRestrictedToNickname | boolean | bool |
||||
maxUsers | int32 (formatted integer) | int32 |
||||
memberGroups | []string | []string |
||||
members | []string | []string |
||||
membersOnly | boolean | bool |
||||
moderated | boolean | bool |
||||
modificationDate | date-time (formatted string) | strfmt.DateTime |
||||
naturalName | string | string |
||||
outcastGroups | []string | []string |
||||
outcasts | []string | []string |
||||
ownerGroups | []string | []string |
||||
owners | []string | []string |
||||
password | string | string |
||||
persistent | boolean | bool |
||||
publicRoom | boolean | bool |
||||
registrationEnabled | boolean | bool |
||||
roomName | string | string |
||||
subject | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
messages | []MUCRoomMessageEntity | []*MUCRoomMessageEntity |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
body | string | string |
||||
delayFrom | string | string |
||||
delayStamp | string | string |
||||
from | string | string |
||||
to | string | string |
||||
type | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
occupants | []OccupantEntity | []*OccupantEntity |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
affiliation | string | string |
||||
jid | string | string |
||||
role | string | string |
||||
userAddress | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
participants | []ParticipantEntity | []*ParticipantEntity |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
affiliation | string | string |
||||
jid | string | string |
||||
role | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
show | string | string |
||||
status | string | string |
||||
username | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
publicKey | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
roster | []RosterItemEntity | []*RosterItemEntity |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
groups | []string | []string |
||||
jid | string | string |
||||
nickname | string | string |
||||
show | string | string |
||||
status | string | string |
||||
subscriptionType | int32 (formatted integer) | int32 |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
users | []UserEntity | []*UserEntity |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
string | string |
|||||
name | string | string |
||||
password | string | string |
||||
properties | []UserProperty | []*UserProperty |
||||
username | string | string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
groupnames | []string | []string |
Properties
Name | Type | Go type | Required | Default | Description | Example |
---|---|---|---|---|---|---|
key | string | string |
||||
value | string | string |