Api structure requires an array but I would like to provide only single element

Viewed 23

Hi this is my first question here, so please forgive if not explained well.

Below I've placed the JSON structure which is already designed to make a correct API call. I'm trying to POST the data using this structure but I'm getting below message when trying to put single element in report_ids array. In general I have only one report id.

Failed to parse json object from response: b''

payload = json.dumps({
  "data": {
    "report_ids": [
      1,
      2,
      3,
      4
    ],
    "playbook_id": 3
  }
})

Does anyone know how can I make proper call without an error. Thank you in advance!

0 Answers
Related