### Startup API Endpoints Source: https://typescript-sdk.jellyfin.org/modules/generated-client Endpoints for managing the initial server configuration and user setup during startup. ```APIDOC ## POST /Startup/Configuration ### Description Updates the initial server configuration during startup. ### Method POST ### Endpoint /Startup/Configuration ### Parameters #### Request Body - **config** (object) - Required - The server configuration object. - **isRemoteAccessEnabled** (boolean) - Optional - Whether remote access is enabled. - **publicPort** (integer) - Optional - The public port for remote access. - **requireAuthentication** (boolean) - Optional - Whether authentication is required. - **port** (integer) - Optional - The server port. - **publicAddress** (string) - Optional - The public address of the server. ### Request Example ```json { "config": { "isRemoteAccessEnabled": true, "publicPort": 8096, "requireAuthentication": false, "port": 8096, "publicAddress": "192.168.1.100" } } ``` ### Response #### Success Response (204) No content is returned on successful update. ## POST /Startup/User ### Description Updates the initial startup user information. ### Method POST ### Endpoint /Startup/User ### Parameters #### Request Body - **user** (object) - Required - The user information object. - **name** (string) - Required - The username. - **password** (string) - Required - The user's password. - **email** (string) - Optional - The user's email address. ### Request Example ```json { "user": { "name": "admin", "password": "securepassword123", "email": "admin@example.com" } } ``` ### Response #### Success Response (204) No content is returned on successful update. ``` -------------------------------- ### Install Jellyfin SDK with npm or yarn Source: https://typescript-sdk.jellyfin.org/index Instructions for installing the @jellyfin/sdk package using either npm or yarn package managers. This is the first step to integrating the SDK into your project. ```bash npm i --save @jellyfin/sdk ``` ```bash yarn add @jellyfin/sdk ``` -------------------------------- ### Initialize Jellyfin SDK and interact with APIs Source: https://typescript-sdk.jellyfin.org/index Example of how to create a Jellyfin SDK instance, discover and connect to a server, and then use various API clients to fetch data such as public system info, user lists, and media libraries. It also shows how to authenticate a user and log out. ```typescript // Create a new instance of the SDK const jellyfin = new Jellyfin({ clientInfo: { name: 'My Client Application', version: '1.0.0' }, deviceInfo: { name: 'Device Name', id: 'unique-device-id' } }); // Find a valid server by trying to connect using common protocols and ports. // Each server receives a score based on security, speed, and other criteria. const servers = await jellyfin.discovery.getRecommendedServerCandidates('demo.jellyfin.org/stable'); // A utility function for finding the best result is available. // If there is no "best" server, an error message should be displayed. const best = jellyfin.discovery.findBestServer(servers); // Create an API instance const api = jellyfin.createApi(best.address); // Each API endpoint is represented by a class in the generated client. // Helper utility functions are provided under `/lib/utils/api/` to create an // instance of a specific Jellyfin API using the shared Configuration and Axios // instance from the `api` object created above. // For example, the SystemApi can be generated using the `getSystemApi` // function in `/lib/utils/api/system-api`. // Fetch the public system info const info = await getSystemApi(api).getPublicSystemInfo(); console.log('Info =>', info.data); // Fetch the list of public users const users = await getUserApi(api).getPublicUsers(); console.log('Users =>', users.data); // Login with a username and password. const auth = await getUserApi(this).authenticateUserByName({ authenticateUserByName: { Username: 'demo', Pw: '' } }); console.log('Auth =>', auth.data); // Authentication state is stored internally in the Api class, so now // requests that require authentication can be made normally const libraries = await getLibraryApi(api).getMediaFolders(); console.log('Libraries =>', libraries.data); // Logout the current user. await getSessionApi(api).reportSessionEnded(); ``` -------------------------------- ### YearsApiFp: Get a Specific Year's Data (TypeScript) Source: https://typescript-sdk.jellyfin.org/functions/generated-client The getYear function retrieves data for a specific year. It requires the year as a number and optionally accepts a userId and request configuration. It returns a Promise that resolves to a function, which in turn returns an AxiosPromise containing BaseItemDto. ```typescript import { Configuration, RawAxiosRequestConfig, AxiosInstance, AxiosPromise, BaseItemDto, } from "@jellyfin/sdk"; interface YearsApiFp { getYear( year: number, userId?: string, options?: RawAxiosRequestConfig ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; } // Example usage (assuming configuration and YearsApiFp are properly initialized): // const yearsApi: YearsApiFp = YearsApiFp(configuration); // yearsApi.getYear(2023).then(apiCall => apiCall().then(response => console.log(response))); ``` -------------------------------- ### Years API - Get Year Request Source: https://typescript-sdk.jellyfin.org/interfaces/generated-client Defines the request parameters for the getYear operation within the Years API. This includes optional user ID filtering and the required year. ```APIDOC ## GET /jellyfin/sdk/years/getYear ### Description Retrieves year-specific data, optionally filtered by user ID. ### Method GET ### Endpoint /jellyfin/sdk/years/getYear ### Parameters #### Query Parameters - **userId** (string) - Optional - Filter by user id, and attach user data. - **year** (number) - Required - The year to retrieve data for. ### Request Example ```json { "userId": "some_user_id", "year": 2023 } ``` ### Response #### Success Response (200) - **data** (any) - The data corresponding to the requested year and user. #### Response Example ```json { "data": {} } ``` ``` -------------------------------- ### Years API Source: https://typescript-sdk.jellyfin.org/functions/generated-client The Years API provides methods to retrieve year-specific data. You can get details for a specific year by providing the year number or retrieve a list of years with extensive filtering and sorting capabilities. ```APIDOC ## GET /Years ### Description Retrieves a list of years, with options to filter, sort, and paginate the results. Useful for browsing content by year. ### Method GET ### Endpoint /Years ### Parameters #### Query Parameters - **startIndex** (number) - Optional - Skips over a given number of items within the results. Use for paging. - **limit** (number) - Optional - The maximum number of records to return. - **sortOrder** (SortOrder[]) - Optional - Sort Order - Ascending,Descending. - **parentId** (string) - Optional - Specify this to localize the search to a specific item or folder. Omit to use the root. - **fields** (ItemFields[]) - Optional - Specify additional fields of information to return in the output. - **excludeItemTypes** (BaseItemKind[]) - Optional - If specified, results will be excluded based on item type. This allows multiple, comma delimited. - **includeItemTypes** (BaseItemKind[]) - Optional - If specified, results will be included based on item type. This allows multiple, comma delimited. - **mediaTypes** (MediaType[]) - Optional - Filter by MediaType. Allows multiple, comma delimited. - **sortBy** (ItemSortBy[]) - Optional - Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. - **enableUserData** (boolean) - Optional - Include user data. - **imageTypeLimit** (number) - Optional - The max number of images to return, per image type. - **enableImageTypes** (ImageType[]) - Optional - The image types to include in the output. - **userId** (string) - Optional - User Id. - **recursive** (boolean) - Optional - Search recursively. - **enableImages** (boolean) - Optional - Include image information in output. - **options** (RawAxiosRequestConfig) - Optional - Override http request option. ### Response #### Success Response (200) - **Items** (BaseItemDto[]) - The list of years. - **TotalRecordCount** (number) - The total number of records found. #### Response Example ```json { "Items": [ { "Name": "2023", "Id": "some-year-id-1", "Type": "Year", "SortName": "2023", "PremiereDate": "2023-01-01T00:00:00.000Z", "ServerId": "some-server-id" }, { "Name": "2022", "Id": "some-year-id-2", "Type": "Year", "SortName": "2022", "PremiereDate": "2022-01-01T00:00:00.000Z", "ServerId": "some-server-id" } ], "TotalRecordCount": 2 } ``` ## GET /Years/{year} ### Description Retrieves details for a specific year. ### Method GET ### Endpoint /Years/{year} ### Parameters #### Path Parameters - **year** (number) - Required - The year to retrieve details for. #### Query Parameters - **userId** (string) - Optional - Filter by user id, and attach user data. - **options** (RawAxiosRequestConfig) - Optional - Override http request option. ### Response #### Success Response (200) - **Name** (string) - The name of the year. - **Id** (string) - The unique identifier for the year. - **Type** (string) - The item type (e.g., "Year"). - **SortName** (string) - The sortable name of the year. - **PremiereDate** (string) - The premiere date for the year. - **ServerId** (string) - The ID of the server. #### Response Example ```json { "Name": "2023", "Id": "some-year-id", "Type": "Year", "SortName": "2023", "PremiereDate": "2023-01-01T00:00:00.000Z", "ServerId": "some-server-id" } ``` ``` -------------------------------- ### YearsApiFp: Get a List of Years (TypeScript) Source: https://typescript-sdk.jellyfin.org/functions/generated-client The getYears function retrieves a paginated and filterable list of years. It supports numerous optional parameters for pagination (startIndex, limit), sorting (sortOrder, sortBy), filtering (parentId, fields, excludeItemTypes, includeItemTypes, mediaTypes), and user data/image inclusion. It returns a Promise resolving to a function that provides an AxiosPromise of BaseItemDtoQueryResult. ```typescript import { Configuration, RawAxiosRequestConfig, AxiosInstance, AxiosPromise, BaseItemDtoQueryResult, SortOrder, ItemFields, BaseItemKind, MediaType, ItemSortBy, ImageType, } from "@jellyfin/sdk"; interface YearsApiFp { getYears( startIndex?: number, limit?: number, sortOrder?: SortOrder[], parentId?: string, fields?: ItemFields[], excludeItemTypes?: BaseItemKind[], includeItemTypes?: BaseItemKind[], mediaTypes?: MediaType[], sortBy?: ItemSortBy[], enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: ImageType[], userId?: string, recursive?: boolean, enableImages?: boolean, options?: RawAxiosRequestConfig ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; } // Example usage (assuming configuration and YearsApiFp are properly initialized): // const yearsApi: YearsApiFp = YearsApiFp(configuration); // yearsApi.getYears(0, 50, [SortOrder.Ascending]).then(apiCall => apiCall().then(response => console.log(response))); ``` -------------------------------- ### RecommendedServerDiscovery Class Source: https://typescript-sdk.jellyfin.org/classes/index.discovery Details on how to instantiate and use the RecommendedServerDiscovery class to find Jellyfin servers. ```APIDOC ## Class RecommendedServerDiscovery Class to discover and evaluate potential servers. ### Constructor **new RecommendedServerDiscovery(jellyfin: Jellyfin)** Initializes a new instance of the RecommendedServerDiscovery class. #### Parameters * **jellyfin** (Jellyfin) - The Jellyfin client instance. #### Returns RecommendedServerDiscovery ## Methods ### discover **discover(servers: string[], minimumScore?: RecommendedServerInfoScore): Promise** Fetches the RecommendedServerInfo for multiple server addresses. #### Parameters * **servers** (string[]) - Required - An array of server addresses. * **minimumScore** (RecommendedServerInfoScore) - Optional - The minimum score required for a server to be included in the results. Defaults to RecommendedServerInfoScore.BAD. #### Returns Promise - The RecommendedServerInfo for each address. ### fetchRecommendedServerInfo **fetchRecommendedServerInfo(address: string): Promise** Fetches the RecommendedServerInfo for a single server address. #### Parameters * **address** (string) - Required - The server address. #### Returns Promise - The resulting RecommendedServerInfo. ``` -------------------------------- ### Session API Endpoints Source: https://typescript-sdk.jellyfin.org/modules/generated-client Provides endpoints for managing user sessions, including adding/removing users, sending commands, and reporting viewing activity. ```APIDOC ## POST /Sessions/AddUser ### Description Adds a user to an active session. ### Method POST ### Endpoint /Sessions/AddUser ### Parameters #### Request Body - **userId** (string) - Required - The ID of the user to add. - **sessionId** (string) - Required - The ID of the session to add the user to. ### Request Example ```json { "userId": "user123", "sessionId": "sessionABC" } ``` ### Response #### Success Response (204) No content is returned on successful addition. ## POST /Sessions/DisplayContent ### Description Displays content within a session. ### Method POST ### Endpoint /Sessions/DisplayContent ### Parameters #### Request Body - **sessionId** (string) - Required - The ID of the session. - **itemIds** (array of strings) - Required - A list of item IDs to display. ### Request Example ```json { "sessionId": "sessionABC", "itemIds": ["movie1", "movie2"] } ``` ### Response #### Success Response (204) No content is returned on success. ## POST /Sessions/Play ### Description Initiates playback of an item within a session. ### Method POST ### Endpoint /Sessions/Play ### Parameters #### Request Body - **sessionId** (string) - Required - The ID of the session. - **itemIds** (array of strings) - Required - The IDs of the items to play. - **playCommand** (string) - Optional - The play command (e.g., 'Play', 'Pause'). ### Request Example ```json { "sessionId": "sessionABC", "itemIds": ["movie456"], "playCommand": "Play" } ``` ### Response #### Success Response (204) No content is returned on success. ## POST /Sessions/RemoveUser ### Description Removes a user from an active session. ### Method POST ### Endpoint /Sessions/RemoveUser ### Parameters #### Request Body - **userId** (string) - Required - The ID of the user to remove. - **sessionId** (string) - Required - The ID of the session to remove the user from. ### Request Example ```json { "userId": "user123", "sessionId": "sessionABC" } ``` ### Response #### Success Response (204) No content is returned on successful removal. ## POST /Sessions/ReportViewing ### Description Reports viewing progress for an item in a session. ### Method POST ### Endpoint /Sessions/ReportViewing ### Parameters #### Request Body - **sessionId** (string) - Required - The ID of the session. - **itemId** (string) - Required - The ID of the item being viewed. - **positionTicks** (integer) - Required - The current playback position in ticks. ### Request Example ```json { "sessionId": "sessionABC", "itemId": "movie789", "positionTicks": 12345678 } ``` ### Response #### Success Response (204) No content is returned on success. ## POST /Sessions/SendCommand ### Description Sends a general command to a session. ### Method POST ### Endpoint /Sessions/SendCommand ### Parameters #### Request Body - **sessionId** (string) - Required - The ID of the session. - **command** (string) - Required - The command to send (e.g., 'Play', 'Pause', 'Stop'). - **arguments** (object) - Optional - Additional arguments for the command. ### Request Example ```json { "sessionId": "sessionABC", "command": "Pause", "arguments": {} } ``` ### Response #### Success Response (204) No content is returned on success. ## POST /Sessions/SendMessage ### Description Sends a message command to a session. ### Method POST ### Endpoint /Sessions/SendMessage ### Parameters #### Request Body - **sessionId** (string) - Required - The ID of the session. - **message** (string) - Required - The message to send. - **messageHeader** (string) - Optional - The header for the message. ### Request Example ```json { "sessionId": "sessionABC", "message": "Hello from the client!", "messageHeader": "Client Message" } ``` ### Response #### Success Response (204) No content is returned on success. ## POST /Sessions/SendPlaystateCommand ### Description Sends a playstate command to a session. ### Method POST ### Endpoint /Sessions/SendPlaystateCommand ### Parameters #### Request Body - **sessionId** (string) - Required - The ID of the session. - **playstateCommand** (string) - Required - The playstate command (e.g., 'Playing', 'Paused', 'Stopped'). ### Request Example ```json { "sessionId": "sessionABC", "playstateCommand": "Playing" } ``` ### Response #### Success Response (204) No content is returned on success. ## POST /Sessions/SendSystemCommand ### Description Sends a system command to a session. ### Method POST ### Endpoint /Sessions/SendSystemCommand ### Parameters #### Request Body - **sessionId** (string) - Required - The ID of the session. - **systemCommand** (string) - Required - The system command to send (e.g., 'Shutdown', 'Restart'). ### Request Example ```json { "sessionId": "sessionABC", "systemCommand": "Shutdown" } ``` ### Response #### Success Response (204) No content is returned on success. ``` -------------------------------- ### Videos API Source: https://typescript-sdk.jellyfin.org/classes/generated-client The Videos API provides methods for interacting with video content, including retrieving streams, managing alternate sources, and merging video versions. ```APIDOC ## POST /Videos/AlternateSources ### Description Deletes alternate video sources. This endpoint is used to remove alternative sources associated with a video. ### Method POST ### Endpoint /Videos/AlternateSources ### Parameters #### Request Body - **requestParameters** (VideosApiDeleteAlternateSourcesRequest) - Required - Request parameters for deleting alternate sources. ### Request Example ```json { "requestParameters": { "id": "string", "videoIds": ["string"] } } ``` ### Response #### Success Response (200) - **void** - Indicates successful deletion of alternate sources. #### Response Example (No specific response body for success, typically returns 204 No Content) ``` ```APIDOC ## GET /Videos/AdditionalPart ### Description Retrieves an additional part of a video. This can be used for fetching specific segments or related content of a video. ### Method GET ### Endpoint /Videos/AdditionalPart ### Parameters #### Query Parameters - **itemIds** (string[]) - Required - The IDs of the video items. - **parentIndex** (number) - Optional - The index of the parent item. - **searchTerm** (string) - Optional - A search term to filter additional parts. ### Request Example ```json { "requestParameters": { "itemIds": ["string"], "parentId": "string", "searchTerm": "string" } } ``` ### Response #### Success Response (200) - **BaseItemDtoQueryResult** (BaseItemDtoQueryResult) - A query result containing base item DTOs for the additional video parts. #### Response Example ```json { "Items": [ { "Name": "string", "Id": "string", "ServerId": "string" } ], "TotalRecordCount": 0 } ``` ``` ```APIDOC ## GET /Videos/{videoId}/stream ### Description Retrieves a video stream. This is the primary method for streaming video content. ### Method GET ### Endpoint /Videos/{videoId}/stream ### Parameters #### Path Parameters - **videoId** (string) - Required - The ID of the video to stream. #### Query Parameters - **static** (boolean) - Optional - If true, returns a static stream. - **elementSelector** (string) - Optional - Selector for the video element. - **container** (string) - Optional - The container format for the stream (e.g., 'mp4', 'mkv'). - **deviceProfileId** (string) - Optional - The ID of the device profile. - **videoCodec** (string) - Optional - The desired video codec. - **audioCodec** (string) - Optional - The desired audio codec. - **type** (string) - Optional - The type of stream (e.g., 'Default', 'Video'). - **severity** (string) - Optional - Severity level for the stream. - **breakOnNonKeyFrames** (boolean) - Optional - Whether to break on non-key frames. - ** நொtify** (boolean) - Optional - Whether to notify on stream events. - ** நொtifyBuffer** (boolean) - Optional - Whether to notify on buffer events. - **offset** (number) - Optional - The offset in the stream. - **totalLength** (number) - Optional - The total length of the stream. - **xRedirectFrom** (string) - Optional - Redirect information. - **header** (string) - Optional - Custom header for the stream request. - **widgetId** (string) - Optional - Widget ID associated with the stream. - **tag** (string) - Optional - A tag for the stream. - **startTimeTicks** (number) - Optional - Start time in ticks. - **segmentStartTimeTicks** (number) - Optional - Segment start time in ticks. - **copyTimestamps** (string) - Optional - Copy timestamps option. - **sourceTicks** (number) - Optional - Source ticks. - **updatePts** (boolean) - Optional - Whether to update PTS. - **key** (string) - Optional - A key for the stream. - **externalId** (string) - Optional - External ID for the stream. - **pipelineLanguage** (string) - Optional - Pipeline language. - **playSessionId** (string) - Optional - Play session ID. - **maxBitRate** (number) - Optional - Maximum bitrate for the stream. - **liveStreamAttemptCount** (number) - Optional - Number of attempts for live stream. - **width** (number) - Optional - Width of the video. - **height** (number) - Optional - Height of the video. - **enableMpegtsMode** (boolean) - Optional - Enable MPEG-TS mode. - **videoBitTolerance** (number) - Optional - Video bit tolerance. - **audioBitTolerance** (number) - Optional - Audio bit tolerance. - **authenticationProviderId** (string) - Optional - Authentication provider ID. - **force444** (boolean) - Optional - Force 444 video format. - **encryptionParameters** (string) - Optional - Encryption parameters. - **profile** (string) - Optional - Video profile. - **level** (string) - Optional - Video level. - **refFrames** (number) - Optional - Number of reference frames. - **varnishId** (string) - Optional - Varnish ID. - **bitrate** (number) - Optional - Desired bitrate for the stream. ### Request Example ```json { "requestParameters": { "videoId": "YOUR_VIDEO_ID" } } ``` ### Response #### Success Response (200) - **File** (File) - The video stream content. #### Response Example (Binary stream content) ``` ```APIDOC ## GET /Videos/{videoId}/stream.{container} ### Description Retrieves a video stream by container format. This endpoint allows specifying the desired container for the video stream. ### Method GET ### Endpoint /Videos/{videoId}/stream.{container} ### Parameters #### Path Parameters - **videoId** (string) - Required - The ID of the video to stream. - **container** (string) - Required - The container format for the stream (e.g., 'mp4', 'mkv'). #### Query Parameters - **static** (boolean) - Optional - If true, returns a static stream. - **elementSelector** (string) - Optional - Selector for the video element. - **deviceProfileId** (string) - Optional - The ID of the device profile. - **videoCodec** (string) - Optional - The desired video codec. - **audioCodec** (string) - Optional - The desired audio codec. - **type** (string) - Optional - The type of stream (e.g., 'Default', 'Video'). - **severity** (string) - Optional - Severity level for the stream. - **breakOnNonKeyFrames** (boolean) - Optional - Whether to break on non-key frames. - ** நொtify** (boolean) - Optional - Whether to notify on stream events. - ** நொtifyBuffer** (boolean) - Optional - Whether to notify on buffer events. - **offset** (number) - Optional - The offset in the stream. - **totalLength** (number) - Optional - The total length of the stream. - **xRedirectFrom** (string) - Optional - Redirect information. - **header** (string) - Optional - Custom header for the stream request. - **widgetId** (string) - Optional - Widget ID associated with the stream. - **tag** (string) - Optional - A tag for the stream. - **startTimeTicks** (number) - Optional - Start time in ticks. - **segmentStartTimeTicks** (number) - Optional - Segment start time in ticks. - **copyTimestamps** (string) - Optional - Copy timestamps option. - **sourceTicks** (number) - Optional - Source ticks. - **updatePts** (boolean) - Optional - Whether to update PTS. - **key** (string) - Optional - A key for the stream. - **externalId** (string) - Optional - External ID for the stream. - **pipelineLanguage** (string) - Optional - Pipeline language. - **playSessionId** (string) - Optional - Play session ID. - **maxBitRate** (number) - Optional - Maximum bitrate for the stream. - **liveStreamAttemptCount** (number) - Optional - Number of attempts for live stream. - **width** (number) - Optional - Width of the video. - **height** (number) - Optional - Height of the video. - **enableMpegtsMode** (boolean) - Optional - Enable MPEG-TS mode. - **videoBitTolerance** (number) - Optional - Video bit tolerance. - **audioBitTolerance** (number) - Optional - Audio bit tolerance. - **authenticationProviderId** (string) - Optional - Authentication provider ID. - **force444** (boolean) - Optional - Force 444 video format. - **encryptionParameters** (string) - Optional - Encryption parameters. - **profile** (string) - Optional - Video profile. - **level** (string) - Optional - Video level. - **refFrames** (number) - Optional - Number of reference frames. - **varnishId** (string) - Optional - Varnish ID. - **bitrate** (number) - Optional - Desired bitrate for the stream. ### Request Example ```json { "requestParameters": { "videoId": "YOUR_VIDEO_ID", "container": "mp4" } } ``` ### Response #### Success Response (200) - **File** (File) - The video stream content in the specified container format. #### Response Example (Binary stream content) ``` ```APIDOC ## HEAD /Videos/{videoId}/stream ### Description Checks for the existence of a video stream using a HEAD request. This is useful for checking if a stream is available without downloading its content. ### Method HEAD ### Endpoint /Videos/{videoId}/stream ### Parameters #### Path Parameters - **videoId** (string) - Required - The ID of the video to check. #### Query Parameters - **static** (boolean) - Optional - If true, checks for a static stream. - **elementSelector** (string) - Optional - Selector for the video element. - **deviceProfileId** (string) - Optional - The ID of the device profile. - **videoCodec** (string) - Optional - The desired video codec. - **audioCodec** (string) - Optional - The desired audio codec. - **type** (string) - Optional - The type of stream (e.g., 'Default', 'Video'). - **severity** (string) - Optional - Severity level for the stream. - **breakOnNonKeyFrames** (boolean) - Optional - Whether to break on non-key frames. - ** நொtify** (boolean) - Optional - Whether to notify on stream events. - ** நொtifyBuffer** (boolean) - Optional - Whether to notify on buffer events. - **offset** (number) - Optional - The offset in the stream. - **totalLength** (number) - Optional - The total length of the stream. - **xRedirectFrom** (string) - Optional - Redirect information. - **header** (string) - Optional - Custom header for the stream request. - **widgetId** (string) - Optional - Widget ID associated with the stream. - **tag** (string) - Optional - A tag for the stream. - **startTimeTicks** (number) - Optional - Start time in ticks. - **segmentStartTimeTicks** (number) - Optional - Segment start time in ticks. - **copyTimestamps** (string) - Optional - Copy timestamps option. - **sourceTicks** (number) - Optional - Source ticks. - **updatePts** (boolean) - Optional - Whether to update PTS. - **key** (string) - Optional - A key for the stream. - **externalId** (string) - Optional - External ID for the stream. - **pipelineLanguage** (string) - Optional - Pipeline language. - **playSessionId** (string) - Optional - Play session ID. - **maxBitRate** (number) - Optional - Maximum bitrate for the stream. - **liveStreamAttemptCount** (number) - Optional - Number of attempts for live stream. - **width** (number) - Optional - Width of the video. - **height** (number) - Optional - Height of the video. - **enableMpegtsMode** (boolean) - Optional - Enable MPEG-TS mode. - **videoBitTolerance** (number) - Optional - Video bit tolerance. - **audioBitTolerance** (number) - Optional - Audio bit tolerance. - **authenticationProviderId** (string) - Optional - Authentication provider ID. - **force444** (boolean) - Optional - Force 444 video format. - **encryptionParameters** (string) - Optional - Encryption parameters. - **profile** (string) - Optional - Video profile. - **level** (string) - Optional - Video level. - **refFrames** (number) - Optional - Number of reference frames. - **varnishId** (string) - Optional - Varnish ID. - **bitrate** (number) - Optional - Desired bitrate for the stream. ### Request Example ```json { "requestParameters": { "videoId": "YOUR_VIDEO_ID" } } ``` ### Response #### Success Response (200) - **File** (File) - Headers indicating the stream's availability and properties. #### Response Example (Empty body, headers provide information) ``` ```APIDOC ## HEAD /Videos/{videoId}/stream.{container} ### Description Checks for the existence of a video stream by container format using a HEAD request. This allows checking stream availability for a specific container without downloading. ### Method HEAD ### Endpoint /Videos/{videoId}/stream.{container} ### Parameters #### Path Parameters - **videoId** (string) - Required - The ID of the video to check. - **container** (string) - Required - The container format for the stream (e.g., 'mp4', 'mkv'). #### Query Parameters - **static** (boolean) - Optional - If true, checks for a static stream. - **elementSelector** (string) - Optional - Selector for the video element. - **deviceProfileId** (string) - Optional - The ID of the device profile. - **videoCodec** (string) - Optional - The desired video codec. - **audioCodec** (string) - Optional - The desired audio codec. - **type** (string) - Optional - The type of stream (e.g., 'Default', 'Video'). - **severity** (string) - Optional - Severity level for the stream. - **breakOnNonKeyFrames** (boolean) - Optional - Whether to break on non-key frames. - ** நொtify** (boolean) - Optional - Whether to notify on stream events. - ** நொtifyBuffer** (boolean) - Optional - Whether to notify on buffer events. - **offset** (number) - Optional - The offset in the stream. - **totalLength** (number) - Optional - The total length of the stream. - **xRedirectFrom** (string) - Optional - Redirect information. - **header** (string) - Optional - Custom header for the stream request. - **widgetId** (string) - Optional - Widget ID associated with the stream. - **tag** (string) - Optional - A tag for the stream. - **startTimeTicks** (number) - Optional - Start time in ticks. - **segmentStartTimeTicks** (number) - Optional - Segment start time in ticks. - **copyTimestamps** (string) - Optional - Copy timestamps option. - **sourceTicks** (number) - Optional - Source ticks. - **updatePts** (boolean) - Optional - Whether to update PTS. - **key** (string) - Optional - A key for the stream. - **externalId** (string) - Optional - External ID for the stream. - **pipelineLanguage** (string) - Optional - Pipeline language. - **playSessionId** (string) - Optional - Play session ID. - **maxBitRate** (number) - Optional - Maximum bitrate for the stream. - **liveStreamAttemptCount** (number) - Optional - Number of attempts for live stream. - **width** (number) - Optional - Width of the video. - **height** (number) - Optional - Height of the video. - **enableMpegtsMode** (boolean) - Optional - Enable MPEG-TS mode. - **videoBitTolerance** (number) - Optional - Video bit tolerance. - **audioBitTolerance** (number) - Optional - Audio bit tolerance. - **authenticationProviderId** (string) - Optional - Authentication provider ID. - **force444** (boolean) - Optional - Force 444 video format. - **encryptionParameters** (string) - Optional - Encryption parameters. - **profile** (string) - Optional - Video profile. - **level** (string) - Optional - Video level. - **refFrames** (number) - Optional - Number of reference frames. - **varnishId** (string) - Optional - Varnish ID. - **bitrate** (number) - Optional - Desired bitrate for the stream. ### Request Example ```json { "requestParameters": { "videoId": "YOUR_VIDEO_ID", "container": "mp4" } } ``` ### Response #### Success Response (200) - **File** (File) - Headers indicating the stream's availability and properties for the specified container. #### Response Example (Empty body, headers provide information) ``` ```APIDOC ## POST /Videos/MergeVersions ### Description Merges different versions of a video into a single entity. This is useful for consolidating multiple encodings or versions of the same media. ### Method POST ### Endpoint /Videos/MergeVersions ### Parameters #### Request Body - **requestParameters** (VideosApiMergeVersionsRequest) - Required - Request parameters for merging video versions. ### Request Example ```json { "requestParameters": { "id": "string", "mergeVersionIds": ["string"] } } ``` ### Response #### Success Response (200) - **void** - Indicates successful merging of video versions. #### Response Example (No specific response body for success, typically returns 204 No Content) ``` -------------------------------- ### User API Endpoints Source: https://typescript-sdk.jellyfin.org/modules/generated-client Endpoints for managing users, including authentication, creation, deletion, and updating user information and policies. ```APIDOC ## POST /Users/Authenticate ### Description Authenticates a user by username and password. ### Method POST ### Endpoint /Users/Authenticate ### Parameters #### Request Body - **username** (string) - Required - The username. - **password** (string) - Required - The user's password. ### Request Example ```json { "username": "testuser", "password": "password123" } ``` ### Response #### Success Response (200) - **accessToken** (string) - The authentication token. - **user** (object) - User information. #### Response Example ```json { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user": { "id": "user456", "name": "testuser" } } ``` ## POST /Users/Create ### Description Creates a new user. ### Method POST ### Endpoint /Users/Create ### Parameters #### Request Body - **name** (string) - Required - The username for the new user. - **password** (string) - Required - The password for the new user. - **email** (string) - Optional - The email address for the new user. ### Request Example ```json { "name": "newuser", "password": "newpassword456", "email": "newuser@example.com" } ``` ### Response #### Success Response (201) - **id** (string) - The ID of the newly created user. #### Response Example ```json { "id": "user789" } ``` ## DELETE /Users/{userId} ### Description Deletes a user by their ID. ### Method DELETE ### Endpoint /Users/{userId} ### Parameters #### Path Parameters - **userId** (string) - Required - The ID of the user to delete. ### Request Example ```json { "userId": "user123" } ``` ### Response #### Success Response (204) No content is returned on successful deletion. ## GET /Users ### Description Retrieves a list of all users. ### Method GET ### Endpoint /Users ### Parameters #### Query Parameters - **startIndex** (integer) - Optional - The starting index for pagination. - **limit** (integer) - Optional - The maximum number of users to return. ### Response #### Success Response (200) - **users** (array of objects) - A list of user objects. - **id** (string) - User ID. - **name** (string) - Username. #### Response Example ```json { "users": [ { "id": "user456", "name": "testuser" }, { "id": "user789", "name": "newuser" } ] } ``` ## PUT /Users/{userId} ### Description Updates an existing user's information. ### Method PUT ### Endpoint /Users/{userId} ### Parameters #### Path Parameters - **userId** (string) - Required - The ID of the user to update. #### Request Body - **name** (string) - Optional - The updated username. - **email** (string) - Optional - The updated email address. ### Request Example ```json { "userId": "user123", "name": "updateduser", "email": "updated@example.com" } ``` ### Response #### Success Response (204) No content is returned on successful update. ``` -------------------------------- ### Video Attachments API Source: https://typescript-sdk.jellyfin.org/modules/generated-client Endpoints for managing video attachments. ```APIDOC ## GET /Videos/{videoId}/Attachment ### Description Retrieves an attachment for a specific video. ### Method GET ### Endpoint /Videos/{videoId}/Attachment ### Parameters #### Path Parameters - **videoId** (string) - Required - The ID of the video. #### Query Parameters - **name** (string) - Optional - The name of the attachment to retrieve. ### Response #### Success Response (200) - **Data** (blob) - The content of the attachment. #### Response Example *(Response content will be the binary data of the attachment)* ```