Add Macro Records

Add Macro Records

POST https://api.ocamba.com/v1/hood/macros/{id}/records

Adds record objects to an existing Macro.

Rate limits:

Burst: 10/s
Steady: 150/m

Path parameters

parameters

Request schema

body
POST https://api.ocamba.com/v1/hood/macros/{id}/records HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
  "records": [
    {}
  ]
}
curl -X POST "https://api.ocamba.com/v1/hood/macros/{id}/records" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"records":[{}]}'
fetch("https://api.ocamba.com/v1/hood/macros/{id}/records", {
  method: "POST",
  headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify(
    {
      "records": [
        {}
      ]
    }
  )
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v1/hood/macros/{id}/records");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer $token",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "records" => [
      []
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

200 OK

HTTP/1.1 200 OK
Content-Type: application/json
Responses

Tip
1
If a record with the same fields (same keys and corresponding values) already exists, only the value field inside that record will be updated.
2
If you don’t know the macro id, list the macros to find it.