REST API tape assign

How to use the REST API to start tape assign tasks.

Request URLs
/ibmsa/v2/tapes/assign
/ibmsa/v2/tape/assign
Method
POST
Request data
tapes: <string>

Specifies the tape ID (VOLSER) to assign, or multiple tape IDs that are separated by a space.

pool: <string>

Specifies the name of the tape pool to which the specified tapes are assigned.

library: <string>

Specifies the name of the tape library where the tapes are managed. In a single tape library configuration, this option can be omitted.

force-format: <boolean>

Forces a tape format even if the tape contains file objects.

Response data
status: <string>
If the task got created successfully, it will return accepted.
task_id: <number>
The ID of the task created, monitor its progress using REST API task information.
Example
tape assign
POST /v2/tapes/assign -d '{"tapes":"VTAP39L5", "pool":"test1_1"}' -b cookies.txt -H 'Content-Type:application/json'