Skip to content
Back to Home

Account

Account Information

Returns links to the following account information sections for the specified API key:

  • My Plans. Your plan and usage information.
  • My Followed Topics. Your Followed Topics for which you created a feed in AP Newsroom.
  • My Quotas. Your request quota information.
  • Download History. Items downloaded by you or your salesperson.

Request

  • Method: GET
  • Request URI:

    https://api.ap.org/media/v[{version}]/account?apikey={apikey}

Base URI Parameter

  • version (optional). The API version; for example, 4 or 4.1. When this parameter value is not specified, the API version set as default for your account is returned.

Request Header (Optional)

  • Accept-Encoding. Compresses the response to the gzip format. The valid value is gzip.

Request URI Example

https://api.ap.org/media/v/account?apikey={apikey}

Response

The Account Information method returns the standard HTTP status code of "200 - OK" and links to account information for the specified API key in the JSON format.

For information about error codes, see API Codes.

Response Headers

  • x-mediaapi-Q-name. The API method to which the throttle/quota applies (corresponds to the "method" property returned by Account Quotas. Possible values are search, feed, account, download, ondemand, item, other.

  • x-mediaapi-Q-secondsLeft. The number of seconds remaining in the current period.

  • x-mediaapi-Q-used. Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 1/6.

  • x-mediaapi-QDay-minutesLeft. (Optional; returned if a per-day quota is configured) The number of minutes remaining in the current period.

  • x-mediaapi-QDay-used. (Optional; returned if a per-day quota is configured) Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 2/5000000.

Top-Level Properties

  • api_version. The API version.
  • api_mode. The API mode; for example, "live" or "preview."
  • id. The response ID.
  • method. The API method name and HTTP method.
  • org_name. Organization name.
  • params. Parameters used in the API request.
  • data. Contains the data and metadata associated with the response.

Response Descriptive Properties

  • id. The Account Information URL.
  • title. The response name.
  • updated. The date and time (in UTC) when the response was generated.
  • links. Contains the data and metadata associated with an individual account information section.
    • title. The account information section name.
    • url. The URL to the account information section.
    • description. Contains the description of the account information section.

Sample Response

{
    "api_version": "1.0",
    "api_mode": "live",
    "id": "z5KyMgQ32",
    "method": "/account.GET",
    "org_name": "My Organization",
    "params": {},
    "data": {
        "id": "https://api.ap.org/media/v/account",
        "title": "My Account",
        "updated": "2017-03-07T16:19:29.616Z",
        "links": [
            {
                "title": "My Plans",
                "url": "https://api.ap.org/media/v/account/plans",
                "description": "Your plan usage information."
            },
            {
                "title": "My Followed Topics",
                "url": "https://api.ap.org/media/v/account/followedtopics",
                "description": "Your Followed Topics."
            },
            {
                "title": "My Quotas",
                "url": "https://api.ap.org/media/v/account/quotas",
                "description": "Your request quota information."
            },
            {
                "title": "My Download History",
                "url": "https://api.ap.org/media/v/account/downloads",
                "description": "Your download history, including items you or your sales person have downloaded."
            }
        ]
    }
}

Account Plans

Returns your plan details in JSON or CSV format and allows you to check how many downloads you have already used (reflects transactions as of the date and time of the response).

Request

  • Method: GET
  • Request URI:

    https://api.ap.org/media/v[{version}]/account/plans?apikey={apikey}

Base URI Parameter

  • version (optional). The API version; for example, 4 or 4.1. When this parameter value is not specified, the API version set as default for your account is returned.

Optional Parameters

  • include, exclude. Parameters used to customize the fields returned in the response. For more information, see Customizing Response Fields.

  • format. The response format (json or csv). By default, JSON is returned.

Request Header (Optional)

  • Accept-Encoding. Compresses the response to the gzip format. The valid value is gzip.

Request URI Example

https://api.ap.org/media/v/account/plans?apikey={apikey}

Response

The Account Plans method returns the standard HTTP status code of "200 - OK" and your plan details and usage information for the specified API key in the requested format (JSON or CSV).

If CSV is requested, the default file name format is plans_date.csv; for example, plans_2018-09-06.csv.

For information about error codes, see API Codes.

Response Headers

  • x-mediaapi-Q-name. The API method to which the throttle/quota applies (corresponds to the "method" property returned by Account Quotas. Possible values are search, feed, account, download, ondemand, item, other.

  • x-mediaapi-Q-secondsLeft. The number of seconds remaining in the current period.

  • x-mediaapi-Q-used. Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 1/6.

  • x-mediaapi-QDay-minutesLeft. (Optional; returned if a per-day quota is configured) The number of minutes remaining in the current period.

  • x-mediaapi-QDay-used. (Optional; returned if a per-day quota is configured) Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 2/5000000.

Top-Level Properties

  • api_version. The API version.
  • api_mode. The API mode; for example, "live" or "preview."
  • id. The response ID.
  • method. The API method name and HTTP method.
  • org_name. Organization name.
  • params. Parameters used in the API request.
  • data. Contains the data and metadata associated with the response.

Response Descriptive Properties

  • id. The Account Plans URL.
  • title. The response name.
  • updated. The date and time (in UTC) when the response was generated.
  • plans. Contains the data and metadata associated with an individual account plan information and usage.

Plan Descriptive Properties

  • id. The plan ID.
  • name. The plan name.
  • updated. The date and time (in UTC) when the plan information was last updated.
  • plan_style. Indicates how the used downloads are reported (if applicable):

    • percent (for plans such as Choice).
    • downloads (the actual number of downloads since the beginning of the current billing cycle).
    • duration (indicates unlimited downloads of certain sets of content within a certain period; for example, where the content up to 14 days old is included in the plan, and an extra charge applies to older content)
  • used. Depending on the plan style, indicates the percent or the number of downloads already used, if available.

  • usage_limit. For download-style plans, indicates the total number of downloads allowed during a billing cycle (not including downloads for an extra charge). If your plan allows for unlimited downloads, usage_limit is not returned. For percent-style plans, this value is always 100 (100%).
  • duration. For duration-based plans, the length of time during which content is included in the plan. For possible values, refer to ISO 8601 Durations.
  • interval. The length of the billing cycle. For possible values, refer to ISO 8601 Durations.
  • next_cycle_begins. Indicates the start date of the next billing cycle.
  • entitlements. Contains the data and metadata associated with an individual entitlement.

Entitlement Descriptive Properties

  • id. The entitlement ID (AP product ID or AP package ID).
  • name. The entitlement name.
  • tier. (For plans such as Choice) The name of your plan tier to which this content offering belongs.
  • type. The entitlement type:
    • Product: A standard AP news service or report, which is defined by a name, a product ID number and a description; for example, AP Online National News.
    • Package: A collection of AP products.
  • parent_id. (For products) The ID of the package that includes this product (shown only if your organization is not entitled to this product directly).
  • base_cost. Price per content item when the content item is included in the plan (if applicable).
  • overage_allowed. Indicates whether your plan allows you to download content items for an extra charge if the plan limit is reached or the item is outside of the plan's duration. Possible values are true and false.
  • overage_cost. Price per content item (extra charge) if the content item is out of the plan or if the plan limit is reached.
  • currency. The currency in which the prices are returned.
  • meter_ticks. The charge per content item in meter ticks, which indicates how many download units are deducted from your meter once the content item is downloaded. A meter tick is a form of virtual currency for content items included in your download-style plan with a download limit (metered plan).
  • search_link. A link to the results of a search by this entitlement ID.
  • feed_link. A link to the feed of content matching this entitlement ID.

Examples

Metered Plan Example

This example shows a metered plan that allows 100 downloads per month for three sample products. Each download of the "GraphicsBank - All" product content counts for one meter tick, and each download of content included in the other two products counts for two meter ticks.

{
 "api_version": "1.0",
 "api_mode": "live",
 "id": "S1Z8VDP0Z",
 "method": "/account/plans.GET",
 "org_name": "My Organization",
 "params": {},
 "data": {
   "id": "https://api.ap.org/media/v/account/plans",
   "title": "My Plans",
   "updated": "2017-11-01T16:19:29.616Z",
   "plans": [
    {
     "id": 123,
     "name": "Metered Plan",
     "updated": "2017-03-07T16:19:29.616Z",
     "plan_style": "downloads",
     "used": 0,
     "usage_limit": 100,
     "interval": "P1M",
     "next_cycle_begins": "2017-12-01",
     "entitlements": [
      {
       "id": 42460,
       "name": "AP Exclusive Photo (World)",
       "type": "Product",
       "meter_ticks": 2,
       "overage_allowed": false,
       "search_link": "https://api.ap.org/media/v/content/search?q=productid:42460",
       "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:42460"
      },
      {
       "id": 42906,
       "name": "AP Premium Photo",
       "type": "Product",
       "meter_ticks": 2,
       "overage_allowed": false,
       "search_link": "https://api.ap.org/media/v/content/search?q=productid:42906",
       "feed_link": "https://api.ap.org/media/v/feed?q=productid:42906"
      },
      {
       "id": 38474,
       "name": "Graphics Bank - All",
       "type": "Product",
       "meter_ticks": 1,
       "overage_allowed": false,
       "search_link": "https://api.ap.org/media/v/content/search?q=productid:38474",
       "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:38474"
      }]
    }]
  }
}

Unlimited Subscription Example

This example shows a plan that allows unlimited downloads of content for two sample entitlements (no "usage_limit" is returned for this plan).

{
 "id": 72791,
 "name": "Unlimited Subscription",
 "updated": "2017-11-01T17:28:14.051Z",
 "plan_style": "downloads",
 "interval": "P1M",
 "next_cycle_begins": "2017-12-01",
 "entitlements": [
   {
    "id": 31989,
    "name": "AP Online Top General Headlines",
    "type": "Product",
    "overage_allowed": false,
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:31989",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:31989"
   },
   {
    "id": 100100,
    "name": "GraphicsBank",
    "type": "Package",
    "overage_allowed": false,
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:100100",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:100100"
   }
  ]
 }

Limited Duration Subscription Example

This example shows a plan with duration-based pricing where the content up to 14 days old is included in the plan, and an extra charge applies to older content. In this example, only one entitlement is shown for brevity.

{
 "id": 22519,
 "name": "Limited Duration Subscription",
 "updated": "2017-11-01T14:59:52.675Z",
 "plan_style": "duration",
 "duration": "P14D",
 "interval": "P1M",
 "next_cycle_begins": "2017-12-01",
 "entitlements": [
   {
    "id": 42461,
    "name": "AP Exclusive Photo (World) - Browse only",
    "type": "Product",
    "overage_allowed": true,
    "overage_cost": 35,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:42461",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:42461"
   }
  ]
 }

Choice Plan Example

This example shows a PhotoChoice plan, which has multiple tiers of content, with each content offering having a different price based on the tier to which they belong. In this example, only one or two entitlements per tier are shown for brevity.

{
 "id": 90225,
 "name": "Choice Plan",
 "updated": "2017-11-01T20:23:58.729Z",
 "plan_style": "percent",
 "used": 0,
 "usage_limit": 100,
 "interval": "P1M",
 "next_cycle_begins": "2017-12-01",
 "entitlements": [
   {
    "id": 1206,
    "name": "APstrmPhotos",
    "tier": "Tier 1 - PhotoChoice",
    "type": "Package",
    "base_cost": 1.5,
    "overage_allowed": true,
    "overage_cost": 42,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:1206",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:1206"
   },
   {
    "id": 40510,
    "name": "NFL Outtakes",
    "tier": "Tier 1 - PhotoChoice",
    "type": "Product",
    "base_cost": 1.5,
    "overage_allowed": true,
    "overage_cost": 42,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:40510",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:40510"
   },
   {
    "id": 42666,
    "name": "Sports Contributor",
    "tier": "Tier 2 - PhotoChoice",
    "type": "Product",
    "base_cost": 5,
    "overage_allowed": true,
    "overage_cost": 125,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:42666",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:42666"
   },
   {
    "id": 10017,
    "name": "Canadian Press (Photostream)",
    "tier": "Tier 3 - PhotoChoice",
    "type": "Product",
    "base_cost": 10,
    "overage_allowed": true,
    "overage_cost": 225,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:10017",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:10017"
   },
   {
    "id": 43699,
    "name": "Top Photo",
    "tier": "Tier 4 - PhotoChoice",
    "type": "Product",
    "base_cost": 25,
    "overage_allowed": true,
    "overage_cost": 450,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:43699",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:43699"
   },
   {
    "id": 40645,
    "name": "NFL Contributor",
    "tier": "Tier 5 - PhotoChoice",
    "type": "Product",
    "base_cost": 50,
    "overage_allowed": true,
    "overage_cost": 950,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:40645",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:40645"
   }
  ]
 }

A La Carte Plan Example

This example shows a plan that allows a la cart downloads of content for two sample entitlements, with the indicated base price charged for each download.

{
 "id": 25681,
 "name": "A La Carte Plan",
 "updated": "2017-11-01T15:12:08.541Z",
 "plan_style": "downloads",
 "used": 0,
 "interval": "P1M",
 "next_cycle_begins": "2017-12-01",
 "entitlements": [
   {
    "id": 41758,
    "name": "Canadian Press Archive",
    "type": "Product",
    "base_cost": 35,
    "overage_allowed": false,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:41758",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:41758"
   },
   {
    "id": 42068,
    "name": "Canadian Press Extra",
    "type": "Product",
    "base_cost": 35,
    "overage_allowed": false,
    "currency": "USD",
    "search_link": "https://api.ap.org/media/v/content/search?q=productid:42068",
    "feed_link": "https://api.ap.org/media/v/content/feed?q=productid:42068"
   }
  ]
 }

Followed Topics

Returns Followed Topics for your account in JSON or CSV format. Only the Followed Topics for which a feed was created in AP Newsroom are returned.

Request

  • Method: GET
  • Request URI:

    https://api.ap.org/media/v[{version}]/account/followedtopics?apikey={apikey}

Base URI Parameter

  • version (optional). The API version; for example, 4 or 4.1. When this parameter value is not specified, the API version set as default for your account is returned.

Optional Parameter

  • format. The response format (json or csv). By default, JSON is returned.

Request Header (Optional)

  • Accept-Encoding. Compresses the response to the gzip format. The valid value is gzip.

Request URI Example

https://api.ap.org/media/v/account/followedtopics?apikey={apikey}

Response

The Followed Topics method returns the standard HTTP status code of "200 - OK" and feed-enabled Followed Topics for the specified API key in the requested format (JSON or CSV).

If CSV is requested, the default file name format is followed_topics_date.csv; for example, followed_topics_2018-09-06.csv.

For information about error codes, see API Codes.

Response Headers

  • x-mediaapi-Q-name. The API method to which the throttle/quota applies (corresponds to the "method" property returned by Account Quotas. Possible values are search, feed, account, download, ondemand, item, other.

  • x-mediaapi-Q-secondsLeft. The number of seconds remaining in the current period.

  • x-mediaapi-Q-used. Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 1/6.

  • x-mediaapi-QDay-minutesLeft. (Optional; returned if a per-day quota is configured) The number of minutes remaining in the current period.

  • x-mediaapi-QDay-used. (Optional; returned if a per-day quota is configured) Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 2/5000000.

Top-Level Properties

  • api_version. The API version.
  • api_mode. The API mode; for example, "live" or "preview."
  • id. The response ID.
  • method. The API method name and HTTP method.
  • org_name. Organization name.
  • params. Parameters used in the API request.
  • data. Contains the data and metadata associated with the response.

Response Descriptive Properties

  • id. The Followed Topics URL.
  • title. The response name.
  • updated. The date and time (in UTC) when the response was generated.
  • followedtopics. Contains your Followed Topics for which a feed was created in AP Newsroom.
    • id. The Followed Topic ID.
    • name. The Followed Topic name.

Sample Response

{
    "api_version": "1.0",
    "api_mode": "live",
    "id": "B1lxSm2Av7",
    "method": "/account/followedtopics.GET",
    "org_name": "My Organization",
    "params": {},
    "data": {
        "id": "https://api.ap.org/media/v/account/followedtopics",
        "title": "My Followed Topics",
        "updated": "2018-09-06T14:01:27.728Z",
        "followedtopics": [
          {
            "id": "714005",
            "name": "Italy Earthquake"
          },
          {
            "id": "714006",
            "name": "Soccer"
          }
       ]
    }
}

Account Quotas

Returns API throttling/quota information for your account.

Request

  • Method: GET
  • Request URI:

    https://api.ap.org/media/v[{version}]/account/quotas?apikey={apikey}

Base URI Parameter

  • version (optional). The API version; for example, 4 or 4.1. When this parameter value is not specified, the API version set as default for your account is returned.

Request Header (Optional)

  • Accept-Encoding. Compresses the response to the gzip format. The valid value is gzip.

Request URI Example

https://api.ap.org/media/v/account/quotas?apikey={apikey}

Response

The Account Quotas method returns the standard HTTP status code of "200 - OK" and the throttle/quota information for the specified API key in the JSON format.

For information about error codes, see API Codes.

Top-Level Properties

  • api_version. The API version.
  • api_mode. The API mode; for example, "live" or "preview."
  • id. The response ID.
  • method. The API method name and HTTP method.
  • params. Parameters used in the API request.
  • data. Contains the data and metadata associated with the response.

Response Descriptive Properties

  • id. The Account Quotas URL.
  • title. The response name.
  • updated. The date and time (in UTC) when the response was generated.
  • quotas. Contains the account's throttle/quota information (for example, the limit on the number of queries per minute).
    • method. The API method to which the throttle/quota applies. Possible values are search, feed, account, download, ondemand, item, other.
    • limit. The maximum number of calls allowed during a certain interval; for example, per minute.
    • period. The interval for limiting the number of calls; for example, 'PT1M' indicates that the number of queries is limited per minute. For possible values, refer to ISO 8601 Durations.

Note

If calls using a certain method are not controlled by a quota, "limit": 0, "unlimited": true is returned for that method.

Sample Response

{
 "api_version": "1.0",
 "api_mode": "live",
 "id": "0927153727a167Z37a125",
 "method": "quotas.get",
 "params": {},
 "data": {
    "id": "/account/quotas",
    "title": "My quotas",
    "updated": "2019-01-31T18:13:42.927Z",
    "quotas": [
      {
        "method": "search",
        "limit": 10,
        "period": "PT1M"
      },
      {
        "method": "search",
        "limit": 500,
        "period": "P1D"
      },
      {
        "method": "feed",
        "limit": 20,
        "period": "PT1M"
      },
      {
        "method": "account",
        "limit": 40,
        "period": "PT1M"
      },
      {
        "method": "download",
        "limit": 20,
        "period": "PT1M"
      },
      {
        "method": "ondemand",
        "limit": 20,
        "period": "PT1M"
      },
      {
        "method": "item",
        "limit": 30,
        "period": "PT1M"
      },
      {
        "method": "other",
        "limit": 0,
        "unlimited": true
      }
    ]
  }
}

Download History

Returns your order history (a list of content items downloaded by you or your salesperson) in JSON or CSV format. The download information is available for the last 365 days only. The default date range is 30 days prior to the time of the request. You can use the optional min_date and max_date parameters to specify another date range that may not exceed 63 days within the last 365 days.

Request

  • Method: GET
  • Request URI:

    https://api.ap.org/media/v[{version}]/account/downloads?apikey={apikey}[&{optional_parameters}]

Base URI Parameter

  • version (optional). The API version; for example, 4 or 4.1. When this parameter value is not specified, the API version set as default for your account is returned.

Optional Parameters

  • min_date. The date and time after which the content items were downloaded, in the format YYYY-MM-DD; for example, 2017-09-20. The default is 30 days prior to the time of the request. The download information is available for the last 365 days only. The requested date range may not exceed 60 days.

  • max_date. The date and time before which the content items were downloaded, in the format YYYY-MM-DD; for example, 2017-10-04. The default is the time of the request. The requested date range may not exceed 60 days.

  • include, exclude. Parameters used to customize the fields returned in the response. For more information, see Customizing Response Fields.

  • format. The response format (json or csv). By default, JSON is returned.

Request Header (Optional)

  • Accept-Encoding. Compresses the response to the gzip format. The valid value is gzip.

Request URI Example

https://api.ap.org/media/v/account/downloads?min_date=2018-04&max_date=2018-05&apikey={apikey}

Response

The Account Downloads method returns the standard HTTP status code of "200 - OK" and a list of downloaded content items for the specified API key and date parameters in the requested format (JSON or CSV).

If CSV is requested, the default file name format is usage_downloads_min_date_max_date.csv; for example, usage_downloads_2017-08-24_2017-09-28.csv.

For information about error codes, see API Codes.

Response Headers

  • x-mediaapi-Q-name. The API method to which the throttle/quota applies (corresponds to the "method" property returned by Account Quotas. Possible values are search, feed, account, download, ondemand, item, other.

  • x-mediaapi-Q-secondsLeft. The number of seconds remaining in the current period.

  • x-mediaapi-Q-used. Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 1/6.

  • x-mediaapi-QDay-minutesLeft. (Optional; returned if a per-day quota is configured) The number of minutes remaining in the current period.

  • x-mediaapi-QDay-used. (Optional; returned if a per-day quota is configured) Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 2/5000000.

Top-Level Properties

  • api_version. The API version.
  • api_mode. The API mode; for example, "live" or "preview."
  • id. The response ID.
  • method. The API method name and HTTP method.
  • org_name. Organization name.
  • params. Parameters used in the API request.
  • data. Contains the data and metadata associated with the response.

Response Descriptive Properties

  • id. The account download history URL.
  • title. The response name.
  • updated. The date and time (in UTC) when the response was generated.
  • total_items. The number of downloads returned in the response.
  • current_item_count. The number of downloads on the current page.
  • min_date. The date and time after which the content items were downloaded. The default is 30 days prior to the time of the request.
  • max_date. The date and time before which the content items were downloaded. The default is the time of the request.
  • downloads. Contains the data and metadata associated with an individual download.

Download Descriptive Properties

  • id. Order number.
  • duplicate. Indicates whether the content item is a duplicate.
  • downloaded_by. The user's first and last names.
  • download_date. The date and time of the content item download in Coordinated Universal Time (UTC).
  • charge. The charge for the content item.
  • currency. The currency of the charge.
  • item. Contains the data and metadata associated with an individual downloaded item.
    • id. The content item ID (the unique ID used by the API).
    • type. Indicates the content item media type.
    • friendlykey. The human-readable ID.
    • title. The content item title.
    • source. The content item source name.

Sample Response

{
    "api_version": "1.0",
    "api_mode": "live", 
    "id": "ByQJVa5j-",
    "method": "/account/downloads.GET",
    "org_name": "My Organization",
    "params": {
        "min_date": "2017-08-20", 
        "max_date": "2017-09-27"
    },
    "data": {
        "id": "https://api.ap.org/media/v/account/downloads",
        "title": "Download History",
        "updated": "2017-09-28T16:19:29.616Z",
        "total_items": 17,
        "current_item_count": 17,
        "min_date": "2017-08-20",
        "max_date": "2017-09-27",
        "downloads": [
            {
                "id": 32800283,
                "downloaded_by": "First Last",
                "download_date": "2017-08-24T22:01:54Z",
                "duplicate": false,
                "charge": 10.00,
                "currency": "USD",
                "item": {
                    "id": "https://api.ap.org/media/v/content/a342d7bd56394600b7594d5f395eb387",
                    "type": "Picture",
                    "friendlykey": "17003157050469",
                    "title": "28th Annual Palm Springs International Film Festival - Arrivals",
                    "source": "Invision"
                },

            },
            {
                "id": 36212377,
                "org_name": "My Organization",
                "downloaded_by": "First Last",
                "download_date": "2017-09-15T22:01:54Z",
                "duplicate": true,
                "charge": 0.00,
                "currency": "USD",
                "item": {
                    "id": "https://api.ap.org/media/v/content/a342d7bd56394600b7594d5f395eb387",
                    "type": "Picture",
                    "friendlykey": "17003157050469",
                    "title": "28th Annual Palm Springs International Film Festival - Arrivals",
                    "sources": "Invision"
                },
            }
        ]
    }
}

API Versions

Returns API versions and access modes (for example, live, preview and/or sandbox) for your account.

Request

  • Method: GET
  • Request URI:

https://api.ap.org/media/v/versions?apikey={apikey}

Request Header (Optional)

  • Accept-Encoding. Compresses the response to the gzip format. The valid value is gzip.

Response

The API Versions method returns the standard HTTP status code of "200 - OK" and the API versions and modes for the specified API key in the JSON format.

For information about error codes, see API Codes.

Top-Level Properties

  • api_version. The API version.
  • id. The response ID.
  • method. The API method name and HTTP method.
  • params. Parameters used in the API request.
  • data. Contains the data and metadata associated with the response.

Response Descriptive Properties

  • id. The API versions URL.
  • title. The response name.
  • account. The account name.
  • updated. The date and time (in W3C XML Schema's xs:dateTime format) when the response was generated.
  • versions. Contains the information about the API versions available for your account. For each version, the following properties are returned:
    • version. The API version number.
    • modes. The API mode(s) available for this API version; for example, live, preview and/or sandbox.
    • description. The API version description.
    • published. The date when the API version was released.
    • documentation. The link to the API documentation for this version.
    • explore. The link to the API Explorer for this version.
    • search_links. Search URLs for each available mode of this version.
    • quota_links. Links to quotas for each available mode of this version.
    • default. Indicates that this API version is set as default for your account (the live mode of this version is returned when no specific version is specified in the request).

Sample Response

{
  "api_version": "gateway-1.0",
  "id": "0710180912a425Z18a83",
  "method": "versions.get",
  "params": {},
  "data": {
    "id": "/versions",
    "title": "AP Media API Versions",
    "account": "ExampleAccount",
    "updated": "2018-07-10T18:09:12.436Z",
    "versions": [
      {
        "version": "v3.1",
        "modes": [
          "live"
        ],
        "description": "The first of the new-generation Media API releases",
        "published": "2017-12-09",
        "documentation": "https://api.ap.org/media/v3.1/docs",
        "explore": "https://api.ap.org/media/v3.1/swagger/",
        "search_links": {
          "live": "https://api.ap.org/media/v3.1-live/content/search/"
        },
        "quota_links": {
          "live": "https://api.ap.org/media/v3.1-live/account/quotas/"
        }
      },
      {
        "version": "v4.1",
        "modes": [
          "live",
          "sandbox",
          "preview"
        ],
        "description": "Media API GoLive",
        "published": "2018-07-05",
        "documentation": "https://api.ap.org/media/v4.1/docs",
        "explore": "https://api.ap.org/media/v4.1/swagger/",
         "search_links": {
          "live": "https://api.ap.org/media/v4.1-live/content/search/",
          "sandbox": "https://api.ap.org/media/v4.1-sandbox/content/search/",
          "preview": "https://api.ap.org/media/v4.1-preview/content/search/"
        },
        "quota_links": {
          "live": "https://api.ap.org/media/v4.1-live/account/quotas/",
          "sandbox": "https://api.ap.org/media/v4.1-sandbox/account/quotas/",
          "preview": "https://api.ap.org/media/v4.1-preview/account/quotas/"
        },
        "default": true
      }
    ]
  }
}