Translations:Подключение к внешнему REST API/1/en

Материал из SmartPlayer

Description of the Situation

For users who want to connect via REST API, it is recommended to use our dedicated resource. On this resource, the user can test methods and requests that allow connection and data retrieval from the SmartPlayer platform.

The REST API portal is available here. You can request authorization credentials (login and password) by contacting us via the portal or your assigned SmartPlayer specialist. You can also write to this email.

Portal Operation

This section is built on the Swagger Plugin and allows not only to ознакомиться with connection information for REST API, but also to test described methods and receive real results. Advanced users can also test these methods using Postman.

Some methods described on the portal may not work correctly. The SmartPlayer team is aware of these issues and is working on fixing them.

Usage Scenario

It is assumed that interaction with the portal will follow a specific sequence. Usage scenario:

  1. Authorization on the portal.
  2. Selecting the required server for testing requests.
  3. Obtaining a token to use the "Authorize" button.
  4. Selecting the required method and reviewing its information.
  5. Sending a request using the "Try it out" button.
  6. Receiving and reviewing the server response.
  7. Studying the "Schemas" section.
Details are provided below on the page.

Information on the Portal

After authorization, the user will see the main page displaying the following information:

Example of the REST API portal main page

The portal page includes information about:

  • contact information for interacting with the SmartPlayer team;
  • list of available servers for testing;
  • "Authorize" button (details below);
  • list of methods;
  • "Schemas" section (scroll to the bottom of the page).
Example of portal page structure
Example of the "Schemas" section at the bottom

Server Selection

To test requests, the user must select one of the available servers. Each server is displayed as: "name" + "short description" (in English).

Example of available servers
The server list is not final. Users can connect manually via Postman to any server in the list or use other SmartPlayer servers such as "rc.smartplayer.org".

"Authorize" Button

Clicking the "Authorize" button opens a modal window where the user must enter a bearer token. Instructions for obtaining the token are provided via a link in the window.

Example of authorization modal window

After entering the token, click "Close". The authorization icon will change (lock icon will be closed and highlighted).

Example of authorization icon change
Hovering over the authorization icon will display an additional icon to copy the request to the clipboard.
Example of copy-to-clipboard icon

Methods Information

Currently, the portal provides two types of methods:

  1. GET — used to retrieve data. Parameters are passed via URL. Safe (idempotent) and cacheable.
  2. POST — sends data in the request body. Used to create or modify resources. Suitable for sensitive data.
Example of GET and POST methods

Each method has an endpoint specified after the method name and highlighted in bold.

Example of endpoint display

Interaction with Methods

The list of methods allows users to test connections and retrieve sample data. A successful request returns method data and allows analysis of SmartPlayer behavior.

Method Areas

Methods are grouped by system areas:

  • Authorization;
  • Broadcast;
  • Content;
  • Notifications;
  • IP-TV;
  • User;
  • Settings;
  • Schedule;
  • Devices
Example of method list
Each method includes a short English description.
Example of method description