Overview
Thea’s REST API allows users to interact with all of Thea’s resources. This API is a great way to fetch and mutate data, especially in bulk, however the WebSocket API is used by clients who want to receive updates about resources.
The following sub-headings contain the data transfer objects (DTOs) and request endpoints for Thea’s resources. Relevant technical documentation is linked nearby.
Contents
These endpoints are for the monitoring and modification of Thea managed media downloads.
For more information see Download & Import and Download Service.
Method | Route | Description |
---|---|---|
GET | /api/thea/v1/downloads/ |
Returns the list of all DownloadDTO being processed |
GET | /api/thea/v1/downloads/:id/ |
Returns the DownloadDTO for the download specified |
DELETE | /api/thea/v1/downloads/:id/ |
Cancels the download specified |
POST | /api/thea/v1/downloads/:id/trouble-resolution |
Updates the trouble resolution attached to the trouble of this download. |
Will be rejected if the download has no trouble, or if state is not Troubled
. |
| POST | /api/thea/v1/downloads/:id/approve
| Updates the approval state of the download.
Will be rejected if download is already approved, or is not in the Needs Approval
state. |
Ingestions are often short-lived tasks that are responsible for ingesting and hydrating new media. The service scrapes metadata from automatically ingested content, and attempts to find a match for it in the TMDB API.
See Importing Media and Ingest Service for more information.
Method | Route | Description |
---|---|---|
GET | /api/thea/v1/ingests/ |
Returns all IngestDTO registered with the Ingest Service |
GET | /api/thea/v1/ingests/:id/ |
Returns the IngestDTO for the id provided |
DELETE | /api/thea/v1/ingests/:id/ |
Cancels the ingestion. |
If the media is a managed download, the downloaded media will also be deleted. |
| POST | /api/thea/v1/ingests/:id/trouble-resolution
| Provides a resolution to the trouble for the ingest.
Request will be rejected if the ingest has no trouble attached, or the state is not Troubled
|
Thea allows users to perform transcoding of their content, either using on-the-fly transcodes or pre-transcoding their content (Watching Media).
These endpoints are how clients should start, monitor and modify pre-transcode tasks specifically; on-the-fly transcodes are accessible using the media endpoints further on in this document.
See Media Transcoding for more information.
Method | Route | Description |
---|---|---|
POST | /api/thea/v1/transcodes/ |
Adds a transcode task to the ‣s queue, returning the DTO. |
GET | /api/thea/v1/transcodes/active |
Returns a TranscodeDTO for each active transcode |
GET | /api/thea/v1/transcodes/complete |
Returns a TranscodeDTO for each completed transcode |
GET | /api/thea/v1/transcodes/:id/ |
Returns the TranscodeDTO for the id provided |
DELETE | /api/thea/v1/transcodes/:id/ |
If transcode is ongoing: Cancels the transcode, deleting any partially transcoded content at the output_path |
If transcode is complete: Deletes transcoded content and removes the database entry for this transcode |
| POST | /api/thea/v1/transcodes/:id/trouble-resolution
| Provides a resolution to the trouble of an in-progress transcode.
Request will be rejected if the transcode has no trouble attached, or the state is not Troubled
|
| GET | /api/thea/v1/transcodes/:id/stream
| Streams the content that was transcoded as part of this transcode.
Request will be rejected if the transcode id
specified references an incomplete transcode. |