REST API output

When the map run completes, REST API output is text, only if a single card (and no other items) is returned. If two or more cards or any of the other optional items are added to a single (or multiple) card call, the output is a JSON data structure, with the actual card output being encoded with BASE64. Response is similar to the following example:

{
  "type": {
    "type": "multipart",
    "subtype": "related",
    "parameters": {},
    "wildcardType": false,
    "wildcardSubtype": false
  },
  "allAttachments": [
    {
      "headers": {
        "Content-ID": [
          "1"
        ],
        "Content-Type": [
          "application/octet-stream"
        ]
      },
      "object": null,
      "contentDisposition": null,
      "contentId": "1",
      "contentType": {
        "type": "application",
        "subtype": "octet-stream",
        "parameters": {},
        "wildcardType": false,
        "wildcardSubtype": false
      },
      "dataHandler": null
    },
    {
      "headers": {
        "Content-ID": [
          "2"
        ],
        "Content-Type": [
          "application/octet-stream"
        ]
      },
      "object": null,
      "contentDisposition": null,
      "contentId": "2",
      "contentType": {
        "type": "application",
        "subtype": "octet-stream",
        "parameters": {},
        "wildcardType": false,
        "wildcardSubtype": false
      },
      "dataHandler": null
    }
  ],
  "childAttachments": [
    {
      "headers": {
        "Content-ID": [
          "2"
        ],
        "Content-Type": [
          "application/octet-stream"
        ]
      },
      "object": null,
      "contentDisposition": null,
      "contentId": "2",
      "contentType": {
        "type": "application",
        "subtype": "octet-stream",
        "parameters": {},
        "wildcardType": false,
        "wildcardSubtype": false
      },
      "dataHandler": null
    }
  ],
  "rootAttachment": {
    "headers": {
      "Content-ID": [
        "1"
      ],
      "Content-Type": [
        "application/octet-stream"
      ]
    },
    "object": null,
    "contentDisposition": null,
    "contentId": "1",
    "contentType": {
      "type": "application",
      "subtype": "octet-stream",
      "parameters": {},
      "wildcardType": false,
      "wildcardSubtype": false
    },
    "dataHandler": null
  }
}