Zextras Workstream Collaboration Chats Api v1.3.1
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Zextras Carbonio Workstream Collaboration Chats HTTP APIs definition.
Base URLs:
Rooms
listRoom
Code samples
# You can also use wget
curl -X GET http://localhost:10000/rooms \
-H 'Accept: application/json'
GET http://localhost:10000/rooms HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/rooms',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/rooms', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/rooms", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/rooms', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /rooms
Retrieves a list of every room the user has access to
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
extraFields | query | array[string] | false | Rooms extra fields |
Enumerated Values
Parameter | Value |
---|---|
extraFields | members |
extraFields | settings |
Example responses
200 Response
[
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of every room that the user has access to | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [allOf] | false | none | [Room data] |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | RoomCreationFields | false | none | Room fields for its creation |
»» membersIds | [string] | false | none | members identifiers list to be subscribed to the room |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | RoomEditableFields | false | none | Room fields that can be updated |
»»» name | string | false | none | room name |
»»» description | string | false | none | room description |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» type | RoomType | false | none | Managed room types |
»»» parentId | string(uuid) | false | none | identifier of the referenced workspace |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» id | string(uuid) | false | read-only | room identifier |
»» rank | integer | false | read-only | number that defines the sorting position for workspaces room |
»» meetingId | string(uuid) | false | read-only | identifier of associated meeting |
»» createdAt | string(date-time) | false | read-only | entity creation date |
»» updatedAt | string(date-time) | false | read-only | entity update date |
»» pictureUpdatedAt | string(date-time) | false | read-only | room profile picture update timestamp, returned only if the room picture was set at least once |
»» children | [allOf] | false | none | Room data |
»» members | [Member] | false | none | list of users subscribed to the room |
»»» userId | string(uuid) | true | none | user identifier |
»»» owner | boolean | true | none | indicates whether it is the owner |
»» userSettings | RoomUserSettings | false | none | Preferences that an user has set for a room |
»»» muted | boolean | true | none | indicates whether the user has muted |
»»» clearedAt | string(date-time) | true | none | room clear history date, returned only if the room clear history has been cleared at least once |
Enumerated Values
Property | Value |
---|---|
type | group |
type | one_to_one |
type | workspace |
type | channel |
type | temporary |
insertRoom
Code samples
# You can also use wget
curl -X POST http://localhost:10000/rooms \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST http://localhost:10000/rooms HTTP/1.1
Host: localhost:10000
Content-Type: application/json
Accept: application/json
const inputBody = '{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'http://localhost:10000/rooms',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('http://localhost:10000/rooms', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:10000/rooms", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:10000/rooms', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /rooms
Insert a room of the specified type
Inserts a room of the specified type. The user performing the request will be included in the final members list if not specified. If the room is a one to one, only a single member can be specified and name and description are replaced with an empty string. If the room is not a one to one, there must be at least two members specified.
Body parameter
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | RoomCreationFields | true | room to insert |
Example responses
201 Response
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The newly created room | Room |
400 | Bad Request | The request had wrong or missing parameters | None |
403 | Forbidden | The requester could not access the resource | None |
409 | Conflict | The request conflict with the current state | None |
getRoom
Code samples
# You can also use wget
curl -X GET http://localhost:10000/rooms/{roomId} \
-H 'Accept: application/json'
GET http://localhost:10000/rooms/{roomId} HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/rooms/{roomId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/rooms/{roomId}', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/rooms/{roomId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/rooms/{roomId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /rooms/{roomId}
Retrieves the requested room
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Example responses
200 Response
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Requested room | Room |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
updateRoom
Code samples
# You can also use wget
curl -X PUT http://localhost:10000/rooms/{roomId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PUT http://localhost:10000/rooms/{roomId} HTTP/1.1
Host: localhost:10000
Content-Type: application/json
Accept: application/json
const inputBody = '{
"name": "string",
"description": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"name": "string",
"description": "string"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}',
{
method: 'PUT',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.put 'http://localhost:10000/rooms/{roomId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('http://localhost:10000/rooms/{roomId}', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:10000/rooms/{roomId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:10000/rooms/{roomId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
PUT /rooms/{roomId}
Updates a room information
Body parameter
{
"name": "string",
"description": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
body | body | RoomEditableFields | true | room fields to update |
Example responses
200 Response
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Updated room | Room |
400 | Bad Request | The request had wrong or missing parameters | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
deleteRoom
Code samples
# You can also use wget
curl -X DELETE http://localhost:10000/rooms/{roomId}
DELETE http://localhost:10000/rooms/{roomId} HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/rooms/{roomId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/rooms/{roomId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:10000/rooms/{roomId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:10000/rooms/{roomId}')
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:10000/rooms/{roomId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('DELETE','http://localhost:10000/rooms/{roomId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /rooms/{roomId}
Deletes the specified room
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Room was deleted correctly or it never existed | None |
403 | Forbidden | The requester could not access the resource | None |
getRoomPicture
Code samples
# You can also use wget
curl -X GET http://localhost:10000/rooms/{roomId}/picture \
-H 'Accept: application/octet-stream'
GET http://localhost:10000/rooms/{roomId}/picture HTTP/1.1
Host: localhost:10000
Accept: application/octet-stream
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/rooms/{roomId}/picture',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/rooms/{roomId}/picture',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/octet-stream'
}
result = RestClient.get 'http://localhost:10000/rooms/{roomId}/picture',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/octet-stream'
}
r = requests.get('http://localhost:10000/rooms/{roomId}/picture', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/octet-stream"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/rooms/{roomId}/picture", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/rooms/{roomId}/picture', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /rooms/{roomId}/picture
Retrieves the room picture
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested picture | string |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
updateRoomPicture
Code samples
# You can also use wget
curl -X PUT http://localhost:10000/rooms/{roomId}/picture \
-H 'Content-Type: application/octet-stream' \
-H 'fileName: string' \
-H 'mimeType: string' \
-H 'Content-Length: null'
PUT http://localhost:10000/rooms/{roomId}/picture HTTP/1.1
Host: localhost:10000
Content-Type: application/octet-stream
fileName: string
mimeType: string
Content-Length: null
const inputBody = 'string';
const headers = {
'Content-Type':'application/octet-stream',
'fileName':'string',
'mimeType':'string',
'Content-Length':null
};
fetch('http://localhost:10000/rooms/{roomId}/picture',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = string;
const headers = {
'Content-Type':'application/octet-stream',
'fileName':'string',
'mimeType':'string',
'Content-Length':null
};
fetch('http://localhost:10000/rooms/{roomId}/picture',
{
method: 'PUT',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/octet-stream',
'fileName' => 'string',
'mimeType' => 'string',
'Content-Length' => null
}
result = RestClient.put 'http://localhost:10000/rooms/{roomId}/picture',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/octet-stream',
'fileName': 'string',
'mimeType': 'string',
'Content-Length': null
}
r = requests.put('http://localhost:10000/rooms/{roomId}/picture', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/octet-stream"},
"fileName": []string{"string"},
"mimeType": []string{"string"},
"Content-Length": []string{"null"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:10000/rooms/{roomId}/picture", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
'fileName' => 'string',
'mimeType' => 'string',
'Content-Length' => 'null',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:10000/rooms/{roomId}/picture', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
PUT /rooms/{roomId}/picture
Uploads and sets a new room picture
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
fileName | header | string | true | file name encoded to unicode |
mimeType | header | string | true | content type |
Content-Length | header | long | true | content length |
body | body | string(binary) | true | image to set |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Room picture was changed correctly | None |
deleteRoomPicture
Code samples
# You can also use wget
curl -X DELETE http://localhost:10000/rooms/{roomId}/picture
DELETE http://localhost:10000/rooms/{roomId}/picture HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/rooms/{roomId}/picture',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/rooms/{roomId}/picture',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:10000/rooms/{roomId}/picture',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:10000/rooms/{roomId}/picture')
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:10000/rooms/{roomId}/picture", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('DELETE','http://localhost:10000/rooms/{roomId}/picture', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /rooms/{roomId}/picture
Delete the room picture
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Room picture was deleted correctly | None |
401 | Unauthorized | User not authorized | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
muteRoom
Code samples
# You can also use wget
curl -X PUT http://localhost:10000/rooms/{roomId}/mute
PUT http://localhost:10000/rooms/{roomId}/mute HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/rooms/{roomId}/mute',
{
method: 'PUT'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/rooms/{roomId}/mute',
{
method: 'PUT'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.put 'http://localhost:10000/rooms/{roomId}/mute',
params: {
}
p JSON.parse(result)
import requests
r = requests.put('http://localhost:10000/rooms/{roomId}/mute')
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/mute");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:10000/rooms/{roomId}/mute", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('PUT','http://localhost:10000/rooms/{roomId}/mute', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
PUT /rooms/{roomId}/mute
Mutes notification for the specified room
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Room was muted correctly | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
unmuteRoom
Code samples
# You can also use wget
curl -X DELETE http://localhost:10000/rooms/{roomId}/mute
DELETE http://localhost:10000/rooms/{roomId}/mute HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/rooms/{roomId}/mute',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/rooms/{roomId}/mute',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:10000/rooms/{roomId}/mute',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:10000/rooms/{roomId}/mute')
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/mute");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:10000/rooms/{roomId}/mute", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('DELETE','http://localhost:10000/rooms/{roomId}/mute', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /rooms/{roomId}/mute
Unmutes notification for the specified room
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Room was unmuted correctly | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
clearRoomHistory
Code samples
# You can also use wget
curl -X PUT http://localhost:10000/rooms/{roomId}/clear \
-H 'Accept: application/json'
PUT http://localhost:10000/rooms/{roomId}/clear HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/clear',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/clear',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.put 'http://localhost:10000/rooms/{roomId}/clear',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.put('http://localhost:10000/rooms/{roomId}/clear', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/clear");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:10000/rooms/{roomId}/clear", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:10000/rooms/{roomId}/clear', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
PUT /rooms/{roomId}/clear
Clears all messages for the specified room
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Example responses
200 Response
{
"clearedAt": "2019-08-24T14:15:22Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cleaning date of messages | ClearedDate |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
updateWorkspacesRank
Code samples
# You can also use wget
curl -X PUT http://localhost:10000/rooms/workspaces/rank \
-H 'Content-Type: application/json'
PUT http://localhost:10000/rooms/workspaces/rank HTTP/1.1
Host: localhost:10000
Content-Type: application/json
const inputBody = '[
{
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"rank": 0
}
]';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:10000/rooms/workspaces/rank',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = [
{
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"rank": 0
}
];
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:10000/rooms/workspaces/rank',
{
method: 'PUT',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:10000/rooms/workspaces/rank',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:10000/rooms/workspaces/rank', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/workspaces/rank");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:10000/rooms/workspaces/rank", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:10000/rooms/workspaces/rank', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
PUT /rooms/workspaces/rank
Updates the workspaces order for the authenticated user
Body parameter
[
{
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"rank": 0
}
]
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | RoomRanks | true | workspaces list with their rank |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | workspaces’s order is updated | None |
updateChannelsRank
Code samples
# You can also use wget
curl -X PUT http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank \
-H 'Content-Type: application/json'
PUT http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank HTTP/1.1
Host: localhost:10000
Content-Type: application/json
const inputBody = '[
{
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"rank": 0
}
]';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = [
{
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"rank": 0
}
];
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank',
{
method: 'PUT',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:10000/rooms/workspaces/{workspaceId}/channels/rank', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
PUT /rooms/workspaces/{workspaceId}/channels/rank
Updates the channels order in the workspace
Body parameter
[
{
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"rank": 0
}
]
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
workspaceId | path | string(uuid) | true | workspace identifier |
body | body | RoomRanks | true | channels list with their rank |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | channels’s order is updated | None |
insertRoomMember
Code samples
# You can also use wget
curl -X POST http://localhost:10000/rooms/{roomId}/members \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST http://localhost:10000/rooms/{roomId}/members HTTP/1.1
Host: localhost:10000
Content-Type: application/json
Accept: application/json
const inputBody = '{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false,
"historyCleared": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/members',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false,
"historyCleared": true
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/members',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'http://localhost:10000/rooms/{roomId}/members',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('http://localhost:10000/rooms/{roomId}/members', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/members");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:10000/rooms/{roomId}/members", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:10000/rooms/{roomId}/members', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /rooms/{roomId}/members
Adds or invites the specified user to the room
Adds the specified user to the room. This can only be performed by an owner of the given room
Body parameter
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false,
"historyCleared": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
body | body | MemberToInsert | true | member to add or invite |
Example responses
201 Response
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false,
"clearedAt": "2019-08-24T14:15:22Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The member added or invited | MemberInserted |
400 | Bad Request | The request had wrong or missing parameters | None |
403 | Forbidden | The requester could not access the resource | None |
listRoomAttachmentInfo
Code samples
# You can also use wget
curl -X GET http://localhost:10000/rooms/{roomId}/attachments \
-H 'Accept: application/json'
GET http://localhost:10000/rooms/{roomId}/attachments HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/attachments',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/attachments',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/rooms/{roomId}/attachments',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/rooms/{roomId}/attachments', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/attachments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/rooms/{roomId}/attachments", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/rooms/{roomId}/attachments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /rooms/{roomId}/attachments
Retrieves paged list of metadata of every attachment uploaded to the room and the filter for the next page
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
itemsNumber | query | integer | false | number of page items |
filter | query | string | false | pagination filter |
Example responses
200 Response
{
"filter": "string",
"attachments": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"size": 0,
"mimeType": "string",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"createdAt": "2019-08-24T14:15:22Z",
"area": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Paged list of metadata of every attachment uploaded to the room | AttachmentsPagination |
401 | Unauthorized | User not authorized | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
insertAttachment
Code samples
# You can also use wget
curl -X POST http://localhost:10000/rooms/{roomId}/attachments \
-H 'Content-Type: application/octet-stream' \
-H 'Accept: application/json' \
-H 'fileName: string' \
-H 'mimeType: string' \
-H 'description: string' \
-H 'messageId: string' \
-H 'replyId: string' \
-H 'area: string' \
-H 'Content-Length: null'
POST http://localhost:10000/rooms/{roomId}/attachments HTTP/1.1
Host: localhost:10000
Content-Type: application/octet-stream
Accept: application/json
fileName: string
mimeType: string
description: string
messageId: string
replyId: string
area: string
Content-Length: null
const inputBody = 'string';
const headers = {
'Content-Type':'application/octet-stream',
'Accept':'application/json',
'fileName':'string',
'mimeType':'string',
'description':'string',
'messageId':'string',
'replyId':'string',
'area':'string',
'Content-Length':null
};
fetch('http://localhost:10000/rooms/{roomId}/attachments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = string;
const headers = {
'Content-Type':'application/octet-stream',
'Accept':'application/json',
'fileName':'string',
'mimeType':'string',
'description':'string',
'messageId':'string',
'replyId':'string',
'area':'string',
'Content-Length':null
};
fetch('http://localhost:10000/rooms/{roomId}/attachments',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/octet-stream',
'Accept' => 'application/json',
'fileName' => 'string',
'mimeType' => 'string',
'description' => 'string',
'messageId' => 'string',
'replyId' => 'string',
'area' => 'string',
'Content-Length' => null
}
result = RestClient.post 'http://localhost:10000/rooms/{roomId}/attachments',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/octet-stream',
'Accept': 'application/json',
'fileName': 'string',
'mimeType': 'string',
'description': 'string',
'messageId': 'string',
'replyId': 'string',
'area': 'string',
'Content-Length': null
}
r = requests.post('http://localhost:10000/rooms/{roomId}/attachments', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/attachments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/octet-stream"},
"Accept": []string{"application/json"},
"fileName": []string{"string"},
"mimeType": []string{"string"},
"description": []string{"string"},
"messageId": []string{"string"},
"replyId": []string{"string"},
"area": []string{"string"},
"Content-Length": []string{"null"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:10000/rooms/{roomId}/attachments", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
'Accept' => 'application/json',
'fileName' => 'string',
'mimeType' => 'string',
'description' => 'string',
'messageId' => 'string',
'replyId' => 'string',
'area' => 'string',
'Content-Length' => 'null',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:10000/rooms/{roomId}/attachments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /rooms/{roomId}/attachments
Insert an attachment
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
fileName | header | string | true | file name encoded to unicode |
mimeType | header | string | true | content type |
description | header | string | false | description encoded to unicode |
messageId | header | string | false | description |
replyId | header | string | false | identifier of the message being replied to |
area | header | string | false | attachment's area |
Content-Length | header | long | true | content length |
body | body | string(binary) | true | file stream |
Example responses
201 Response
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | File identifier | Id |
413 | Payload Too Large | The request had a payload that was too big | None |
forwardMessages
Code samples
# You can also use wget
curl -X POST http://localhost:10000/rooms/{roomId}/forward \
-H 'Content-Type: application/json'
POST http://localhost:10000/rooms/{roomId}/forward HTTP/1.1
Host: localhost:10000
Content-Type: application/json
const inputBody = '[
{
"originalMessage": "string",
"originalMessageSentAt": "2019-08-24T14:15:22Z",
"description": "string"
}
]';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/forward',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = [
{
"originalMessage": "string",
"originalMessageSentAt": "2019-08-24T14:15:22Z",
"description": "string"
}
];
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/forward',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:10000/rooms/{roomId}/forward',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:10000/rooms/{roomId}/forward', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/forward");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:10000/rooms/{roomId}/forward", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:10000/rooms/{roomId}/forward', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /rooms/{roomId}/forward
Message forwarding
Body parameter
[
{
"originalMessage": "string",
"originalMessageSentAt": "2019-08-24T14:15:22Z",
"description": "string"
}
]
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
body | body | ForwardMessagesList | true | Messages forwarding request |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | successfully forwarded the messages | None |
401 | Unauthorized | User not authorized | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
Members
listRoomMember
Code samples
# You can also use wget
curl -X GET http://localhost:10000/rooms/{roomId}/members \
-H 'Accept: application/json'
GET http://localhost:10000/rooms/{roomId}/members HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/members',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/members',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/rooms/{roomId}/members',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/rooms/{roomId}/members', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/members");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/rooms/{roomId}/members", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/rooms/{roomId}/members', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /rooms/{roomId}/members
Retrieves every member to the given room
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Example responses
200 Response
[
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The room members list | Inline |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [Member] | false | none | [Information about a user's role in the room] |
» userId | string(uuid) | true | none | user identifier |
» owner | boolean | true | none | indicates whether it is the owner |
deleteRoomMember
Code samples
# You can also use wget
curl -X DELETE http://localhost:10000/rooms/{roomId}/members/{userId}
DELETE http://localhost:10000/rooms/{roomId}/members/{userId} HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/rooms/{roomId}/members/{userId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/rooms/{roomId}/members/{userId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:10000/rooms/{roomId}/members/{userId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:10000/rooms/{roomId}/members/{userId}')
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/members/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:10000/rooms/{roomId}/members/{userId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('DELETE','http://localhost:10000/rooms/{roomId}/members/{userId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /rooms/{roomId}/members/{userId}
Removes a member from the room
Removes a member from the specified room. If the specified user is different from the requester, this action is considered as a kick
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
userId | path | string(uuid) | true | user identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The member was deleted correctly or it never existed | None |
403 | Forbidden | The requester could not access the resource | None |
updateToOwner
Code samples
# You can also use wget
curl -X PUT http://localhost:10000/rooms/{roomId}/members/{userId}/owner
PUT http://localhost:10000/rooms/{roomId}/members/{userId}/owner HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/rooms/{roomId}/members/{userId}/owner',
{
method: 'PUT'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/rooms/{roomId}/members/{userId}/owner',
{
method: 'PUT'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.put 'http://localhost:10000/rooms/{roomId}/members/{userId}/owner',
params: {
}
p JSON.parse(result)
import requests
r = requests.put('http://localhost:10000/rooms/{roomId}/members/{userId}/owner')
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/members/{userId}/owner");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:10000/rooms/{roomId}/members/{userId}/owner", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('PUT','http://localhost:10000/rooms/{roomId}/members/{userId}/owner', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
PUT /rooms/{roomId}/members/{userId}/owner
Promotes a member to owner
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
userId | path | string(uuid) | true | user identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The member was promoted | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
deleteOwner
Code samples
# You can also use wget
curl -X DELETE http://localhost:10000/rooms/{roomId}/members/{userId}/owner
DELETE http://localhost:10000/rooms/{roomId}/members/{userId}/owner HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/rooms/{roomId}/members/{userId}/owner',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/rooms/{roomId}/members/{userId}/owner',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:10000/rooms/{roomId}/members/{userId}/owner',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:10000/rooms/{roomId}/members/{userId}/owner')
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/members/{userId}/owner");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:10000/rooms/{roomId}/members/{userId}/owner", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('DELETE','http://localhost:10000/rooms/{roomId}/members/{userId}/owner', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /rooms/{roomId}/members/{userId}/owner
Demotes a member from owner to normal member
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
userId | path | string(uuid) | true | user identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The member was demoted | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
Users
getUsers
Code samples
# You can also use wget
curl -X GET http://localhost:10000/users?userIds=string \
-H 'Accept: application/json'
GET http://localhost:10000/users?userIds=string HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/users?userIds=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/users?userIds=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/users',
params: {
'userIds' => 'array[string]'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/users', params={
'userIds': [
"string"
]
}, headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/users?userIds=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/users", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/users', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /users
Retrieves users
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userIds | query | array[string] | true | List of ids (max 10) of the users to retrieve |
Example responses
200 Response
[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"email": "user@example.com",
"name": "string",
"type": "internal",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"statusMessage": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested users list | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [User] | false | none | [User data] |
» id | string(uuid) | true | read-only | user's id |
string(email) | true | read-only | user's email | |
» name | string | true | read-only | user's name |
» type | string | false | read-only | user type |
» pictureUpdatedAt | string(date-time) | false | read-only | user profile picture update timestamp, returned only if the room picture was set at least once |
» statusMessage | string | false | none | the user's status message |
Enumerated Values
Property | Value |
---|---|
type | internal |
type | guest |
getCapabilities
Code samples
# You can also use wget
curl -X GET http://localhost:10000/users/capabilities \
-H 'Accept: application/json'
GET http://localhost:10000/users/capabilities HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/users/capabilities',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/users/capabilities',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/users/capabilities',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/users/capabilities', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/users/capabilities");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/users/capabilities", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/users/capabilities', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /users/capabilities
Retrieve current user capabilities
Example responses
200 Response
{
"canSeeMessageReads": true,
"canSeeUsersPresence": true,
"canVideoCall": true,
"canVideoCallRecord": true,
"canUseVirtualBackground": true,
"editMessageTimeLimitInMinutes": 0,
"deleteMessageTimeLimitInMinutes": 0,
"maxGroupMembers": 0,
"maxRoomImageSizeInKb": 0,
"maxUserImageSizeInKb": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | User capabilities | Capabilities |
401 | Unauthorized | User not authorized | None |
getUser
Code samples
# You can also use wget
curl -X GET http://localhost:10000/users/{userId} \
-H 'Accept: application/json'
GET http://localhost:10000/users/{userId} HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/users/{userId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/users/{userId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/users/{userId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/users/{userId}', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/users/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/users/{userId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/users/{userId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /users/{userId}
Retrieves a user
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userId | path | string(uuid) | true | user identifier |
Example responses
200 Response
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"email": "user@example.com",
"name": "string",
"type": "internal",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"statusMessage": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Requested user | User |
404 | Not Found | The requested resource was not found | None |
getUserPicture
Code samples
# You can also use wget
curl -X GET http://localhost:10000/users/{userId}/picture \
-H 'Accept: application/octet-stream'
GET http://localhost:10000/users/{userId}/picture HTTP/1.1
Host: localhost:10000
Accept: application/octet-stream
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/users/{userId}/picture',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/users/{userId}/picture',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/octet-stream'
}
result = RestClient.get 'http://localhost:10000/users/{userId}/picture',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/octet-stream'
}
r = requests.get('http://localhost:10000/users/{userId}/picture', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/users/{userId}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/octet-stream"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/users/{userId}/picture", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/users/{userId}/picture', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /users/{userId}/picture
Retrieves the user picture
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userId | path | string(uuid) | true | user identifier |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested picture | string |
401 | Unauthorized | User not authorized | None |
404 | Not Found | The requested resource was not found | None |
updateUserPicture
Code samples
# You can also use wget
curl -X PUT http://localhost:10000/users/{userId}/picture \
-H 'Content-Type: application/octet-stream' \
-H 'fileName: string' \
-H 'mimeType: string' \
-H 'Content-Length: null'
PUT http://localhost:10000/users/{userId}/picture HTTP/1.1
Host: localhost:10000
Content-Type: application/octet-stream
fileName: string
mimeType: string
Content-Length: null
const inputBody = 'string';
const headers = {
'Content-Type':'application/octet-stream',
'fileName':'string',
'mimeType':'string',
'Content-Length':null
};
fetch('http://localhost:10000/users/{userId}/picture',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = string;
const headers = {
'Content-Type':'application/octet-stream',
'fileName':'string',
'mimeType':'string',
'Content-Length':null
};
fetch('http://localhost:10000/users/{userId}/picture',
{
method: 'PUT',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/octet-stream',
'fileName' => 'string',
'mimeType' => 'string',
'Content-Length' => null
}
result = RestClient.put 'http://localhost:10000/users/{userId}/picture',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/octet-stream',
'fileName': 'string',
'mimeType': 'string',
'Content-Length': null
}
r = requests.put('http://localhost:10000/users/{userId}/picture', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/users/{userId}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/octet-stream"},
"fileName": []string{"string"},
"mimeType": []string{"string"},
"Content-Length": []string{"null"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:10000/users/{userId}/picture", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
'fileName' => 'string',
'mimeType' => 'string',
'Content-Length' => 'null',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:10000/users/{userId}/picture', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
PUT /users/{userId}/picture
Uploads and sets a new user picture
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userId | path | string(uuid) | true | user identifier |
fileName | header | string | true | file name encoded to unicode |
mimeType | header | string | true | content type |
Content-Length | header | long | true | content length |
body | body | string(binary) | true | image to set |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | User picture was changed correctly | None |
400 | Bad Request | The request had wrong or missing parameters | None |
401 | Unauthorized | User not authorized | None |
403 | Forbidden | The requester could not access the resource | None |
deleteUserPicture
Code samples
# You can also use wget
curl -X DELETE http://localhost:10000/users/{userId}/picture
DELETE http://localhost:10000/users/{userId}/picture HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/users/{userId}/picture',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/users/{userId}/picture',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:10000/users/{userId}/picture',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:10000/users/{userId}/picture')
print(r.json())
URL obj = new URL("http://localhost:10000/users/{userId}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:10000/users/{userId}/picture", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('DELETE','http://localhost:10000/users/{userId}/picture', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /users/{userId}/picture
Delete the user picture
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userId | path | string(uuid) | true | user identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | User picture was deleted correctly | None |
401 | Unauthorized | User not authorized | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
Attachments
deleteAttachment
Code samples
# You can also use wget
curl -X DELETE http://localhost:10000/attachments/{fileId}
DELETE http://localhost:10000/attachments/{fileId} HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/attachments/{fileId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/attachments/{fileId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:10000/attachments/{fileId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:10000/attachments/{fileId}')
print(r.json())
URL obj = new URL("http://localhost:10000/attachments/{fileId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:10000/attachments/{fileId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('DELETE','http://localhost:10000/attachments/{fileId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /attachments/{fileId}
Deletes an uploaded attachment
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string(uuid) | true | file identifier |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The file was deleted correctly | None |
403 | Forbidden | The requester could not access the resource | None |
getAttachmentInfo
Code samples
# You can also use wget
curl -X GET http://localhost:10000/attachments/{fileId} \
-H 'Accept: application/json'
GET http://localhost:10000/attachments/{fileId} HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/attachments/{fileId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/attachments/{fileId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/attachments/{fileId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/attachments/{fileId}', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/attachments/{fileId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/attachments/{fileId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/attachments/{fileId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /attachments/{fileId}
Retrieves info related to an uploaded attachment
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string(uuid) | true | file identifier |
Example responses
200 Response
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"size": 0,
"mimeType": "string",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"createdAt": "2019-08-24T14:15:22Z",
"area": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Attachment informations | Attachment |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
getAttachment
Code samples
# You can also use wget
curl -X GET http://localhost:10000/attachments/{fileId}/download \
-H 'Accept: application/octet-stream'
GET http://localhost:10000/attachments/{fileId}/download HTTP/1.1
Host: localhost:10000
Accept: application/octet-stream
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/attachments/{fileId}/download',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/attachments/{fileId}/download',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/octet-stream'
}
result = RestClient.get 'http://localhost:10000/attachments/{fileId}/download',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/octet-stream'
}
r = requests.get('http://localhost:10000/attachments/{fileId}/download', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/attachments/{fileId}/download");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/octet-stream"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/attachments/{fileId}/download", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/attachments/{fileId}/download', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /attachments/{fileId}/download
Retrieves an uploaded attachment
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string(uuid) | true | file identifier |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested file | string |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
Health
getHealthStatus
Code samples
# You can also use wget
curl -X GET http://localhost:10000/health \
-H 'Accept: application/json'
GET http://localhost:10000/health HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/health',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/health',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/health',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/health', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/health");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/health", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/health', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /health
Returns the general service status
Example responses
200 Response
{
"isLive": true,
"status": "ok",
"dependencies": [
{
"name": "database",
"isHealthy": true
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | General status of the service and its dependencies | HealthStatus |
isLive
Code samples
# You can also use wget
curl -X GET http://localhost:10000/health/live
GET http://localhost:10000/health/live HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/health/live',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/health/live',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:10000/health/live',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:10000/health/live')
print(r.json())
URL obj = new URL("http://localhost:10000/health/live");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/health/live", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('GET','http://localhost:10000/health/live', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /health/live
Returns 204 if the service is alive
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The service is alive | None |
isReady
Code samples
# You can also use wget
curl -X GET http://localhost:10000/health/ready
GET http://localhost:10000/health/ready HTTP/1.1
Host: localhost:10000
fetch('http://localhost:10000/health/ready',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
fetch('http://localhost:10000/health/ready',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:10000/health/ready',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:10000/health/ready')
print(r.json())
URL obj = new URL("http://localhost:10000/health/ready");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/health/ready", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
request('GET','http://localhost:10000/health/ready', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /health/ready
Returns 204 if the service is ready to receive requests
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The service is ready to receive requests | None |
429 | Too Many Requests | The service is ready but some non-fundamental dependencies are not reachable | None |
500 | Internal Server Error | The service is not yet ready to receive requests | None |
Authentication
getTokens
Code samples
# You can also use wget
curl -X GET http://localhost:10000/auth/token \
-H 'Accept: application/json'
GET http://localhost:10000/auth/token HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/auth/token',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/auth/token',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/auth/token',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/auth/token', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/auth/token");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/auth/token", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/auth/token', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /auth/token
Retrives the authenticated tokens
Example responses
200 Response
{
"zmToken": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The authenticated tokens. | Token |
401 | Unauthorized | User not authorized | None |
404 | Not Found | The requested resource was not found | None |
Meetings
getMeetingByRoomId
Code samples
# You can also use wget
curl -X GET http://localhost:10000/rooms/{roomId}/meeting \
-H 'Accept: application/json'
GET http://localhost:10000/rooms/{roomId}/meeting HTTP/1.1
Host: localhost:10000
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/meeting',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:10000/rooms/{roomId}/meeting',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:10000/rooms/{roomId}/meeting',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:10000/rooms/{roomId}/meeting', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/rooms/{roomId}/meeting");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/rooms/{roomId}/meeting", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/rooms/{roomId}/meeting', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /rooms/{roomId}/meeting
Retrieves the meeting associated with the requested room
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
roomId | path | string(uuid) | true | room identifier |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Gets the requested meeting data | None |
401 | Unauthorized | User not authorized | None |
403 | Forbidden | The requester could not access the resource | None |
404 | Not Found | The requested resource was not found | None |
Response Schema
Preview
getImagePreview
Code samples
# You can also use wget
curl -X GET http://localhost:10000/preview/image/{fileId}/{area}/ \
-H 'Accept: application/octet-stream'
GET http://localhost:10000/preview/image/{fileId}/{area}/ HTTP/1.1
Host: localhost:10000
Accept: application/octet-stream
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/preview/image/{fileId}/{area}/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/preview/image/{fileId}/{area}/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/octet-stream'
}
result = RestClient.get 'http://localhost:10000/preview/image/{fileId}/{area}/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/octet-stream'
}
r = requests.get('http://localhost:10000/preview/image/{fileId}/{area}/', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/preview/image/{fileId}/{area}/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/octet-stream"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/preview/image/{fileId}/{area}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/preview/image/{fileId}/{area}/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/image/{fileId}/{area}/
Get image preview
Creates and returns a preview of the image fetched by id with the given size, quality and format
- fileId: UUID of the image
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- crop: True will crop the picture starting from the borders. This option will lose information, leaving it False will scale and have borders to fill the requested size.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string(uuid) | true | file identifier |
area | path | string | true | none |
quality | query | ImageQualityEnum | false | none |
output_format | query | any | false | none |
crop | query | boolean | false | none |
Enumerated Values
Parameter | Value |
---|---|
quality | Lowest |
quality | Low |
quality | Medium |
quality | High |
quality | Highest |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The preview of the requested file | string |
400 | Bad Request | The request had wrong or missing parameters | None |
404 | Not Found | The requested resource was not found | None |
getImageThumbnail
Code samples
# You can also use wget
curl -X GET http://localhost:10000/preview/image/{fileId}/{area}/thumbnail \
-H 'Accept: application/octet-stream'
GET http://localhost:10000/preview/image/{fileId}/{area}/thumbnail HTTP/1.1
Host: localhost:10000
Accept: application/octet-stream
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/preview/image/{fileId}/{area}/thumbnail',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/preview/image/{fileId}/{area}/thumbnail',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/octet-stream'
}
result = RestClient.get 'http://localhost:10000/preview/image/{fileId}/{area}/thumbnail',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/octet-stream'
}
r = requests.get('http://localhost:10000/preview/image/{fileId}/{area}/thumbnail', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/preview/image/{fileId}/{area}/thumbnail");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/octet-stream"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/preview/image/{fileId}/{area}/thumbnail", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/preview/image/{fileId}/{area}/thumbnail', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/image/{fileId}/{area}/thumbnail
Get image thumbnail
Creates and returns a preview of the image fetched by id with the given size, quality and format
- fileId: UUID of the image
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- shape: Rounded and Rectangular are currently supported.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string(uuid) | true | file identifier |
area | path | string | true | none |
quality | query | ImageQualityEnum | false | none |
output_format | query | any | false | none |
shape | query | any | false | none |
Enumerated Values
Parameter | Value |
---|---|
quality | Lowest |
quality | Low |
quality | Medium |
quality | High |
quality | Highest |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The preview of the requested file | string |
400 | Bad Request | The request had wrong or missing parameters | None |
404 | Not Found | The requested resource was not found | None |
getPdfPreview
Code samples
# You can also use wget
curl -X GET http://localhost:10000/preview/pdf/{fileId}/ \
-H 'Accept: application/octet-stream'
GET http://localhost:10000/preview/pdf/{fileId}/ HTTP/1.1
Host: localhost:10000
Accept: application/octet-stream
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/preview/pdf/{fileId}/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/preview/pdf/{fileId}/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/octet-stream'
}
result = RestClient.get 'http://localhost:10000/preview/pdf/{fileId}/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/octet-stream'
}
r = requests.get('http://localhost:10000/preview/pdf/{fileId}/', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/preview/pdf/{fileId}/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/octet-stream"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/preview/pdf/{fileId}/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/preview/pdf/{fileId}/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/pdf/{fileId}/
Get pdf preview
Creates and returns a preview of the pdf fetched by id, the pdf file will contain the first and last page given. With default values it will return a pdf with all the pages.
- fileId: UUID of the pdf
- first_page: integer value of first page to preview (n>=1)
- last_page: integer value of last page to preview (0 = last of the original pdf)
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string(uuid) | true | file identifier |
firstPage | query | integer | false | none |
lastPage | query | integer | false | none |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The preview of the requested file | string |
400 | Bad Request | The request had wrong or missing parameters | None |
404 | Not Found | The requested resource was not found | None |
getPdfThumbnail
Code samples
# You can also use wget
curl -X GET http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail \
-H 'Accept: application/octet-stream'
GET http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail HTTP/1.1
Host: localhost:10000
Accept: application/octet-stream
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/octet-stream'
}
result = RestClient.get 'http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/octet-stream'
}
r = requests.get('http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail', headers = headers)
print(r.json())
URL obj = new URL("http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/octet-stream"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/octet-stream',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:10000/preview/pdf/{fileId}/{area}/thumbnail', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /preview/pdf/{fileId}/{area}/thumbnail
Get pdf thumbnail
Creates and returns a preview of the pdf fetched by id with the given size, quality and format
- fileId: UUID of the pdf
- quality: quality of the output image (the higher you go the slower the process)
- output_format: format of the output image
- area: width of the output image (>=0) x height of the output image (>=0), width x height => 100x200. The first is width, the latter height, the order is important!
- shape: Rounded and Rectangular are currently supported.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string(uuid) | true | file identifier |
area | path | string | true | none |
quality | query | ImageQualityEnum | false | none |
output_format | query | any | false | none |
shape | query | any | false | none |
Enumerated Values
Parameter | Value |
---|---|
quality | Lowest |
quality | Low |
quality | Medium |
quality | High |
quality | Highest |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The preview of the requested file | string |
400 | Bad Request | The request had wrong or missing parameters | None |
404 | Not Found | The requested resource was not found | None |
Schemas
Error
{
"traceId": "string",
"message": "string"
}
Error object returned from requests with developer mode active
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
traceId | string | false | read-only | random hash used to identify the error within logs |
message | string | false | read-only | a message describing the error |
HealthStatus
{
"isLive": true,
"status": "ok",
"dependencies": [
{
"name": "database",
"isHealthy": true
}
]
}
Health status of the service and its dependencies
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
isLive | boolean | false | read-only | describes if the service is alive |
status | HealthStatusType | false | none | Health status types |
dependencies | [DependencyHealth] | false | none | health of this service dependencies |
HealthStatusType
"ok"
Health status types
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Health status types |
Enumerated Values
Property | Value |
---|---|
anonymous | ok |
anonymous | warn |
anonymous | error |
DependencyHealth
{
"name": "database",
"isHealthy": true
}
Health status of a service dependency
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | DependencyHealthType | false | none | Health dependency types |
isHealthy | boolean | false | read-only | whether the dependency is available and operative |
DependencyHealthType
"database"
Health dependency types
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Health dependency types |
Enumerated Values
Property | Value |
---|---|
anonymous | database |
anonymous | xmpp_server |
anonymous | event_dispatcher |
anonymous | storage_service |
anonymous | previewer_service |
anonymous | authentication_service |
anonymous | profiling_service |
anonymous | videoserver_service |
Id
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
Identifier object
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | true | read-only | identifier |
ClearedDate
{
"clearedAt": "2019-08-24T14:15:22Z"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
clearedAt | string(date-time) | true | read-only | date since messages were cleared |
Capabilities
{
"canSeeMessageReads": true,
"canSeeUsersPresence": true,
"canVideoCall": true,
"canVideoCallRecord": true,
"canUseVirtualBackground": true,
"editMessageTimeLimitInMinutes": 0,
"deleteMessageTimeLimitInMinutes": 0,
"maxGroupMembers": 0,
"maxRoomImageSizeInKb": 0,
"maxUserImageSizeInKb": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
canSeeMessageReads | boolean | true | none | indicates whether it can see if the messages have been read |
canSeeUsersPresence | boolean | true | none | indicates whether it can see the presence of the other users |
canVideoCall | boolean | true | none | indicates whether it can access video calls |
canVideoCallRecord | boolean | true | none | indicates whether it can record video calls |
canUseVirtualBackground | boolean | true | none | indicates whether it can use a virtual background |
editMessageTimeLimitInMinutes | integer | true | none | limit of minutes within which a message can be edited |
deleteMessageTimeLimitInMinutes | integer | true | none | limit of minutes within which a message can be deleted |
maxGroupMembers | integer | true | none | maximum number of users who can be members of a group |
maxRoomImageSizeInKb | integer | true | none | maximum size for a room image in kB |
maxUserImageSizeInKb | integer | true | none | maximum size for a user image in kB |
User
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"email": "user@example.com",
"name": "string",
"type": "internal",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"statusMessage": "string"
}
User data
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | true | read-only | user's id |
string(email) | true | read-only | user's email | |
name | string | true | read-only | user's name |
type | string | false | read-only | user type |
pictureUpdatedAt | string(date-time) | false | read-only | user profile picture update timestamp, returned only if the room picture was set at least once |
statusMessage | string | false | none | the user's status message |
Enumerated Values
Property | Value |
---|---|
type | internal |
type | guest |
RoomType
"group"
Managed room types
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Managed room types |
Enumerated Values
Property | Value |
---|---|
anonymous | group |
anonymous | one_to_one |
anonymous | workspace |
anonymous | channel |
anonymous | temporary |
RoomEditableFields
{
"name": "string",
"description": "string"
}
Room fields that can be updated
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | room name |
description | string | false | none | room description |
RoomCreationFields
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43"
}
Room fields for its creation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
membersIds | [string] | false | none | members identifiers list to be subscribed to the room |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | RoomEditableFields | false | none | Room fields that can be updated |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» type | RoomType | false | none | Managed room types |
» parentId | string(uuid) | false | none | identifier of the referenced workspace |
Room
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [
{
"membersIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"name": "string",
"description": "string",
"type": "group",
"parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"rank": 0,
"meetingId": "bba231d0-d474-4cf9-bb49-b12d0cb2a3ed",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"pictureUpdatedAt": "2019-08-24T14:15:22Z",
"children": [],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
],
"members": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
],
"userSettings": {
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
}
Room data
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | RoomCreationFields | false | none | Room fields for its creation |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» id | string(uuid) | false | read-only | room identifier |
» rank | integer | false | read-only | number that defines the sorting position for workspaces room |
» meetingId | string(uuid) | false | read-only | identifier of associated meeting |
» createdAt | string(date-time) | false | read-only | entity creation date |
» updatedAt | string(date-time) | false | read-only | entity update date |
» pictureUpdatedAt | string(date-time) | false | read-only | room profile picture update timestamp, returned only if the room picture was set at least once |
» children | [Room] | false | none | [Room data] |
» members | [Member] | false | none | list of users subscribed to the room |
» userSettings | RoomUserSettings | false | none | Preferences that an user has set for a room |
RoomRank
{
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"rank": 0
}
object which defines a room rank
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
roomId | string(uuid) | true | none | room identifier |
rank | integer | true | none | room position |
RoomRanks
[
{
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"rank": 0
}
]
rank room list
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [RoomRank] | false | none | rank room list |
RoomUserSettings
{
"muted": true,
"clearedAt": "2019-08-24T14:15:22Z"
}
Preferences that an user has set for a room
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
muted | boolean | true | none | indicates whether the user has muted |
clearedAt | string(date-time) | true | none | room clear history date, returned only if the room clear history has been cleared at least once |
RoomExtraField
"members"
Room extra fields
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Room extra fields |
Enumerated Values
Property | Value |
---|---|
anonymous | members |
anonymous | settings |
Member
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false
}
Information about a user's role in the room
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
userId | string(uuid) | true | none | user identifier |
owner | boolean | true | none | indicates whether it is the owner |
MemberToInsert
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false,
"historyCleared": true
}
Information about the member to insert in the room
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | Member | false | none | Information about a user's role in the room |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» historyCleared | boolean | true | none | indicates whether it can see previous messages, after it has been added to the room |
MemberInserted
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"owner": false,
"clearedAt": "2019-08-24T14:15:22Z"
}
Information about the member to inserted in the room
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | Member | false | none | Information about a user's role in the room |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» clearedAt | string(date-time) | true | none | room clear history timestamp, returned only if the room history has been cleared at least once |
Attachment
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"size": 0,
"mimeType": "string",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"createdAt": "2019-08-24T14:15:22Z",
"area": "string"
}
Attachment of a message
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | true | read-only | identifier |
name | string | true | none | file name |
size | integer(int64) | true | read-only | file length |
mimeType | string | true | read-only | mime type |
userId | string(uuid) | true | read-only | identifier of updated user |
roomId | string(uuid) | true | read-only | identifier of destination room |
createdAt | string(date-time) | false | read-only | creation date |
area | string | false | read-only | attachment's area |
AttachmentsPagination
{
"filter": "string",
"attachments": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"size": 0,
"mimeType": "string",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"createdAt": "2019-08-24T14:15:22Z",
"area": "string"
}
]
}
Attachment pagination
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
filter | string | false | none | filter for the next page |
attachments | [Attachment] | false | none | paged list of attachments metadata |
Token
{
"zmToken": "string"
}
authenticated tokens
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
zmToken | string | false | none | ZM token |
ImageQualityEnum
"Lowest"
ImageQualityEnum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ImageQualityEnum | string | false | none | Class representing all the image quality accepted values |
Enumerated Values
Property | Value |
---|---|
ImageQualityEnum | Lowest |
ImageQualityEnum | Low |
ImageQualityEnum | Medium |
ImageQualityEnum | High |
ImageQualityEnum | Highest |
ImageTypeEnum
"Jpeg"
ImageTypeEnum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ImageTypeEnum | string | false | none | Class representing all the image type accepted values |
Enumerated Values
Property | Value |
---|---|
ImageTypeEnum | Jpeg |
ImageTypeEnum | Png |
ImageTypeEnum | Gif |
ImageShapeEnum
"Rounded"
ImageShapeEnum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ImageShapeEnum | string | false | none | Class representing all the image shape accepted values |
Enumerated Values
Property | Value |
---|---|
ImageShapeEnum | Rounded |
ImageShapeEnum | Rectangular |
ForwardMessagesList
[
{
"originalMessage": "string",
"originalMessageSentAt": "2019-08-24T14:15:22Z",
"description": "string"
}
]
Room data
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ForwardMessage] | false | none | Room data |
ForwardMessage
{
"originalMessage": "string",
"originalMessageSentAt": "2019-08-24T14:15:22Z",
"description": "string"
}
Message to forward
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
originalMessage | string | true | none | XML message to forward |
originalMessageSentAt | string(date-time) | false | none | date and time the original message was sent |
description | string | false | none | description of the forwarded message |