> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unicontrol.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Resolve um URI para URL tocável + MIME

> Devolve a URL direta de streaming (quando cloud) ou URL assinada do core (quando conteúdo mora no edge). Use o resultado no `media_player.play_media`.



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi post /v1/media-source/resolve
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/media-source/resolve:
    post:
      tags:
        - MediaSource
      summary: Resolve um URI para URL tocável + MIME
      description: >-
        Devolve a URL direta de streaming (quando cloud) ou URL assinada do core
        (quando conteúdo mora no edge). Use o resultado no
        `media_player.play_media`.
      operationId: postV1Media-sourceResolve
      parameters:
        - in: header
          name: X-Organization-Id
          required: false
          schema:
            type: string
          description: >-
            ID da organização para contexto (opcional). Quando presente, filtra
            recursos da org.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uri
              properties:
                uri:
                  type: string
                  description: >-
                    URI completo do item, ex.:
                    media-source://radio_browser/<station_uuid>
                target_media_player:
                  type: string
                  nullable: true
                  description: >-
                    entity_id do media_player de destino (opcional, usado como
                    dica)
      responses:
        '200':
          description: Playable
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  mime_type:
                    type: string
                  extra:
                    type: object
                    additionalProperties: true
                    nullable: true
                required:
                  - url
                  - mime_type
        '400':
          description: Dados inválidos
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: validation error
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '404':
          description: Recurso não encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.