Alternative admin API Resource

Abstract class for REST webservices

DELETE /api/av/admin/alternatives

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

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

Example

Request
DELETE /api/av/admin/alternatives
Content-Type: application/json
Accept: application/json

                
[ {
  "id" : 12345
} ]
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /api/av/admin/activity/json

Get audit list of versioning operations.

Request Parameters
name type description constraints
filter query  
limit query long
sortField query  
start query long
Response Body
media type data type description
application/json object (JSON) JSON with list of versioning operations.

Example of response:

{"total":1,"list":[{"invokerId":1,"userId":10,"activityType":3,"name":"stonoga3","userFullName":"stonoga3","email":"stonoga3@abc.pl","activityTexts":["stonoga3","stonoga3x"],"activityIdentifiers":[],"invokerName":"admin","invokerFullName":"Administrator","invokerEmail":"dada@abc.pl","operationDate":"2020-03-04T15:46:28.860286Z"}]}

Example

Request
GET /api/av/admin/activity/json
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /api/av/admin/activity/report

Get list of av activities in form of Excel report

Request Parameters
name type description
filter query
sortField query
Response Body
media type data type description
application/json HdcPathProcessStateTO (JSON) json response with information about started process

Example

Request
GET /api/av/admin/activity/report
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{ }
                
              

DELETE /api/av/admin/alternative/{alternativeId}

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

Request Parameters
name type description 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

Example

Request
DELETE /api/av/admin/alternative/{alternativeId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

PUT /api/av/admin/alternative/{alternativeId}

Request Parameters
name type description constraints
alternativeId path long
Request Body
media type data type
application/json HdcAlternativeTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON)

Example

Request
PUT /api/av/admin/alternative/{alternativeId}
Content-Type: application/json
Accept: application/json

                
{ }
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

GET /api/av/admin/alternatives/json

Get full list of all users alternatives

Response Body
media type data type description
application/json array of HdcAlternativeTO (JSON) JSON with response of all users' drafts Example of response {list: [{owner: "123",ownerFullName: "123456",alternativeId: "4",alternativeName: "NAME",alternativeDescription: "",rootVersionId: "3",tipVersionId: "647",creationDate: "2012-11-01T04:06:28.290+02:00", "scheduledPublishDate":"2019-03-28T23:00:00.000Z"},{owner: "avf",ownerFullName: "AVRE",alternativeId: "14",alternativeName: "test",alternativeDescription: "",rootVersionId: "28",tipVersionId: "100", creationDate: "2012-07-02T14:36:11.481+02:00"} ] }

Example

Request
GET /api/av/admin/alternatives/json
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ { } ]
                
              

GET /api/av/admin/drafts/{versionId}

Get drafts originated from version or its child versions

Request Parameters
name type description constraints
versionId path ID of version long
Response Body
media type data type description
application/json object (JSON) JSON response with list of drafts

Example of response:

{"list":[{"owner":"15","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"},{"owner":"11","ownerFullName":"Jane Doe","alternativeId":"11","alternativeName":"eafcafc2-2088-40c4-b159-452a995573c6","alternativeDescription":"Draft","rootVersionId":"20","tipVersionId":"178644","creationDate":"2013-09-11T17:17:37.408548+02:00"}]}

Example

Request
GET /api/av/admin/drafts/{versionId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

POST /api/av/admin/publish/{alternativeId}

Publish given alternative (draft) on tip by admin.

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

Example

Request
POST /api/av/admin/publish/{alternativeId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...