{"__v":29,"_id":"54b41c77fed7861600c31e5f","category":{"__v":1,"_id":"54b41bcf4f25cb1600518d2c","pages":["54b41c77fed7861600c31e5f"],"project":"54343170fa5527080064f449","version":"54343531bfaa3d0800c4d4af","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-12T19:09:03.863Z","from_sync":false,"order":13,"slug":"batch","title":"Batch"},"parentDoc":null,"project":"54343170fa5527080064f449","user":"543532513513400800a144f4","version":{"__v":27,"_id":"54343531bfaa3d0800c4d4af","forked_from":"54343170fa5527080064f44c","project":"54343170fa5527080064f449","createdAt":"2014-10-07T18:47:13.086Z","releaseDate":"2014-10-07T18:47:13.086Z","categories":["54343531bfaa3d0800c4d4b0","543435b1edce040800409240","543435b9edce040800409241","543435bcedce040800409243","543435bfedce040800409244","543435c2edce040800409245","54370cc426469424002a6dfa","54370cf026469424002a6dfd","5437129d26469424002a6e2f","543712d226469424002a6e30","5480c8fd74904f1a00053c86","54aafc6eefb39016009e4d71","54ac1d36de18cc1400226e01","54ad59369219922100751732","54b41bcf4f25cb1600518d2c","54b533a3a806f40c0050d53c","54b54bbf96fe3c0b00d38d2a","54b688a27379a90c00f53a8a","54b699efbc1a46160005edfa","54b8191691011f0b00068804","54bfb002d03bfc0d0000e814","54bfb33ed03bfc0d0000e816","55a3e94e912a6e2300882cdb","55a56c370f354f0d00fd02a8","55e85ad034516037002e9325","5638ecb62fc5520d001a4cf9","572cba2fc310640e008f63d5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"updates":["54c7c54dab706219009e05a9","54e4d29618155617007884e0"],"next":{"pages":[],"description":""},"createdAt":"2015-01-12T19:11:51.996Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Batch requests are a way to send multiple logical requests to the MediaSilo API in a single request. This is useful when you need to deal with multiple​ resources that are not dependent upon one another. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"An Example to Help Clarify How Batch Requests Can Help\",\n  \"body\": \"Let's say that you'd like to retrieve a QuickLink asset, as well any comments made in reference to the asset. One way to do this would be to issue two requests to the MediaSilo API: one retrieving the asset, and the other retrieving its comments. Alternatively, you could use the Batch API. The Batch API would allow you to send both requests in a single HTTP request. By doing this, you'd be able to increase concurrent loading in your browser by offloading some to us. Also, because we can turn around the individual requests faster than you could externally, you get an overall shorter duration for the request.\"\n}\n[/block]\nEach batch request is made up of one or more logical requests. A logical request defines the HTTP method, the resource path, and optionally, a payload.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"name\",\n    \"h-1\": \"description\",\n    \"0-0\": \"method\",\n    \"0-1\": \"The HTTP method: GET, POST, PUT, DELETE\",\n    \"1-0\": \"payload\",\n    \"1-1\": \"An optional payload to be sent with the logical HTTP request. NOTE: The payload is a JSON object. It is NOT an escaped JSON string.\",\n    \"2-0\": \"resourcePath\",\n    \"2-1\": \"The relative API path of the resource. This excludes the API version. If you have a resource at http://api.mediasilo.com/v3/me then the rousource path would be \\\"*me*\\\"\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Making Batch Requests\"\n}\n[/block]\nThe following example gets an asset, gets the comments for that asset, and makes a comment on an asset.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Requests Are Run in Parallel\",\n  \"body\": \"The requests in a batch request cannot have dependencies, because each request is run in parallel on our servers. If you have a request that is dependent on the completion of a prior request, you will not be able to send a batch request.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Example Request Body\\nPOST /v3/batch/\\n\\n[\\n    {\\n        \\\"method\\\": \\\"GET\\\",\\n        \\\"resourcePath\\\": \\\"assets/1882b38c84624cac139832cb3\\\"\\n    },\\n    {\\n        \\\"method\\\": \\\"GET\\\",\\n        \\\"resourcePath\\\": \\\"quicklinks/54b3f7b05c0612b/assets/1882b38c84624cac139832cb3/comments\\\"\\n    },\\n    {\\n        \\\"method\\\": \\\"POST\\\",\\n        \\\"resourcePath\\\": \\\"quicklinks/54b3f7b05c0612b/assets/1882b38c84624cac139832cb3/comments\\\",\\n        \\\"payload\\\": {\\n            \\\"body\\\": \\\"I am a robot...\\\"\\n        }\\n    }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Batch Payloads Are JSON Objects\",\n  \"body\": \"Take note not to send the optional payload as an escaped JSON string. The payload is a JSON object. When in doubt, [lint](http://jsonlint.org) your JSON. If it is invalid, you can expect the MediaSilo API to return a 400 response.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Getting Batch Responses\"\n}\n[/block]\nJust as batch requests are logical requests, so are the responses. The batch response body includes a response object for each request that was submitted in the order it was submitted. The response will include the headers, too.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"resourcePath\",\n    \"0-1\": \"The original resource path from the batch request\",\n    \"1-0\": \"httpStatus\",\n    \"1-1\": \"The HTTP status code returned from the request\",\n    \"2-0\": \"headers\",\n    \"2-1\": \"A map of the HTTP headers returned with the request\",\n    \"3-0\": \"responseObject\",\n    \"3-1\": \"The response body of the request\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nThe following is the response that would have returned for the above request example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n    {\\n        \\\"resourcePath\\\": \\\"assets/1882b38c84624cac139832cb3\\\",\\n        \\\"httpStatus\\\": \\\"200\\\",\\n        \\\"headers\\\": [\\n            {\\n                \\\"Client-IP-Address\\\": \\\"50.169.222.45\\\"\\n            },\\n            {\\n                \\\"Access-Control-Allow-Origin\\\": \\\"*\\\"\\n            },\\n            {\\n                \\\"Content-Length\\\": \\\"2628\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Remaining\\\": \\\"9983\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Limit\\\": \\\"10000\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Reset\\\": \\\"1421097587\\\"\\n            },\\n            {\\n                \\\"Connection\\\": \\\"keep-alive\\\"\\n            },\\n            {\\n                \\\"Content-Type\\\": \\\"application/json\\\"\\n            },\\n            {\\n                \\\"Server\\\": \\\"Jetty(9.1.z-SNAPSHOT)\\\"\\n            }\\n        ],\\n        \\\"responseObject\\\": {\\n            \\\"id\\\": \\\"1882b38c84624cac139832cb3\\\",\\n            \\\"title\\\": \\\"io9.mov\\\",\\n            \\\"description\\\": \\\"\\\",\\n            \\\"fileName\\\": \\\"io9.mov\\\",\\n            \\\"projectId\\\": \\\"2D142197-91DB-58EF-8041F5FD5B3E89F0\\\",\\n            \\\"folderId\\\": null,\\n            \\\"uploadedBy\\\": \\\"simon\\\",\\n            \\\"approvalStatus\\\": \\\"none\\\",\\n            \\\"archiveStatus\\\": \\\"n/a\\\",\\n            \\\"transcriptStatus\\\": \\\"N/A\\\",\\n            \\\"type\\\": \\\"video\\\",\\n            \\\"dateCreated\\\": 1420826546000,\\n            \\\"dateModified\\\": 1420826556000,\\n            \\\"progress\\\": 100,\\n            \\\"commentCount\\\": 1,\\n            \\\"myRating\\\": null,\\n            \\\"averageRating\\\": null,\\n            \\\"permissions\\\": [\\n                \\\"asset.create\\\",\\n                \\\"asset.delete\\\",\\n                \\\"asset.source\\\",\\n                \\\"asset.read\\\",\\n                \\\"asset.update\\\",\\n                \\\"collaboration.requestapproval\\\",\\n                \\\"collaboration.rate\\\",\\n                \\\"collaboration.comment\\\",\\n                \\\"reporting.export\\\",\\n                \\\"service.transcript\\\",\\n                \\\"sharing.internal\\\",\\n                \\\"sharing.external\\\"\\n            ],\\n            \\\"duration\\\": 31330,\\n            \\\"posterFrame\\\": \\\"thumbnails.mediasilo.com/XX763582XXXX/1882b38c84624cac139832cb3_large.jpg\\\",\\n            \\\"derivatives\\\": [\\n                {\\n                    \\\"type\\\": \\\"source\\\",\\n                    \\\"url\\\": \\\"/XX7635823XXXX/1882b38c84624cac139832cb3.mov\\\",\\n                    \\\"fileSize\\\": 3232,\\n                    \\\"height\\\": 480,\\n                    \\\"width\\\": 640,\\n                    \\\"duration\\\": 31330\\n                },\\n                {\\n                    \\\"type\\\": \\\"proxy\\\",\\n                    \\\"url\\\": \\\"/XX7635823XXXX/1882b38c84624cac139832cb3.mp4\\\",\\n                    \\\"fileSize\\\": 3232,\\n                    \\\"height\\\": 480,\\n                    \\\"width\\\": 640,\\n                    \\\"duration\\\": 31330,\\n                    \\\"thumbnail\\\": \\\"thumbnails.mediasilo.com/XX7635823XXXX/1882b38c84624cac139832cb3_small.jpg\\\",\\n                    \\\"posterFrame\\\": \\\"thumbnails.mediasilo.com/337635823HFOP/1882b38c84624cac139832cb3_large.jpg\\\",\\n                    \\\"strategies\\\": [\\n                        {\\n                            \\\"type\\\": \\\"rtmp\\\",\\n                            \\\"url\\\": \\\"XX7635823XXXX/1882b38c84624cac139832cb3.mov\\\",\\n                            \\\"streamer\\\": \\\"rtmp://XXX758yXXXXXwg.cloudfront.net/cfx/st\\\"\\n                        },\\n                        {\\n                            \\\"type\\\": \\\"rtmpt\\\",\\n                            \\\"url\\\": \\\"337635823HFOP/1882b38c84624cac139832cb3.mov\\\",\\n                            \\\"streamer\\\": \\\"rtmpt://XXX758yXXXXXwg.cloudfront.net/cfx/st\\\"\\n                        }\\n                    ]\\n                },\\n                {\\n                    \\\"type\\\": \\\"sprites\\\",\\n                    \\\"progress\\\": 100,\\n                    \\\"properties\\\": {\\n                        \\\"width\\\": 89,\\n                        \\\"height\\\": 67,\\n                        \\\"duration\\\": 1,\\n                        \\\"webVTT\\\": \\\"/assets/1882b38c84624cac139832cb3/webvtt\\\"\\n                    }\\n                },\\n                {\\n                    \\\"type\\\": \\\"waveform\\\",\\n                    \\\"progress\\\": 100,\\n                    \\\"properties\\\": {\\n                        \\\"url\\\": \\\"XX7635823XXXX/1882b38c84624cac139832cb3_waveform.png\\\"\\n                    }\\n                }\\n            ],\\n            \\\"tags\\\": [],\\n            \\\"external\\\": false,\\n            \\\"private\\\": false\\n        }\\n    },\\n    {\\n        \\\"resourcePath\\\": \\\"quicklinks/54b3f7b05c0612b/assets/1882b38c84624cac139832cb3/comments\\\",\\n        \\\"httpStatus\\\": \\\"200\\\",\\n        \\\"headers\\\": [\\n            {\\n                \\\"Link\\\": \\\"\\\"\\n            },\\n            {\\n                \\\"total-results\\\": \\\"0\\\"\\n            },\\n            {\\n                \\\"Client-IP-Address\\\": \\\"50.169.222.45\\\"\\n            },\\n            {\\n                \\\"Access-Control-Allow-Origin\\\": \\\"*\\\"\\n            },\\n            {\\n                \\\"Content-Length\\\": \\\"406\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Remaining\\\": \\\"9984\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Limit\\\": \\\"10000\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Reset\\\": \\\"1421097587\\\"\\n            },\\n            {\\n                \\\"Connection\\\": \\\"keep-alive\\\"\\n            },\\n            {\\n                \\\"Content-Type\\\": \\\"application/json\\\"\\n            },\\n            {\\n                \\\"Server\\\": \\\"Jetty(9.1.z-SNAPSHOT)\\\"\\n            }\\n        ],\\n        \\\"responseObject\\\": [\\n            {\\n                \\\"id\\\": \\\"54b40f153004843414091435\\\",\\n                \\\"at\\\": \\\"1882b38c84624cac139832cb3\\\",\\n                \\\"inResponseTo\\\": \\\"1882b38c84624cac139832cb3\\\",\\n                \\\"context\\\": \\\"54b3f7b05c0612b\\\",\\n                \\\"startTimeCode\\\": null,\\n                \\\"endTimeCode\\\": null,\\n                \\\"dateCreated\\\": 1421086485,\\n                \\\"body\\\": \\\"Hi!\\\",\\n                \\\"user\\\": {\\n                    \\\"id\\\": \\\"6EF6C1E9-E130-2427-8641E1A2E3DA4C8D\\\",\\n                    \\\"userName\\\": \\\"simon\\\",\\n                    \\\"firstName\\\": \\\"Simon\\\",\\n                    \\\"lastName\\\": \\\"Smith\\\",\\n                    \\\"email\\\": \\\"simon:::at:::example.com\\\"\\n                },\\n                \\\"responses\\\": []\\n            }\\n        ]\\n    },\\n    {\\n        \\\"resourcePath\\\": \\\"quicklinks/54b3f7b05c0612b/assets/1882b38c84624cac139832cb3/comments\\\",\\n        \\\"httpStatus\\\": \\\"200\\\",\\n        \\\"headers\\\": [\\n            {\\n                \\\"Client-IP-Address\\\": \\\"50.169.222.45\\\"\\n            },\\n            {\\n                \\\"Access-Control-Allow-Origin\\\": \\\"*\\\"\\n            },\\n            {\\n                \\\"Content-Length\\\": \\\"35\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Remaining\\\": \\\"9983\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Limit\\\": \\\"10000\\\"\\n            },\\n            {\\n                \\\"X-RateLimit-Reset\\\": \\\"1421097587\\\"\\n            },\\n            {\\n                \\\"Connection\\\": \\\"keep-alive\\\"\\n            },\\n            {\\n                \\\"Content-Type\\\": \\\"application/json\\\"\\n            },\\n            {\\n                \\\"Server\\\": \\\"Jetty(9.1.z-SNAPSHOT)\\\"\\n            }\\n        ],\\n        \\\"responseObject\\\": [\\n            {\\n                \\\"id\\\": \\\"54b40f153004843414091435\\\"\\n            }\\n        ]\\n    }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Be Sure to Inspect Your Responses\",\n  \"body\": \"Just as you might receive a 400 for malformed JSON, you can also receive the same for individual requests in a batch. One well-formed​ request can succeed while another malformed request can fail in the same batch.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Permissions\"\n}\n[/block]\nThe Batch API inherits its permissions from the underlying resources. If you have permission to make the requests directly, you can also use the Batch API for the same request.","excerpt":"","slug":"batch-overview","type":"basic","title":"Making Batch Requests"}

Making Batch Requests


Batch requests are a way to send multiple logical requests to the MediaSilo API in a single request. This is useful when you need to deal with multiple​ resources that are not dependent upon one another. [block:callout] { "type": "info", "title": "An Example to Help Clarify How Batch Requests Can Help", "body": "Let's say that you'd like to retrieve a QuickLink asset, as well any comments made in reference to the asset. One way to do this would be to issue two requests to the MediaSilo API: one retrieving the asset, and the other retrieving its comments. Alternatively, you could use the Batch API. The Batch API would allow you to send both requests in a single HTTP request. By doing this, you'd be able to increase concurrent loading in your browser by offloading some to us. Also, because we can turn around the individual requests faster than you could externally, you get an overall shorter duration for the request." } [/block] Each batch request is made up of one or more logical requests. A logical request defines the HTTP method, the resource path, and optionally, a payload. [block:parameters] { "data": { "h-0": "name", "h-1": "description", "0-0": "method", "0-1": "The HTTP method: GET, POST, PUT, DELETE", "1-0": "payload", "1-1": "An optional payload to be sent with the logical HTTP request. NOTE: The payload is a JSON object. It is NOT an escaped JSON string.", "2-0": "resourcePath", "2-1": "The relative API path of the resource. This excludes the API version. If you have a resource at http://api.mediasilo.com/v3/me then the rousource path would be \"*me*\"" }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Making Batch Requests" } [/block] The following example gets an asset, gets the comments for that asset, and makes a comment on an asset. [block:callout] { "type": "warning", "title": "Requests Are Run in Parallel", "body": "The requests in a batch request cannot have dependencies, because each request is run in parallel on our servers. If you have a request that is dependent on the completion of a prior request, you will not be able to send a batch request." } [/block] [block:code] { "codes": [ { "code": "// Example Request Body\nPOST /v3/batch/\n\n[\n {\n \"method\": \"GET\",\n \"resourcePath\": \"assets/1882b38c84624cac139832cb3\"\n },\n {\n \"method\": \"GET\",\n \"resourcePath\": \"quicklinks/54b3f7b05c0612b/assets/1882b38c84624cac139832cb3/comments\"\n },\n {\n \"method\": \"POST\",\n \"resourcePath\": \"quicklinks/54b3f7b05c0612b/assets/1882b38c84624cac139832cb3/comments\",\n \"payload\": {\n \"body\": \"I am a robot...\"\n }\n }\n]", "language": "json" } ] } [/block] [block:callout] { "type": "warning", "title": "Batch Payloads Are JSON Objects", "body": "Take note not to send the optional payload as an escaped JSON string. The payload is a JSON object. When in doubt, [lint](http://jsonlint.org) your JSON. If it is invalid, you can expect the MediaSilo API to return a 400 response." } [/block] [block:api-header] { "type": "basic", "title": "Getting Batch Responses" } [/block] Just as batch requests are logical requests, so are the responses. The batch response body includes a response object for each request that was submitted in the order it was submitted. The response will include the headers, too. [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "0-0": "resourcePath", "0-1": "The original resource path from the batch request", "1-0": "httpStatus", "1-1": "The HTTP status code returned from the request", "2-0": "headers", "2-1": "A map of the HTTP headers returned with the request", "3-0": "responseObject", "3-1": "The response body of the request" }, "cols": 2, "rows": 4 } [/block] The following is the response that would have returned for the above request example: [block:code] { "codes": [ { "code": "[\n {\n \"resourcePath\": \"assets/1882b38c84624cac139832cb3\",\n \"httpStatus\": \"200\",\n \"headers\": [\n {\n \"Client-IP-Address\": \"50.169.222.45\"\n },\n {\n \"Access-Control-Allow-Origin\": \"*\"\n },\n {\n \"Content-Length\": \"2628\"\n },\n {\n \"X-RateLimit-Remaining\": \"9983\"\n },\n {\n \"X-RateLimit-Limit\": \"10000\"\n },\n {\n \"X-RateLimit-Reset\": \"1421097587\"\n },\n {\n \"Connection\": \"keep-alive\"\n },\n {\n \"Content-Type\": \"application/json\"\n },\n {\n \"Server\": \"Jetty(9.1.z-SNAPSHOT)\"\n }\n ],\n \"responseObject\": {\n \"id\": \"1882b38c84624cac139832cb3\",\n \"title\": \"io9.mov\",\n \"description\": \"\",\n \"fileName\": \"io9.mov\",\n \"projectId\": \"2D142197-91DB-58EF-8041F5FD5B3E89F0\",\n \"folderId\": null,\n \"uploadedBy\": \"simon\",\n \"approvalStatus\": \"none\",\n \"archiveStatus\": \"n/a\",\n \"transcriptStatus\": \"N/A\",\n \"type\": \"video\",\n \"dateCreated\": 1420826546000,\n \"dateModified\": 1420826556000,\n \"progress\": 100,\n \"commentCount\": 1,\n \"myRating\": null,\n \"averageRating\": null,\n \"permissions\": [\n \"asset.create\",\n \"asset.delete\",\n \"asset.source\",\n \"asset.read\",\n \"asset.update\",\n \"collaboration.requestapproval\",\n \"collaboration.rate\",\n \"collaboration.comment\",\n \"reporting.export\",\n \"service.transcript\",\n \"sharing.internal\",\n \"sharing.external\"\n ],\n \"duration\": 31330,\n \"posterFrame\": \"thumbnails.mediasilo.com/XX763582XXXX/1882b38c84624cac139832cb3_large.jpg\",\n \"derivatives\": [\n {\n \"type\": \"source\",\n \"url\": \"/XX7635823XXXX/1882b38c84624cac139832cb3.mov\",\n \"fileSize\": 3232,\n \"height\": 480,\n \"width\": 640,\n \"duration\": 31330\n },\n {\n \"type\": \"proxy\",\n \"url\": \"/XX7635823XXXX/1882b38c84624cac139832cb3.mp4\",\n \"fileSize\": 3232,\n \"height\": 480,\n \"width\": 640,\n \"duration\": 31330,\n \"thumbnail\": \"thumbnails.mediasilo.com/XX7635823XXXX/1882b38c84624cac139832cb3_small.jpg\",\n \"posterFrame\": \"thumbnails.mediasilo.com/337635823HFOP/1882b38c84624cac139832cb3_large.jpg\",\n \"strategies\": [\n {\n \"type\": \"rtmp\",\n \"url\": \"XX7635823XXXX/1882b38c84624cac139832cb3.mov\",\n \"streamer\": \"rtmp://XXX758yXXXXXwg.cloudfront.net/cfx/st\"\n },\n {\n \"type\": \"rtmpt\",\n \"url\": \"337635823HFOP/1882b38c84624cac139832cb3.mov\",\n \"streamer\": \"rtmpt://XXX758yXXXXXwg.cloudfront.net/cfx/st\"\n }\n ]\n },\n {\n \"type\": \"sprites\",\n \"progress\": 100,\n \"properties\": {\n \"width\": 89,\n \"height\": 67,\n \"duration\": 1,\n \"webVTT\": \"/assets/1882b38c84624cac139832cb3/webvtt\"\n }\n },\n {\n \"type\": \"waveform\",\n \"progress\": 100,\n \"properties\": {\n \"url\": \"XX7635823XXXX/1882b38c84624cac139832cb3_waveform.png\"\n }\n }\n ],\n \"tags\": [],\n \"external\": false,\n \"private\": false\n }\n },\n {\n \"resourcePath\": \"quicklinks/54b3f7b05c0612b/assets/1882b38c84624cac139832cb3/comments\",\n \"httpStatus\": \"200\",\n \"headers\": [\n {\n \"Link\": \"\"\n },\n {\n \"total-results\": \"0\"\n },\n {\n \"Client-IP-Address\": \"50.169.222.45\"\n },\n {\n \"Access-Control-Allow-Origin\": \"*\"\n },\n {\n \"Content-Length\": \"406\"\n },\n {\n \"X-RateLimit-Remaining\": \"9984\"\n },\n {\n \"X-RateLimit-Limit\": \"10000\"\n },\n {\n \"X-RateLimit-Reset\": \"1421097587\"\n },\n {\n \"Connection\": \"keep-alive\"\n },\n {\n \"Content-Type\": \"application/json\"\n },\n {\n \"Server\": \"Jetty(9.1.z-SNAPSHOT)\"\n }\n ],\n \"responseObject\": [\n {\n \"id\": \"54b40f153004843414091435\",\n \"at\": \"1882b38c84624cac139832cb3\",\n \"inResponseTo\": \"1882b38c84624cac139832cb3\",\n \"context\": \"54b3f7b05c0612b\",\n \"startTimeCode\": null,\n \"endTimeCode\": null,\n \"dateCreated\": 1421086485,\n \"body\": \"Hi!\",\n \"user\": {\n \"id\": \"6EF6C1E9-E130-2427-8641E1A2E3DA4C8D\",\n \"userName\": \"simon\",\n \"firstName\": \"Simon\",\n \"lastName\": \"Smith\",\n \"email\": \"simon@example.com\"\n },\n \"responses\": []\n }\n ]\n },\n {\n \"resourcePath\": \"quicklinks/54b3f7b05c0612b/assets/1882b38c84624cac139832cb3/comments\",\n \"httpStatus\": \"200\",\n \"headers\": [\n {\n \"Client-IP-Address\": \"50.169.222.45\"\n },\n {\n \"Access-Control-Allow-Origin\": \"*\"\n },\n {\n \"Content-Length\": \"35\"\n },\n {\n \"X-RateLimit-Remaining\": \"9983\"\n },\n {\n \"X-RateLimit-Limit\": \"10000\"\n },\n {\n \"X-RateLimit-Reset\": \"1421097587\"\n },\n {\n \"Connection\": \"keep-alive\"\n },\n {\n \"Content-Type\": \"application/json\"\n },\n {\n \"Server\": \"Jetty(9.1.z-SNAPSHOT)\"\n }\n ],\n \"responseObject\": [\n {\n \"id\": \"54b40f153004843414091435\"\n }\n ]\n }\n]", "language": "json" } ] } [/block] [block:callout] { "type": "danger", "title": "Be Sure to Inspect Your Responses", "body": "Just as you might receive a 400 for malformed JSON, you can also receive the same for individual requests in a batch. One well-formed​ request can succeed while another malformed request can fail in the same batch." } [/block] [block:api-header] { "type": "basic", "title": "Permissions" } [/block] The Batch API inherits its permissions from the underlying resources. If you have permission to make the requests directly, you can also use the Batch API for the same request.