Working with inventory

This section describes how to use the Platform API to manage inventoryAd space available on a website or app. The basic unit of inventory for OpenX is an ad unit. objects.

To retrieve the lists of inventory objects to which the current user has access:

  1. List all sites:

    curl http://openx_server_name/ox/4.0/site --cookie "openx3_access_token=token_string"
  2. List all siteAn OpenX component that represents top-level domains or subdomains and is used to organize ad units. Sites enable you to target and report on inventory performance. sections:

    curl http://openx_server_name/ox/4.0/sitesection --cookie "openx3_access_token=token_string"
  3. List all ad units:

    curl http://openx_server_name/ox/4.0/adunit --cookie "openx3_access_token=token_string"
  4. List all packages:

    curl http://openx_server_name/ox/4.0/package --cookie "openx3_access_token=token_string"
  5. List all audience segments:

    curl http://openx_server_name/ox/4.0/audiencesegment --cookie "openx3_access_token=token_string"

To retrieve information about specific inventory objects, use the UIDs from the list responses for the following calls:

  1. Read the site with the specified UID:

    curl http://openx_server_name/ox/4.0/site/2000002b-e000-fff1-8123-0c9a66 --cookie "openx3_access_token=token_string"
  2. Read the site sectionA way of classifying inventory, for example into vertical segments of content. with the specified ID:

    curl http://openx_server_name/ox/4.0/sitesection/536870925 --cookie "openx3_access_token=token_string"
  3. Read the ad unitThe smallest inventory component that represents the space on a site where ads display. with the specified ID:

    curl http://openx_server_name/ox/4.0/adunit/536871402 --cookie "openx3_access_token=token_string"
  4. Read the package with the specified ID:

    curl http://openx_server_name/ox/4.0/package/536870936 --cookie "openx3_access_token=token_string"
  5. Read the audience segmentA group of users with similar traits or characteristics. with the specified ID:

    curl http://openx_server_name/ox/4.0/audiencesegment/536871535 --cookie "openx3_access_token=token_string"

See also

Inventory in the OpenX help.