Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: com.atlassian.confluence.api.service.exceptions.ConflictException: Object of class [com.atlassian.confluence.pages.Page] with identifier [3612049423]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.atlassian.confluence.pages.Page#3612049423]

Description: This article specifies how to use the CISPro Bulk API taking materials APIs as example.

Login to CISPro 

  1. Get Token from Foundation Hub 

...

    "password":{{password}} 

2. Get Client ID from foundation hub for CISPro 

From the body of previous call, take out the bearer token and then do a GET call to /foundation/hub/api/v1/applications?$filter=name eq ‘Inventory’ with authorization using bearer token taken previously 

3. Get Token for CISPro from Foundation Hub 

Do a POST call to /foundation/hub/api/v1/security/login API with json body of 

...

    "password":{{password}} 

 

4. Bulk POST API to create entities in CISPro 

POST Bulk API call can be used to create multiple same type of entities at the same timein time in CISPro.  

The API is /cispro/inventory/api/v1/{{entity_type}}/$bulk. 

...

    "rollBackOnError" : true 

 

Here, the Operations is an array of POST calls that would be done while using the bulk API. The rollBackOnError can be set as true or false as required. 

...

The result of the POST will be 300 Multiple Choices. Individual response codes will also be returned for each operation performed. 

5. Bulk PUT API to update entities in CISPro 

...