Skip to Content
Xeonr Developer Docs
API Specificationxmb.api.v1.LibraryService

Ensure library

POST
/xmb.api.v1.LibraryService/EnsureLibrary

Returns the server's library for the given category, creating it if it does not exist.

Required scopes: xmb:admin

Authorization

BearerAuth
AuthorizationBearer <token>

An access token issued by the xeonr identity provider.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

serverSlug?string
Length1 <= length <= 128
category?not unknown

Which library. A server has at most one per category.

Value in"LIBRARY_CATEGORY_UNSPECIFIED" | "LIBRARY_CATEGORY_MOVIE" | "LIBRARY_CATEGORY_TV" | "LIBRARY_CATEGORY_ANIME" | "LIBRARY_CATEGORY_OTHER" | "LIBRARY_CATEGORY_ANIME_FILM"
name?string

Display name, applied only when the library is created. Empty takes the category's own wording.

Lengthlength <= 128
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://xmb.gg/xmb.api.v1.LibraryService/EnsureLibrary" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "library": "map[artwork:[map[kind:poster providers:[tmdb tvdb]]] category:LIBRARY_CATEGORY_TV createdAt:2026-03-14T18:02:11Z defaultQualityProfileName:HD 1080p defaultQualityProfileUuid:9a1c3e5f-2b4d-4c6e-8f0a-1b3d5f7a9c2e metadataProviders:[map[enabled:true name:tvdb specialises:true] map[enabled:true name:tmdb specialises:false]] name:TV Shows ord:1 paths:[map[createdAt:2026-03-14T18:02:11Z hubName:Living room NAS hubUuid:5f0c2a9e-8b1d-4c3a-9e2f-7a6b1c4d8e01 path:TV uuid:0d4f8a2b-6c1e-4f3a-9b7d-2e5c8a1f4b6d]] slug:tv subtitles:map[allowForced:true allowHearingImpaired:false allowMachineTranslated:false languages:[en] mode:suggest providers:[map[configured:true displayName:OpenSubtitles enabled:true name:opensubtitles quotaBound:true]] trustedOnly:false] uuid:7b2e9c4d-1a3f-4b5c-8d6e-9f0a1b2c3d4e]"
}