Live API

GET /live/list

List of live events

Example request:

GET /live/list?max_results=2&api_key=key-XXXXXXXXXXXXX HTTP/1.1
Host: api.dvidshub.net
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
Accept: application/json, text/javascript
Referer: https://api.dvidshub.net

Example response:

HTTP/1.1 200 OK
Content-type: application/json; charset=utf-8
Transfer-encoding: chunked
Connection: keep-alive
Date: Fri, 06 Dec 2024 17:53:29 GMT
Server: Apache
Set-cookie: session=expiry=1733508209710465;Max-Age=600;path=/var/lib/php/sessions;domain=yourdomain.com;httpOnly;secure;
Cache-control: no-cache, private
Access-control-allow-origin: *
Content-encoding: gzip
Vary: Accept-Encoding
X-cache: Miss from cloudfront
Via: 1.1 c022ca80d7b946eb138dfd2e55c98980.cloudfront.net (CloudFront)
X-amz-cf-pop: IAD12-P4
Alt-svc: h3=":443"; ma=86400
X-amz-cf-id: t-WoRz8kT-bbn9WXkisqoVT68fIDRJsJqmDz0PwcClPvmbEp6FNI8w==

{
    "results":[
        {
            "type":"live_webcasts",
            "id":"34967",
            "title":"MCRD San Diego Company Kilo Company Graduation - 12\/6\/24",
            "description":"The new Marines of Kilo Company, 3rd Recruit Training Battalion, graduated from Marine Corps Recruit Depot San Diego, Dec 06, 2024. Graduation took place at the completion of the 13-week transformation which included training for drill, marksmanship, basic combat skills, and Marines Corps customs and traditions. Following graduation, the Marines were given 10 days of leave before taking the next step in training at the School of Infantry at Marine Corps Base Camp Pendleton, California.",
            "hashtag":"USMC",
            "begin":"2024-12-06T17:35:00+00:00",
            "end":"2024-12-06T19:30:00+00:00",
            "thumbnail":{
                "url":"https:\/\/d1ldvf68ux039x.cloudfront.net\/thumbs\/webcast\/dod_default\/122x92_q95.jpg",
                "width":122,
                "height":92
            },
            "url":"https:\/\/www.dvidshub.net\/webcast\/34967",
            "hls_url":"https:\/\/d1b55jk78a7el0.cloudfront.net\/out\/v1\/1d4a1a50b52b4333894d00ce0c4c7ca5\/index.m3u8",
            "unit_id":"750"
        },
        {
            "type":"live_webcasts",
            "id":"35079",
            "title":"Retirement Ceremony in Honor of BG David E. Mendelson",
            "description":"Retirement Ceremony in Honor of BG David E. Mendelson.",
            "hashtag":"",
            "begin":"2024-12-06T17:50:00+00:00",
            "end":"2024-12-06T19:30:00+00:00",
            "thumbnail":{
                "url":"https:\/\/d1ldvf68ux039x.cloudfront.net\/thumbs\/webcast\/dod_default\/122x92_q95.jpg",
                "width":122,
                "height":92
            },
            "url":"https:\/\/www.dvidshub.net\/webcast\/35079",
            "hls_url":"https:\/\/d7e306zdqcax0.cloudfront.net\/out\/v1\/f1fbcdcc778649108826fff48382c641\/index.m3u8",
            "unit_id":"1614"
        }
    ],
    "current_time":"2024-12-06T17:53:29+00:00"
}

Query Parameters:

  • api_key: Public API access key issued by DVIDS (key-xxxxxxxxxxxxx)
  • from_date: Specify a date/time in ISO8601 format to return events newer than from_date
  • has_video_id: [1] If set only return events that have a video_id associated with it
  • hashtag: If set only return events with that hashtag specified
  • max_results: [1-50] Maximum number of results to return per page. Default and maximum value are both 50.
  • prettyprint: [1] Spaces out JSON response in more readable format useful for debugging
  • sort: One of begin, end
  • sortdir: One of asc, desc
  • thumb_width: [1-2000] Width of thumbnail in pixels. If thumb_height is provided, this defaults to the aspect ratio native width of the asset relative to the height requested. Otherwise the resolution is 122x92. Max of 2000.
  • thumb_height: [1-2000] Height of thumbnail in pixels. If thumb_width is provided, this defaults to the aspect ratio native height of the asset relative to the width requested. Otherwise the resolution is 122x92. Max of 2000.
  • thumb_quality: [1-100] Quality of generated thumbnail. Default is 95
  • to_date: Specify a date/time in ISO8601 format to return events older than to_date

Status Codes:

  • 200: no error
  • 400: invalid parameter(s) specified. See errors element in response for details.
  • 403: api_key not provided, invalid, or accessed from origin (protocol+domain) other than the one associated with the key provided.

Response Fields:

  • id: Id of the live event
  • type: Type of live event (live_webcast)
  • begin: Date/time event starts in ISO8601 format
  • current_time: Current server date/time in ISO8601 format. Useful for calculating time offset between server and client to provide time sync
  • description: Event description
  • end: Date/time event ends in ISO8601 format
  • thumbnail: [array] Resized image of event poster as specified by thumb_XXX params
  • url: Url to asset on dvidshub.net
  • video_id: Returned if the live event has been linked to a video asset

GET /live/get

Get additional details about live event including links to feed(s)

Example request:

GET /live/get?id=3852&api_key=key-XXXXXXXXXXXXX HTTP/1.1
Host: api.dvidshub.net
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
Accept: application/json, text/javascript
Referer: https://api.dvidshub.net

Example response:

HTTP/1.1 200 OK
Content-type: application/json; charset=utf-8
Content-length: 594
Connection: keep-alive
Date: Fri, 06 Dec 2024 17:53:29 GMT
Access-control-allow-origin: *
Server: Apache
Set-cookie: session=expiry=1733508209783588;Max-Age=600;path=/var/lib/php/sessions;domain=yourdomain.com;httpOnly;secure;
Cache-control: no-cache, private
X-cache: Miss from cloudfront
Via: 1.1 eb8674b99d3dfcc6867fb20af353442a.cloudfront.net (CloudFront)
X-amz-cf-pop: IAD12-P4
Alt-svc: h3=":443"; ma=86400
X-amz-cf-id: g8TQkcJ6x0Rm7DcfpsXYANP316qjFSYRgoopLAdLRo_nXETNWZaKrg==

{
    "current_time":"2024-12-06T17:53:29+00:00",
    "results":{
        "id":"3852",
        "title":"US Department of State Press Briefing",
        "description":"Marie Harf, US Department of State Deputy Spokesperson, will deliver the daily press briefing. Feed begins at 1:30 PM EDT.  *** Time subject to change.",
        "begin":"2014-04-03T17:25:00+00:00",
        "end":"2014-04-03T19:48:00+00:00",
        "hls_url":null,
        "thumbnail":{
            "url":"https:\/\/d1ldvf68ux039x.cloudfront.net\/thumbs\/frames\/video\/1404\/326950\/122x92_q95.jpg",
            "width":122,
            "height":92
        },
        "url":"https:\/\/www.dvidshub.net\/webcast\/3852",
        "video_id":"326950",
        "unit_id":"127"
    }
}

Query Parameters:

  • api_key: Public API access key issued by DVIDS (key-xxxxxxxxxxxxx)
  • fields: Comma separated list of which fields to return
  • id: [int] Id of of the live event
  • prettyprint: [1] Spaces out JSON response in more readable format useful for debugging
  • thumb_width: [1-2000] Width of thumbnail in pixels. If thumb_height is provided, this defaults to the aspect ratio native width of the asset relative to the height requested. Otherwise the resolution is 122x92. Max of 2000.
  • thumb_height: [1-2000] Height of thumbnail in pixels. If thumb_width is provided, this defaults to the aspect ratio native height of the asset relative to the width requested. Otherwise the resolution is 122x92. Max of 2000.
  • thumb_quality: [1-100] Quality of generated thumbnail. Default is 95
  • video_id: Returned if the current event has been linked to a video asset

Status Codes:

  • 200: no error
  • 400: invalid parameter(s) specified. See errors element in response for details.
  • 403: api_key not provided, invalid, or accessed from origin (protocol+domain) other than the one associated with the key provided.

Response Fields:

  • id: Id of the live event
  • begin: Date/time event starts in ISO8601 format
  • current_time: Current server date/time in ISO8601 format. Useful for calculating time offset between server and client to provide time sync
  • description: Event description
  • end: Date/time event ends in ISO8601 format
  • hls_url: Url to master m3u8 playlist for event
  • thumbnail: [array] Resized image of event poster as specified by thumb_XXX params
  • url: Url to asset on dvidshub.net
  • video_id: Returned if the live event has been linked to a video asset