HHS Media Services API

API Details

API Version 2
Swagger Version 1.2
Contact syndicationadmin@hhs.gov
License GNU GENERAL PUBLIC LICENSE
License Url http://www.gnu.org/licenses/gpl.html
License Url http://www.hhs.gov/web/socialmedia/policies/tos.html#ready

Common Features / Behaviors

API Listing

Resource: /campaigns

Description Information about campaigns
Base Path https://api.digitalmedia.hhs.gov/api/v2

End Points

Path /resources/campaigns.json
Description Media Listings for a specific campaign
Operations
Method GET
Nickname getCampaigns
Notes Returns the list of Campaigns.

Parameters

Path /resources/campaigns/{id}.json
Description Information about a specific campaign
Operations
Method GET
Nickname getCampaignById
Notes Returns the Campaign identified by the 'id'.

Parameters

Path /resources/campaigns/{id}/media.json
Description Campaign Listings
Operations
Method GET
Nickname getMediaByCampaignId
Notes Returns the list of MediaItems for the Campaign identified by the 'id'.

Parameters

Path /resources/campaigns/{id}/syndicate.{format}
Description MediaItem
Operations
Method GET
Nickname syndicate
Notes Renders the list of MediaItems associated with the Campaign identified by the 'id'.

Parameters

Resource: /languages

Description Information about languages
Base Path https://api.digitalmedia.hhs.gov/api/v2

End Points

Path /resources/languages.json
Description Language Listings
Operations
Method GET
Nickname getLanguages
Notes Returns the list Languages.

Parameters

Path /resources/languages/{id}.json
Description Information about a specific language
Operations
Method GET
Nickname getLanguageById
Notes Returns the Language identified by the 'id'.

Parameters

Resource: /media

Description Information about media
Base Path https://api.digitalmedia.hhs.gov/api/v2

End Points

Path /resources/media.json
Description Media Items Listings
Operations
Method GET
Nickname getMedia
Notes Returns the list of MediaItems matching the specified query parameters.

Parameters

Path /resources/media/featured.json
Description Get the list of featured content in the syndication system
Operations
Method GET
Nickname getFeaturedMedia
Notes Get the list of featured content in the syndication system

Parameters

Path /resources/media/mostPopularMedia.{format}
Description Get the media with the highest ratings.
Operations
Method GET
Nickname getMostPopularMedia
Notes Returns the list of MediaItems with the highest ratings.

Parameters

Path /resources/media/searchResults.json
Description Full search
Operations
Method GET
Nickname searchMedia
Notes Returns the list of MediaItems matching the search query 'q'.

The search query 'q' is a Lucene query.
The syntax for a Lucene query can be found here

Parameters

Path /resources/media/{id}.json
Description Information about a specific media item
Operations
Method GET
Nickname getMediaById
Notes Returns the MediaItem identified by the 'id'.

Parameters

Path /resources/media/{id}/content
Description The actual media content (html, image, etc…)
Operations
Method GET
Nickname getMediaContentById
Notes Returns the raw content (html, image, etc…) for the MediaItem identified by the 'id'.

Parameters

Path /resources/media/{id}/embed.json
Description Get the javascript or iframe embed code for this item (to embed it on a web page).
Operations
Method GET
Nickname getMediaEmbedById
Notes Returns the javascript or iframe embed code for the MediaItem identified by 'id'.

Parameters

Path /resources/media/{id}/preview.jpg
Description Get the jpg preview of the content item where applicable.
Operations
Method GET
Nickname getMediaPreviewById
Notes Returns the JPG preview, where applicable, for the MediaItem identified by the 'id'.

Parameters

Path /resources/media/{id}/ratings.json
Description Get the 'like' count for the specified media item.
Operations
Method GET
Nickname getMediaRatingsById
Notes Get the Ratings (number of 'likes') for the MediaItem identified by the 'id'.

Parameters

Path /resources/media/{id}/relatedMedia.{format}
Description Get the media related to the current media item.
Operations
Method GET
Nickname getRelatedMediaById
Notes Returns the list of MediaItems related to the MediaItem identified by the 'id'.

Parameters

Path /resources/media/{id}/syndicate.{format}
Description Get syndicated content.
Operations
Method GET
Nickname getMediaSyndicateById
Notes Returns the syndicated content for a given MediaItem in the specified 'format' (HTML or JSON).

Parameters

Path /resources/media/{id}/thumbnail.jpg
Description Get the jpg thumbnail of the content item where applicable.
Operations
Method GET
Nickname getMediaThumbnailById
Notes Returns the JPG thumbnail, where applicable, for the MediaItem identified by the 'id'.

Parameters

Path /resources/media/{id}/youtubeMetaData.json
Description Youtube meta-data for a video item.
Operations
Method GET
Nickname getMediaYoutubeMetaDataById
Notes Returns the Youtube metadata, where applicable, for the MediaItem identified by the 'id'.

Parameters

Resource: /mediaTypes

Description Information about media types
Base Path https://api.digitalmedia.hhs.gov/api/v2

End Points

Path /resources/mediaTypes.{format}
Description Information about media types
Operations
Method GET
Nickname getMediaTypes
Notes Returns the list of available MediaTypes.

Parameters

Resource: /resources

Description Global Search
Base Path https://api.digitalmedia.hhs.gov/api/v2

End Points

Path /resources.json
Description Global search
Operations
Method GET
Nickname getResources
Notes Returns the list of Resources matching the search query 'q'.

The search query 'q' is a Lucene query.
The syntax for a Lucene query can be found here.

Parameters

Resource: /sources

Description Information about sources.
Base Path https://api.digitalmedia.hhs.gov/api/v2

End Points

Path /resources/sources.json
Description Source Listings
Operations
Method GET
Nickname getSources
Notes Returns the list of Sources.

Parameters

Path /resources/sources/{id}.json
Description Information about a specific source.
Operations
Method GET
Nickname getSourceById
Notes Returns the Source identified by the 'id'.

Parameters

Path /resources/sources/{id}/syndicate.{format}
Description MediaItem
Operations
Method GET
Nickname syndicate
Notes Renders the list of MediaItems associated with the Source identified by the 'id'.

Parameters

Resource: /tags

Description Information about tags
Base Path https://api.digitalmedia.hhs.gov/api/v2

End Points

Path /resources/tags.{format}
Description List of Tags
Operations
Method GET
Nickname getTags
Notes Returns the list of Tags matching the specified query parameters in the specified 'format'.

Parameters

Path /resources/tags/tagLanguages.{format}
Description List of Tag Languages
Operations
Method GET
Nickname getTagLanguages
Notes Returns the list of TagLanguages

Parameters

Path /resources/tags/tagTypes.{format}
Description List of Types
Operations
Method GET
Nickname getTagTypes
Notes Returns the list of TagTypes

Parameters

Path /resources/tags/{id}.{format}
Description Information about a specific tag
Operations
Method GET
Nickname getTagById
Notes Returns the Tag identified by the 'id' in the specified 'format'.

Parameters

Path /resources/tags/{id}/media.{format}
Description MediaItem
Operations
Method GET
Nickname getMediaByTagId
Notes Returns the list of MediaItems associated with the Tag identified by the 'id'.

Parameters

Path /resources/tags/{id}/related.{format}
Description Information about related tags to a specific tag
Operations
Method GET
Nickname getRelatedTagsById
Notes Returns the list of Tags related to the Tag identified by the 'id' in the specified format.

Parameters

Path /resources/tags/{id}/syndicate.{format}
Description MediaItem
Operations
Method GET
Nickname syndicate
Notes Renders the list of MediaItems associated with the Tag identified by the 'id'.

Parameters

Resource: /userMediaLists

Description Get media from user generated lists.
Base Path https://api.digitalmedia.hhs.gov/api/v2

End Points

Path /resources/userMediaLists/{id}.json
Description Get a specific user media list.
Operations
Method GET
Nickname getUserMediaList
Notes Get a specific user media list by 'id'.

Parameters