Import inventory from Zip file
POST/nevisadmin/api/v1/inventories/file-import
Required permission: CREATE_INVENTORY on the tenant, or global scope (If no inventory with the same key exists)
Required permission: MODIFY_INVENTORY on the inventory, or higher scope (If an inventory with the same key already exists.)
Required permission: SUPER_ADMIN (If an inventory with the same key already exists and inventory modifications are restricted.)
Creates a new inventory or overwrites an existing one, with the inventory data imported on a .zip file.
- If the inventory set in the URL already exists, that inventory will be overwritten with the content of the file sent.
- If the inventory set in the URL does not exist, a new inventory will be created with the content of the file sent.
- If the tenant key set for the inventory does not exist, an error will be sent, code "400 Bad request", with the details of the error.
If the call was successful the response code will be '202 Accepted' and the 'Location' header will point to the job that will execute the import. Getting that job will allow you to know the progress and status of the import.
Request
Responses
- 202
- 400
- 403
- 404
Import started
Invalid inventory key or missing file
Insufficient permissions.
Tenant not found