Account Information

 

ON THIS PAGE      Show

 

 

 

 

Description

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

Required Request Header

  • x-api-key. Specifies the API key to authorize the request. The x-apikey header is also currently supported.

Optional Request Header

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

Request URI

  • Method: GET
  • Request URI (must be URL-encoded):

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

Base URI Parameter

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

Request URI Example

https://api.ap.org/media/v/account

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."
  • api_build. The API build number.
  • 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": "2.0",
    "api_mode": "live",
    "api_build": "2.0.2",
    "id": "z5KyMgQ32",
    "method": "/account.GET",
    "org_name": "My Organization",
    "params": {},
    "data": {
        "id": "https://api.ap.org/media/v/account",
        "title": "My Account",
        "updated": "2020-07-02T16: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."
            }
        ]
    }
}