Share this page

# PUT: Update multiple instances

To update more than one instance, PUT data for more than one instance.

Example: PUT request for defects

- Request: Data array of entity objects to update by ID.

- Response: Data array of entity objects for which the update was successful

    *** Request ***

    PUT .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/defects/
    {
                    "data": [{
                                    "id": "1003",
                                    "description": "This is the description for defect 3",
                                    "name": "This is defect 3",
                                    "severity": {
                                                    "type": "list_node",
                                                    "id": " 1073"
                                    }
                    },
                    {
                                    "id": "1004",
                                    "description": "This is the description for defect 4",
                                    "name": "This is defect 4",
                                    "severity": {
                                                    "type": "list_node",
                                                    "id": " 1074"
                                    }
                    }]
    }

    *** Response ***

    {
                    "total_count": 2,
                    "data": [{
                                    "type": "defect",
       l>",
                                    "id": "1003"

                    },
                    {
                                    "type": "defect",
                                    "id": "1004"
                    }]
    }

Back to top

Example: PUT request, partial success

This PUT request example is for defects. It demonstrates trying to update defect ID 1004 by referencing a non-existing release whose ID is 1040.

- Request: Data array of entity objects to update by ID.

- Response: Data array of entity objects for which the update was successful, and an error array of error objects for entities for which the update was not successful.

    *** Request ***

    PUT .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/defects/
    {
                    "data": [{
                                    "id": "1003",
                                    "release": {
                                                    "type": "release",
                                                    "id": " 1002"
                                    },
                                    "description": "This is defect 3",
                                    "name": "defect3"
                    },
                    {
                                    "id": "1004",
                                    "release": {
                                                    "type": "release",
                                                    "id": "1040"
                                    },
                                    "description": "This is defect 4",
                                    "name": "defect4"
                    }]
    }

    *** Response ***

    HTTP/1.1 409 Conflict
    {
                    "total_count": 1,
                    "data": [{
                                    "type": "defect",

                                    "id": "1003",
                    }],
                    "errors": [{
                                    "index": 1,
                                    "error_code": "platform.entity_not_found",
                                    "description": "The entity by id 1040 of type release does not exist",
                                    "properties": {
                                                    "entity_type": "release",
                                                    "entity_id": "1040"
                                    }
                    }]
    }

Back to top

See also:

- Resources
- Collections
- Instances (Entities)
- PUT: Update an instance

https://admhelp.microfocus.com ALM Octane 8942
Tips to improve your search results... ALM Octane Help Center ALM Octane Help 23.4-24.3 All View Local Help Center View Online Help Center Version: