Alternative API Resource

HDC AV operations Web Services.

DELETE /av/alternatives

Delete given alternatives (drafts). Please note, that all versions in given alternative will be removed.

Try it out!

Request Body
media type data type description
application/json array of HdcSimpleIdTO (JSON) - List of alternatives IDs to be deleted
Response Body
media type data type description
application/json object (JSON) JSON response with information if deleting was successful or not

DELETE /av/advanced/alternatives

Delete given alternatives (drafts) by advanced version manager. Please note, that all versions in given alternative will be removed.

Try it out!

Request Body
media type data type description
application/json array of HdcSimpleIdTO (JSON) - List of alternatives IDs to be deleted
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if deleting was successful or not

POST /av/advanced/revertpublish

Reverts published version into draft

Try it out!

Request Body
media type data type description
application/json HdcAlternativeTO (JSON) containing reverted version id, created name and description(optional) of created draft
Response Body
media type data type description
application/json HdcAlternativeTO (JSON) JSON Response with newly created draftId

Example of request:

{"tipVersionId":"5","alternativeName":"New Draft","alternativeDescription":"New draft description"}

Example of response:

{"alternativeId":"5"}

PUT /av/advanced/setpublishdate

Set Publish Date in given alternative(draft)

Example of request:

{"alternativeId":4375,"scheduledPublishDate":"2019-03-28T23:00:00.000Z"}

Try it out!

Request Body
media type data type
application/json HdcAlternativeTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with version information and information if setting publishDate was successful or not

DELETE /av/alternative/{alternativeId}

Delete given alternative (draft). Please note, that all versions in given alternative will be removed.

Try it out!

Request Parameters
name type description default constraints
alternativeId path ID of alternative to be deleted   long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if deleting was successful or not

PUT /av/alternative/{alternativeId}

Edit Name and Description of alternative (draft)

Example of request:

{"alternativeName":"MyDraftName","alternativeDescription":"MyDraftDescription"}

Try it out!

Request Parameters
name type description default constraints
alternativeId path Id of private draft which will be updated   long
Request Body
media type data type
application/json HdcAlternativeTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if update was successful or not

POST /av/alternative/{versionId}

Create alternative(draft) from given version

Example of request:

{"label":"New Draft","description":"New draft description"}

Try it out!

Request Parameters
name type description default constraints
versionId path ID of version which will be root of new alternative   long
Request Body
media type data type description
application/json string (JSON) HdcAlternativeTO
Response Body
media type data type description
application/json HdcAlternativeTO (JSON) JSON Response with information if creation was successful or not

GET /av/alternatives/json

Get list of alternatives (drafts)

Try it out!

Request Parameters
name type description default constraints
mode query Could be "all" - all drafts from database, "private" - only created by current user or "shared" - only shared with current user    
Response Body
media type data type description
application/json object (JSON) JSON response with list of private drafts

Example of response:

{"list":[{"owner":"jdo","ownerFullName":"John Doe","alternativeId":"10","alternativeName":"58914c17-91c2-44ff-823a-37075360a26c","alternativeDescription":"Draft","rootVersionId":"20","tipVersionId":"178656","creationDate":"2013-09-11T13:13:52.117936+02:00","scheduledPublishDate":"2019-03-28T23:00:00.000Z","isShared":true},{"owner":"maz","ownerFullName":"Maciej Zabielski","alternativeId":"11","alternativeName":"eafcafc2-2088-40c4-b159-452a995573c6","alternativeDescription":"Draft","rootVersionId":"20","tipVersionId":"178644","creationDate":"2013-09-11T17:17:37.408548+02:00","isShared":true}]}

GET /av/history/json

Get Master Archive history

Try it out!

Request Parameters
name type description default constraints
limit query maximum number of versions returned   long
offset query the number of the record from which the data will be collected   long
sortField query name of field used to sort    
Response Body
media type data type description
application/json object (JSON) JSON Response with the list of versions and total number of versions

Example of response:

{"list":[{"parentVersionId":"1577", "versionId":"1792", "versionName":"Macro Test", "versionDescription":"revision: b2084150-dc31-47b7-9cb8-86719e73a997", "owner":"maz","ownerFullName":"Maciej Zabielski the user", "creationDate":"2016-11-09T15:29:22.859+01:00", "isDefault":true, "isSealed":true}], "total":1}

DELETE /av/advanced/alternative/{alternativeId}

Delete given alternative (draft) by advanced version manager. Please note, that all versions in given alternative will be removed.

Try it out!

Request Parameters
name type description default constraints
alternativeId path ID of alternative to be deleted   long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if deleting was successful or not

PUT /av/advanced/alternative/{alternativeId}

Edit Name and Description of alternative (draft) by advanced archive manager.

Example of request:

{"alternativeName":"MyDraftName","alternativeDescription":"MyDraftDescription"}

Try it out!

Request Parameters
name type description default constraints
alternativeId path Id of private draft which will be updated   long
Request Body
media type data type
application/json HdcAlternativeTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if update was successful or not

POST /av/advanced/publish/{alternativeId}

Publish given alternative (draft) on tip by advanced archive manager.

Try it out!

Request Parameters
name type description default constraints
alternativeId path ID of alternative to publish   long
async query indicates if request should be processed asynchronously false boolean
default query indicates if new version should be set as default for users false boolean
Response Body
media type data type description
application/json object (JSON) JSON Response with version information and information if publishing was successful or not, or information of publish process if async is true

PUT /av/alternative/rebase/{alternativeId}

Rebase alternative (draft) on top of Master Archive.

Try it out!

Request Parameters
name type description default constraints
alternativeId path Id of private draft which will be updated   long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if update was successful or not

GET /av/alternative/share/{alternativeId}

Get list of users or groups, which have right to access to given alternative (draft)

Try it out!

Request Parameters
name type description default constraints
alternativeId path alternative ID   long
mode query "?mode" - Could be users - get list of users or groups - get list of groups    
Response Body
media type data type description
application/json object (JSON) JSON Response with list of users

Example of response:

{"list":[{"id":2,"name":"user1","userFullName":"User 1","enabled":false,"email":""}]} or {"list":[{"id":22,"name":"Group C5","description":"Description of group C1","enabled":false}]}

POST /av/alternative/share/{alternativeId}

Share alternative (draft) with users or/and groups

Example of request:

{"list":[{"id":"userId"}]} or {"list":[{"id":"groupId"}]}

Try it out!

Request Parameters
name type description default constraints
alternativeId path alternative to be shared   long
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if sharing was successful or not

POST /av/alternative/unshare/{alternativeId}

Unshare alternative (draft) with users or/and groups

Example of request:

{"list":[{"id":"userId"}]} or {"list":[{"id":"groupId"}]}

Try it out!

Request Parameters
name type description default constraints
alternativeId path alternative ID to be unshared   long
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if sharing was successful or not

POST /av/alternative/version/{alternativeId}

Create version as a tip version (snapshot) of given alternative (draft)

Example of request:

{"versionName":"MyVersionName","versionDescription":"MyVersionDescription"}

Try it out!

Request Parameters
name type description default constraints
alternativeId path ID of alternative   long
Request Body
media type data type
application/json HdcVersionTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if creation was successful or not

GET /av/history/json/{alternativeId}

Get list of versions (snapshots) in given alternative

Try it out!

Request Parameters
name type description default constraints
alternativeId path ID of alternative to handle   long
Response Body
media type data type description
application/json array of HdcVersionTO (JSON) JSON Response with the list of versions.

Example of response:

{"list":[{"parentVersionId":"20","versionId":"178663","versionName":"1b7f8cbb-e304-4db2-9540-2fbfa735cc46","owner":"ast","ownerFullName":"Artur Stepkowski","creationDate":"2013-10-18T11:20:43.696857+02:00"},{"parentVersionId":"178663","versionId":"178664","versionName":"df7277e0-82b6-464e-adb8-3957072fb09c","owner":"ast","ownerFullName":"Artur Stepkowski","creationDate":"2013-10-18T11:20:50.035078+02:00"}]}

PUT /av/history/json/{versionId}

Edit Name and Description of version (snapshot)

Example of request:

{"versionName":"MyVersionName","versionDescription":"MyVersionDescription"}

Try it out!

Request Parameters
name type description default constraints
versionId path ID of version to handle   long
Request Body
media type data type
application/json HdcVersionTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if update was successful or not

GET /av/version/info/{versionId}

Try it out!

Request Parameters
name type description default constraints
versionId path   long
Response Body
media type data type description
application/json object (JSON)

PUT /av/advanced/alternative/rebase/{alternativeId}

Rebase alternative (draft) on top of Master Archive by advanced archive manager.

Try it out!

Request Parameters
name type description default constraints
alternativeId path Id of draft which will be updated   long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if update was successful or not

PUT /av/advanced/history/json/{versionId}

Edit Name and Description of version (snapshot) for advanced archive manager

Example of request:

{"versionName":"MyVersionName","versionDescription":"MyVersionDescription"}

Try it out!

Request Parameters
name type description default constraints
versionId path ID of version to handle   long
Request Body
media type data type
application/json HdcVersionTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if update was successful or not

GET /av/advanced/tipversion/json/{alternativeId}

Get Tip Version for alternative

Try it out!

Request Parameters
name type description default constraints
alternativeId path ID of alternative   long
Response Body
media type data type description
application/json HdcVersionTO (JSON) JSON Response with the version ID.

Example of response:

{"versionId":"1"}

PUT /av/advanced/version/setdefault/{versionId}

Set version as default for all users

Try it out!

Request Parameters
name type description default constraints
versionId path ID of version to be set as default   long
Response Body
media type data type description
application/json HdcVersionTO (JSON) JSON Response with new version context

Example of response:

{"alternative":{"owner":"admin","ownerFullName":"Administrator","alternativeId":"1","alternativeName":"main","alternativeDescription":"main version branch","rootVersionId":"1","tipVersionId":"4705","creationDate":"2014-10-02T15:52:09.892+02:00"},"parentVersionId":"4691","versionId":"4704","versionName":"test3","owner":"tom","ownerFullName":"Tomasz Wyczółkowski","creationDate":"2017-12-22T18:50:03.409+01:00","defaultVersionId":"4704","isSealed":true}

GET /av/object/history/json/{versionId}

Get Modified Objects History for following version

Try it out!

Request Parameters
name type description default constraints
versionId path - version ID   long
hqlCriteria query    
limit query - page limit   long
masterVersion query - flag indicating if version is master version or draft (false)   boolean
offset query - page offset   long
sortField query - sort field    
Response Body
media type data type description
application/json object (JSON) JSON Response with the list of versions and total number of versions

Example of response:

{"total":12,"list":[{"operation":0,"hdid":1433,"classId":14234210,"source":14,"operationDate":"2015-05-11T07:39:27.007789Z","userId":144,"userName":"abc","userFullName":"abc","email":"abc@tessel.pl"},{"operation":0,"hdid":15,"classId":103,"source":14,"operationDate":"2015-06-11T13:29:55.948609Z","userId":144,"userName":"abc","userFullName":"abc","email":"abc@tessel.pl"}]}

GET /av/advanced/version/operations/json/{versionId}

Get last or all operations in given version

Try it out!

Request Parameters
name type description default constraints
versionId path published version ID   long
mode query set "?mode" to "all" or "last"    
Response Body
media type data type description
application/json object (JSON) JSON with list of operations

Example of response:

{"list":[{"userId":"9","timeStamp":"2013-10-22T15:27:31.475324+02:00","sourceId":"1","operationId":"i","objectId":"219895","objectClassId":"15","classId":"15"}]}

POST /av/object/history/export/xls/{versionId}

Get Modified Objects History for following version in form of Excel report

Try it out!

Request Parameters
name type description default constraints
versionId path - version ID   long
hqlCriteria query    
masterVersion query - flag indicating if version is master version or draft (false) false boolean
sortField query - sort field    
Response Body
media type data type description
application/json HdcPathProcessStateTO (JSON) JSON Response with the list of versions and total number of versions