Home

/

Blog

/ Announcing new 100ms server-side APIs

Announcing new 100ms server-side APIs

October 14, 20224 min read

Share

100ms-server-side-APIs.png

ON THIS PAGE

Developers use 100ms SDKs and APIs to embed real-time video calls and add live human interactions inside their apps. It could be in the form of a virtual event, a classroom, a community meet up, a yoga session, or any other activity happening virtually.

When these interactions scale, you naturally need moderators/admins - people who manage the crowd, do the housekeeping, and eventually improve the experience of all participants.

But what if you could program the tasks of a moderator / admin by building corresponding business logic on the server side?

Today, we’re releasing a new set of server-side APIs that enable developers to control and manage active sessions in rooms. This is in addition to our existing set of APIs that enable developers to execute simple CRUD actions on rooms and templates.

These new capabilities are powered by the active room APIs. Here are a couple of examples of how you can leverage them -

“Remote Control” your active rooms

Build business logic for ongoing sessions - from simple actions like update peer details, remove peers from the room; to complex ones like change peer roles, send messages & end the session. All of this, from the server side!

You fetch the list of connected peers in an active room using the room ID. Once you have the peer list, you can use it to fetch a peer’s basic info, their metadata or role information.

Here’s an example - imagine a webinar, where a moderator needs to be present to filter inappropriate messages in the chat box. You could use server-side APIs to trigger warnings to participants using inappropriate language in chat. After a couple of warnings, the participant can be kicked out of the room / their chat access can be disabled.

In short, use the active rooms API to build truly “admin-less” rooms.

Take real-time interactivity to the next-level

In its true essence, interactivity is defined as “the ability of a computer to respond to a user's input.” With active room APIs, you can retrieve every possible information about active rooms and the associated peers (in real-time). As a result, you can now respond much better based on a peer's activities.

Based on their activity, you can build features to nudge them, reward them and build a connection with them. Use the update peer API to update details of a connected peer such as their name, role, and metadata.

Imagine a live-shopping app, where you want to add a give-away feature. You can fetch the list of participants who showed interest in the giveaway and use a picker to randomly generate the winner's name and send their details back to front-end. The winner is automatically promoted to the stage role, and can interact with the show host for a stipulated period of time.

Here’s another example - you can check if a peer’s video camera is off, and accordingly nudge them to turn it on.

Think of it this way - everything that required human intervention to create interactivity in a live room - can now be programmatic.

Improvements in developer experience

We work hard to make sure that the resources, docs, and dev environment we offer enable you to execute at your very best. Here are a few developer experience updates to our server-side APIs.

Cleaner API Design

  • Unified baseURL for all resources The API endpoints in the latest version of server-side APIs use only one domain in the baseURL (api.100ms.live) for all resources including rooms, templates, sessions.
  • RESTful adherence In the earlier version, most of the server-side APIs were supporting arguments as query params whereas, with the latest version, we’ve standardized these arguments to be passed as path params to comply with RESTful architectural style.

Improved Documentation

Check out the comprehensive getting started documentation for the server APIs and the updated reference documentation for room APIs, session APIs, policy APIs, active room APIs, and destination APIs.

Postman collection

  • We're excited to announce that 100ms APIs have become even more accessible! We've added a "Run in Postman" button to the Postman page on our developer portal, so now you're only a couple of clicks away from making your first request.
  • We've added a pre-request script to generate the management token within the Postman collection rather than creating a backend service on your end to do so. We have a Postman guide that explains how this works.
  • You can fork our Postman collection to stay up to date with the latest API improvements. This will enable you to get familiar with and interact more seamlessly with our product.

Extended pagination

We paginate the responses with a list of objects ranging from 10 to 100 to ensure they are easier to handle.

What happens to the older set of APIs?

The legacy API (V1) will remain fully functional. We recommend you use our new API to leverage the new functionalities and features. You can refer to the legacy API (V1) documentation here.

Product & News

Share