View Macro

View Macro

GET https://api.ocamba.com/v2/adex/macros/{id}
Get an instance of macros

Tip
Searchable fields are name and description. Sortable fields are name, create_time and update_time.
Info
The response example is representing a full view.

Path parameters

parameters

Query parameters

parameters

Response schemas

curl -X GET \
 "https://api.ocamba.com/v2/adex/macros/{id}" \
  -H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v2/adex/macros/{id}';
const options = {
  method: 'GET',
  headers: {
    Authorization: `Bearer {TOKEN}`
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v2/adex/macros/{id}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

200 OK

{
  "total": 1,
  "items": [
    {
      "id": "1130251",
      "company_id": "6197120",
      "name": "SOME_MACROS",,
      "type": "dynamic", 
      "description": "description",
      "value": "10",
      "fields": [
          "ssp_account_id",
          "campaign_id",
          "ab_test_id"
      ],
      "records": [
          {
              "fields": {
                  "ssp_account_id": "5436620746",
                  "ab_test_id": "1130594",
                  "campaign_id": "24809540"
              },
              "value": "5"
          }
      ],
      "size": 1,
      "create_time": "2023-10-18 07:40:33",
      "update_time": "2023-10-18 07:40:56"
    }
  ]
}

Responses