Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit aa82fb8

Browse files
committed
Updated documentation to be more understandable
1 parent 8fa3bf6 commit aa82fb8

File tree

2 files changed

+88
-1
lines changed

2 files changed

+88
-1
lines changed

_posts/2.5/2021-06-09-new.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,39 @@ Private guest lobby message, display position in waiting line
6767

6868
A new API endpoint was added: `/insertDocument`. Now, it is possible to send a batch of documents with all the common presentation parameters such as `current`, `downloadable` and `removable`.
6969

70-
All the presentations are sent via payload (the body of the request), whether by a link to download the file or by `base64` encoded file.
70+
All the presentations are sent via payload (the body of the request) such as when preuploading documents in `/create` endpoint, whether by a link to download the file or by `base64` encoded file.
71+
72+
You can send the request via greenlight or bash, as displayed below:
73+
74+
``` bash
75+
curl -s -X POST "https://{your-host}/bigbluebutton/api/insertDocument?meetingID=Test&checksum=6b76e90b9a20481806a7ef513bc81ef0299609ed" --header "Content-Type: application/xml" --data '<modules>
76+
<module name="presentation">
77+
<document current="true" downloadable="true" url="{link to download the presentation}" filename="sample.pdf"/>
78+
<document removable="false" name="sample.pdf">
79+
JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoT3RoZXJfc2FtcGxlKQovUHJvZHVjZXIgKFNraWEvUERGIG0xMDAgR29vZ2xlIERvY3MgUmVuZGVyZXIpPj4KZW5... {base64 encoded document}
80+
</document>
81+
</module>
82+
</modules>'
83+
```
84+
85+
More explicitly, in xml we have:
86+
87+
``` xml
88+
<modules>
89+
<module name="presentation">
90+
<document current="true" downloadable="true" url="{link to download the presentation}" filename="sample.pdf"/>
91+
<document removable="false" name="sample.pdf">
92+
JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoT3RoZXJfc2FtcGxlKQovUHJvZHVjZXIgKFNraWEvUERGIG0xMDAgR29vZ2xlIERvY3MgUmVuZGVyZXIpPj4KZW5... {base64 encoded document}
93+
</document>
94+
</module>
95+
</modules>
96+
```
97+
98+
Now just the request:
99+
100+
``` bash
101+
curl -s -X POST "https://{your-host}/bigbluebutton/api/insertDocument?meetingID=Test&checksum=6b76e90b9a20481806a7ef513bc81ef0299609ed" --header "Content-Type: application/xml" --data '{xml}'
102+
```
71103

72104
## Engagement
73105

_posts/dev/2015-04-05-api.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ For developers, this API enables you to
1919
- create meetings
2020
- join meetings
2121
- end meetings
22+
- insert documents
2223
- get recordings for past meetings (and delete them)
2324
- upload closed caption files for meetings
2425

@@ -79,6 +80,11 @@ Updated in 2.5:
7980

8081
- **create** - **Added:** `meetingCameraCap`, `groups`, `disabledFeatures`, `meetingExpireIfNoUserJoinedInMinutes`, `meetingExpireWhenLastUserLeftInMinutes`; **Deprecated:** `learningDashboardEnabled`, `breakoutRoomsEnabled`, `virtualBackgroundsDisabled`.
8182

83+
- **insertDocument**
84+
- New endpoint created;
85+
- It is responsible to insert a presentation in a meeting that already exists;
86+
- It works the same way as preuploading documents in `/create` endpoint: the requests are sent with a payload expliciting the presentations in a xml string. As an example refer to the [notes in "new" route.](#insertdocument)
87+
8288
# API Data Types
8389

8490
There are three types in the API.
@@ -324,6 +330,7 @@ The following section describes the administration calls
324330
| create | Creates a new meeting. |
325331
| join | Join a new user to an existing meeting. |
326332
| end | Ends meeting. |
333+
| insertDocument | Insert a batch of documents via API call |
327334

328335
## Monitoring
329336

@@ -529,6 +536,54 @@ There is only an XML response for this call if the `redirect` parameter is set t
529536
</response>
530537
```
531538

539+
## insertDocument
540+
541+
This endpoint insert one or more documents into a running meeting via API call
542+
543+
**Resource URL:**
544+
545+
http&#58;//yourserver.com/bigbluebutton/api/insertDocument?[parameters]&checksum=[checksum]
546+
547+
**Parameters:**
548+
549+
{% include api_table.html endpoint="insertDocument" %}
550+
551+
**Example Requests:**
552+
553+
You can do the request either via greenlight or `curl`, which I am going to demonstrate in the following paragraph.
554+
555+
First, it is necessary to have the xml string with the batch of the wanted presentations in hand. As an example, see the xml down below:
556+
557+
``` xml
558+
<modules>
559+
<module name="presentation">
560+
<document current="true" downloadable="true" url="{link to download the presentation}" filename="sample.pdf"/>
561+
<document removable="false" name="sample.pdf">
562+
JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoT3RoZXJfc2FtcGxlKQovUHJvZHVjZXIgKFNraWEvUERGIG0xMDAgR29vZ2xlIERvY3MgUmVuZGVyZXIpPj4KZW5... {base64 encoded document}
563+
</document>
564+
</module>
565+
</modules>
566+
```
567+
568+
Now you need to write the `curl` command which will be:
569+
570+
``` bash
571+
curl -s -X POST "https://{your-host}/bigbluebutton/api/insertDocument?meetingID=Test&checksum=6b76e90b9a20481806a7ef513bc81ef0299609ed" --header "Content-Type: application/xml" --data '{xml}'
572+
```
573+
574+
Combining both together, we get:
575+
576+
``` bash
577+
curl -s -X POST "https://{your-host}/bigbluebutton/api/insertDocument?meetingID=Test&checksum=6b76e90b9a20481806a7ef513bc81ef0299609ed" --header "Content-Type: application/xml" --data '<modules>
578+
<module name="presentation">
579+
<document current="true" downloadable="true" url="{link to download the presentation}" filename="sample.pdf"/>
580+
<document removable="false" name="sample.pdf">
581+
JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoT3RoZXJfc2FtcGxlKQovUHJvZHVjZXIgKFNraWEvUERGIG0xMDAgR29vZ2xlIERvY3MgUmVuZGVyZXIpPj4KZW5... {base64 encoded document}
582+
</document>
583+
</module>
584+
</modules>'
585+
```
586+
532587
## isMeetingRunning
533588

534589
This call enables you to simply check on whether or not a meeting is running by looking it up with your meeting ID.

0 commit comments

Comments
 (0)