MetaPort API Specification

Developer’s guide to submitting external metadata to Metaflow and into your audio stream.

The Metaflow describes how the platform handles metadata. To push metadata to QuantumCast, use the MetaPort. This is a required service, if you are using own (encoded) external audio source(s) and you will push current metadata into your audio stream.

Push metadata

GET https://metadata.streamabc.net/metapush/(string: channelkey)/(string: token)

Send metadata to your audio stream. channelkey and token can be found in your own Self-Service-Console.

  • channelkey - unique key / ID of the stream.

  • token - MetaPort Token for this channel

Query Parameters
  • song (string) – song name (can be empty)

  • artist (string) – artist name (can be empty)

  • encoding (string) – utf8 oder windows - default (if not specified): utf8, for Windows ISO8859-1 is used for song/artist

  • duration (int) – Length of the song in seconds

  • time (string|int) – if int: unix timestamp | if string: time in RFC 3339 format, default (if not specified): current time is used

  • tracktype (string) – type of record, now for current track, next for following track, default (if not specified): now

  • etype (int) –

    Content-type ID of the audio item as an integer

    default

    0

    Type

    ID

    unknown

    0

    Jingles

    101

    Promo

    102

    Advertising

    103

    News

    104

    Article

    105

    Music 1

    1001

    Music 2

    1002

    Music 3

    1003

    Music 4

    1004

    Music 5

    1005

    Music 6

    1006

    Music 7

    1007

    Music 8

    1008

  • id (string) – reference ID of the element (internal ID for evaluation, can be empty)

  • isrc (string) – ISRC (can be empty)

  • separator (string) – separator between artist and song, default is ” - “

Example request:

curl https://metadata.streamabc.net/metapush/qc_fkvwoo65bsvz_tuzx/bPlfFlFpEw27We6a
POST https://metadata.streamabc.net/metapush/(string: channelkey)/(string: token)

Send metadata to your audio stream. channelkey and token can be found in your own Self-Service-Console.

  • channelkey - unique key / ID of the stream.

  • token - MetaPort Token for this channel

Example request:

curl \
    https://metadata.streamabc.net/metapush/qc_fkvwoo65bsvz_tuzx/bPlfFlFpEw27We6a \
    -X POST \
    -H "Content-Type: application/json" \
    -d @body.json

The content of body.json has the following structure:

{
    "id":"",
    "time":"2021-09-01T16:11:49Z",
    "duration":210,
    "song":"Song Name",
    "artist":"Artist Name",
    "cover":"https://cover.url",
    "images": {
        "small": {
            "url": "https://cover.url"
        },
        "medium": {
            "url": "https://cover.url"
        },
        "large": {
            "url": "https://cover.url"
        }
    },
    "album":"Album Name",
    "separator":" - ",
    "timezone":"UTC",
    "etype":0,
    "tracktype":"now"
    "isrc": "",
    "extdata": {
        "extData1": "...",
        "extDataN": "..."
    },
    "externalid": {
        "zenonid": "12344",
        "otherid": "abcdsd"
    }
}
Response JSON Object
  • id (string) – unique ID of the metadata element, if empty a UUID will be generated

  • time (time.Time) – RFC3339 format, if empty the current time will be used

  • duration (int) – length of the audio item in seconds (mandantory)

  • song (string) – song name (mandantory)

  • artist (string) – artist name (mandantory)

  • cover (string) – cover URL (can be empty)

  • images (object) – object of several image sizes (can be empty)

  • album (string) – album name (can be empty)

  • separator (string) – chars to separate artist and song in stream metadata, default is ” - “

  • timezone (string) – time zone, should be UTC

  • etype (int) – element type of the audio item as an integer

  • tracktype (string) – type of track data, one of now or next

  • isrc (string) – ISRC value of the audio item (can be empty)

  • extdata (object) – object of external data, will be passed untouched

  • externalid (string) – external ID of the metadata element with sub-items; you can choose this metadata element itself, but it must be uniform

Example response:

{
    "time":"2021-09-01T16:11:49Z",
    "start":"01.09.2021 16:11:49",
    "start_timestamp":1630512709,
    "duration":210,
    "song":"",
    "artist":"",
    "code":"qc_fkvwoo65bsvz_tuzx",
    "channelkey":"qc_fkvwoo65bsvz_tuzx",
    "timezone":"UTC",
    "channel":"qc_fkvwoo65bsvz_tuzx",
    "id":"",
    "userplayout":false,
    "separator":" - ",
    "etype":0,
    "album":"",
    "type":"now",
    "isrc":""
}
Response JSON Object
  • time (time.Time) – start time in RFC3339 format

  • start (string) – local date-time

  • start_timestamp (int64) – unix timestamp

  • duration (int) – Length of the audio item in seconds

  • song (string) – song name

  • artist (string) – artist name

  • code (string) – code (legacy field for channelkey)

  • channelkey (string) – channelkey - unique key / ID of the stream

  • timezone (string) – time zone of the time specification

  • channel (string) – channelkey - unique key / ID of the stream

  • id (string) – reference ID

  • userplayout (bool) – default: false | true in case of personalized audio stream

  • separator (string) – separator between artist and song, default is ” - “

  • etype (int) – element type of the audio item as an integer

  • type (string) – type of track data one of now or next

  • isrc (string) – ISRC of the audio item