Request URI: /fcr:tx; /tx:{transaction_id}/path/to/resource, /tx:{transaction_id}/fcr:tx, /tx:{transaction_id}/fcr:commit, /tx:{transaction_id}/fcr:rollback
Methods: GET, POST
Get the current status of the repository in a transaction Status title GET
...
Status | ||||||
---|---|---|---|---|---|---|
|
Status | ||||||
---|---|---|---|---|---|---|
|
...
Create a new transaction (or keep an existing transaction alive) Status colour Blue title POST
Info |
---|
After retrieving a transaction resource, the client can execute any REST API method prefixed by the transaction location. |
...
Code Block |
---|
Status: 201 Created Headers: Location: http://localhost:8080/rest/tx:83e34464-144e-43d9-af13-b3464a1fb9b5 Expires: Sat, 16 Nov 2013 00:32:57 GMT |
Usage:
When a transaction has been created, it will return a Location header. Use this location as the base URL for performing REST API operations within the transaction. When you are done with the transaction, either append "/fcr:tx/fcr:commit" to commit the transaction to the repository or "/fcr:tx/fcr:rollback" to discard the changes.
Code Block |
---|
curl -X POST "http://localhost:8080/rest/tx:83e34464-144e-43d9-af13-b3464a1fb9b5/path/to/object/to/create" curl -X DELETE "http://localhost:8080/rest/tx:83e34464-144e-43d9-af13-b3464a1fb9b5/path/to/resource/to/delete" curl -X POST "http://localhost:8080/rest/tx:83e34464-144e-43d9-af13-b3464a1fb9b5/fcr:tx/fcr:commit" |
...
Status | ||||||
---|---|---|---|---|---|---|
|
...
Keep an existing transaction alive Status colour Blue title POST
Example:
Code Block |
---|
curl -X POST "http://localhost:8080/rest/tx:83e34464-144e-43d9-af13-b3464a1fb9b5/fcr:tx" |
Response:
Code Block |
---|
Status: 204 No Content
Headers:
Location: http://localhost:8080/rest/tx:83e34464-144e-43d9-af13-b3464a1fb9b5
Expires: Sat, 16 Nov 2013 03:35:43 GMT |
Status:
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Save and commit an open transaction. Status colour Blue title POST
...
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Rollback and close an open transaction Status colour Blue title POST
...
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|
Status | ||||||||
---|---|---|---|---|---|---|---|---|
|