# Api_StationMedia

Type: object

Schema: [Api_StationMedia](https://sourcey-azuracast.pages.dev/docs/api/models/api-stationmedia/index.md)

allOf:
  Reference: [Api_HasSongFields](https://sourcey-azuracast.pages.dev/docs/api/models/api-hassongfields/index.md); Type: object

  Reference: [HasLinks](https://sourcey-azuracast.pages.dev/docs/api/models/haslinks/index.md); Type: object

  Type: object
  
  - `id` (optional)
    Type: integer
    
    The media's identifier.
    
    Example:
    
    ```json
    1
    ```
  
  - `unique_id` (optional)
    Type: string
    
    A unique identifier for this specific media item in the station's library. Each entry in the media table has a unique ID, even if it refers to a song that exists elsewhere.
    
    Example:
    
    ```json
    "69b536afc7ebbf16457b8645"
    ```
  
  - `song_id` (optional)
    Type: string
    
    The media file's 32-character unique song identifier hash. This hash is based on track metadata, so the same song uploaded multiple times will have the same `song_id`.
    
    Example:
    
    ```json
    "9f33bbc912c19603e51be8e0987d076b"
    ```
  
  - `art` (optional)
    Type: string
    
    URL to the album art.
    
    Example:
    
    ```json
    "https://picsum.photos/1200/1200"
    ```
  
  - `path` (optional)
    Type: string
    
    The relative path of the media file.
    
    Example:
    
    ```json
    "test.mp3"
    ```
  
  - `mtime` (optional)
    Type: integer
    
    The UNIX timestamp when the database was last modified.
    
    Example:
    
    ```json
    1609480800
    ```
  
  - `uploaded_at` (optional)
    Type: integer
    
    The UNIX timestamp when the item was first imported into the database.
    
    Example:
    
    ```json
    1609480800
    ```
  
  - `art_updated_at` (optional)
    Type: integer
    
    The latest time (UNIX timestamp) when album art was updated.
    
    Example:
    
    ```json
    1609480800
    ```
  
  - `length` (optional)
    Type: number, float
    
    The song duration in seconds.
    
    Example:
    
    ```json
    240
    ```
  
  - `length_text` (optional)
    Type: string
    
    The formatted song duration (in mm:ss format)
    
    Example:
    
    ```json
    "4:00"
    ```
  
  - `custom_fields` (optional)
    Reference: [HashMap](https://sourcey-azuracast.pages.dev/docs/api/models/hashmap/index.md); Type: object
    
    A hash-map array represented as an object.
  
  - `extra_metadata` (optional)
    Reference: [HashMap](https://sourcey-azuracast.pages.dev/docs/api/models/hashmap/index.md); Type: object
    
    A hash-map array represented as an object.
  
  - `playlists` (optional)
    Type: array
    
    Items:
      Type: unknown
      
      oneOf:
        Reference: [Api_StationMediaPlaylist](https://sourcey-azuracast.pages.dev/docs/api/models/api-stationmediaplaylist/index.md); Type: object
      
        Type: integer
        
        writeOnly: true