{"_id":"5ad5eb17af566800032a830f","project":"5773dcfc255e820e00e1cd4d","version":{"_id":"5773dcfc255e820e00e1cd50","__v":27,"project":"5773dcfc255e820e00e1cd4d","createdAt":"2016-06-29T14:36:44.812Z","releaseDate":"2016-06-29T14:36:44.812Z","categories":["5773dcfc255e820e00e1cd51","5773df36904b0c0e00ef05ff","577baf92451b1e0e006075ac","577bb183b7ee4a0e007c4e8d","577ce77a1cf3cb0e0048e5ea","577d11865fd4de0e00cc3dab","578e62792c3c790e00937597","578f4fd98335ca0e006d5c84","578f5e5c3d04570e00976ebb","57bc35f7531e000e0075d118","57f801b3760f3a1700219ebb","5804d55d1642890f00803623","581c8d55c0dc651900aa9350","589dcf8ba8c63b3b00c3704f","594cebadd8a2f7001b0b53b2","59a562f46a5d8c00238e309a","5a2aa096e25025003c582b58","5a2e79566c771d003ca0acd4","5a3a5166142db90026f24007","5a3a52b5bcc254001c4bf152","5a3a574a2be213002675c6d2","5a3a66bb2be213002675cb73","5a3a6e4854faf60030b63159","5c8a68278e883901341de571","5cb9971e57bf020024523c7b","5cbf1683e2a36d01d5012ecd","5dc15666a4f788004c5fd7d7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"5ad5eab10a46a3000376af1f","project":"5773dcfc255e820e00e1cd4d","version":"5773dcfc255e820e00e1cd50","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-04-17T12:38:09.296Z","from_sync":false,"order":15,"slug":"bulk-api-actions","title":"BULK API ACTIONS"},"user":"566590c83889610d0008a253","githubsync":"","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-04-17T12:39:51.337Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Bulk actions allow you to perform actions on multiple items with a single call. The following API calls have been added:\n\n  * [Start a bulk import job](doc:start-a-bulk-import-job)\n  * [Get details of a bulk import job](doc:get-details-of-a-bulk-import-job)\n  * [Start a bulk export job](doc:start-a-bulk-export-job)\n  * [Get details of a bulk export job](doc:get-details-of-a-bulk-export-job)\n  * [Bulk deletion of files](doc:bulk-deletion-of-files)\n  * [Get details of multiple files](doc:get-details-of-multiple-files)\n  * [Update details of multiple files](doc:update-details-of-multiple-files)\n  * [Edit details of multiple files](doc:edit-details-of-multiple-files)\n  * [Get details of multiple tasks](doc:get-statistics-of-multiple-tasks) \n\n### Bulk actions performance optimization\n\nTo optimize the performance of returned information from bulk API calls that are used to get multiple objects at the same time, the best practice is to explicitly specify the fields that you want to see in the returned response. For example, the call that is used to [get details of multiple tasks](doc:get-statistics-of-multiple-tasks) will return all information for all available tasks, unless the information is filtered using query parameters, such as:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST https://cavatica-api.sbgenomics.com/v2/bulk/tasks/get?fields=resource.id,resource.status\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\nWhen executed, this call will return only the `id` and `status` fields for each `resource` object that represents a single task:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"items\\\": [\\n    {\\n      \\\"resource\\\": {\\n        \\\"id\\\": \\\"0cab3401-576f-4339-9d63-08d673b380a3\\\",\\n        \\\"status\\\": \\\"DRAFT\\\"\\n      }\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis way of excluding unnecessary information contributes to speed optimization, especially when there is a huge number of items in the response, and makes further management of returned information significantly easier. Please pay attention to the format of the **fields** parameter, which includes the **resource** keyword, as it differs slightly from the generic API calls as specified in [general API information](doc:the-api#section-general-api-information).","excerpt":"","slug":"bulk-features-overview","type":"basic","title":"Bulk features overview"}

Bulk features overview


Bulk actions allow you to perform actions on multiple items with a single call. The following API calls have been added: * [Start a bulk import job](doc:start-a-bulk-import-job) * [Get details of a bulk import job](doc:get-details-of-a-bulk-import-job) * [Start a bulk export job](doc:start-a-bulk-export-job) * [Get details of a bulk export job](doc:get-details-of-a-bulk-export-job) * [Bulk deletion of files](doc:bulk-deletion-of-files) * [Get details of multiple files](doc:get-details-of-multiple-files) * [Update details of multiple files](doc:update-details-of-multiple-files) * [Edit details of multiple files](doc:edit-details-of-multiple-files) * [Get details of multiple tasks](doc:get-statistics-of-multiple-tasks) ### Bulk actions performance optimization To optimize the performance of returned information from bulk API calls that are used to get multiple objects at the same time, the best practice is to explicitly specify the fields that you want to see in the returned response. For example, the call that is used to [get details of multiple tasks](doc:get-statistics-of-multiple-tasks) will return all information for all available tasks, unless the information is filtered using query parameters, such as: [block:code] { "codes": [ { "code": "POST https://cavatica-api.sbgenomics.com/v2/bulk/tasks/get?fields=resource.id,resource.status", "language": "http" } ] } [/block] When executed, this call will return only the `id` and `status` fields for each `resource` object that represents a single task: [block:code] { "codes": [ { "code": "{\n \"items\": [\n {\n \"resource\": {\n \"id\": \"0cab3401-576f-4339-9d63-08d673b380a3\",\n \"status\": \"DRAFT\"\n }\n }\n ]\n}", "language": "json" } ] } [/block] This way of excluding unnecessary information contributes to speed optimization, especially when there is a huge number of items in the response, and makes further management of returned information significantly easier. Please pay attention to the format of the **fields** parameter, which includes the **resource** keyword, as it differs slightly from the generic API calls as specified in [general API information](doc:the-api#section-general-api-information).