API ReferenceAnnouncementsCommunity Discussion
API ReferenceCommunity DiscussionAnnouncementsSubscribeLog In
API Reference

Traversing the Tree

It would not be feasible to document the entire resources tree.

However, you can explore the resources tree yourself. We illustrate the technique below. You can apply the same methodology to crawl any part of the dictionary tree.

📘

Common examples (endpoints) are provided in subsequent topics.

1. Fetch a list of top-level dictionaries:

GET /backstage/api/1.0/resources/
{
   "results": [
      {
         "name": "countries",
         "value": "Lists all supported countries"
      },
      {
         "name": "platforms",
         "value": "Lists all supported platforms"
      },
      {
         "name": "languages",
         "value": "Lists all supported languages"
      },
      {
         "name": "campaigns_properties",
         "value": "Lists resources related to campaigns"
      }
      // Additional rows (objects) omitted...
   ]
   // Additional detail omitted...
}

2. Fetch a list of campaign-related enums:

GET /backstage/api/1.0/resources/campaigns_properties
{
   "results": [
      {
         "name": "approval-state",
         "value": "Approval State"
      },
      // Additional rows (objects) omitted...
      {
         "name": "items_properties",
         "value": "Resources for an inventory item of a campaign"
      },
      {
         "name": "external-brand-safety",
         "value": "Options provided by 3rd Party Brand Safety"
      }
   ]
   // Additional detail omitted...
}

📘

Append the campaigns_properties key (obtained in the previous response) to the request.

3. Fetch a list of item-related enums:

GET /backstage/api/1.0/resources/campaigns_properties/items_properties
{
   "results": [
      {
         "name": "approval-status",
         "value": "Approval Status"
      },
      {
         "name": "status",
         "value": "Status"
      },
      {
         "name": "type",
         "value": "Type"
      }
   ]
   // Additional detail omitted...
}

📘

Append the items_properties key (obtained in the previous response) to the request.

4. Fetch a list of possible values for item status:

GET /backstage/api/1.0/resources/campaigns_properties/items_properties/status
{
   "results": [
      {
         "name": "RUNNING",
         "value": "Running"
      },
      {
         "name": "CRAWLING",
         "value": "Crawling"
      },
      {
         "name": "CRAWLING_ERROR",
         "value": "Crawling Error"
      },
      {
         "name": "NEED_TO_EDIT",
         "value": "Need To Edit"
      },
      {
         "name": "PAUSED",
         "value": "Paused"
      },
      {
         "name": "STOPPED",
         "value": "Stopped"
      },
      {
         "name": "PENDING_APPROVAL",
         "value": "Pending Approval"
      },
      {
         "name": "REJECTED",
         "value": "Rejected"
      }
   ]
   // Additional detail omitted...
}

📘

Append the status key (obtained in the previous response) to the request.

🚧

Traversing Too Far Down The Tree

The status enum represent a leaf node in the tree - it's values have no children. If you attempt to traverse the tree any further - e.g. GET /resources/campaigns_properties/items_properties/status/RUNNING - the server will return a 404 Not Found HTML page.