Correct me if I'm wrong but currently creating new items with POST to /biblios/{biblio_id}/items requires item_id. I think it would be more convenient if item_id could be omitted and the handler would assign items using the auto increment value of items table. Then on the response item_id:s would be populated accordingly. This would prevent potential conflicts when items are being created from multiple sources. Additionally, it seems that item IDs can be manually entered above 2147483647, causing item creation to lock up until the auto-increment value is manually reset. So in a nutshell: 1) Allow item_id to be omitted in POST /biblios/{biblio_id}/items requests. 2) If item_id is not provided, the API should let the database assign it via auto-increment. 3) The response should return the created items with their assigned item_id values.
This sounds more like a dangeorus bug than anything else. No outside script should be able to assign PK in my opinion. It will mess with the counters?