Sync Request Resource

GET /api/syncrequest/requests

Get all sync requests with given filter

Request Parameters
name type description default
type query all|failed|permanently_failed all
Response Body
media type data type description
application/json object (JSON) JSON with list of sync requests

Example of response:

{"list":[{"id":"guid","parameters":{"changeRequestId":"number"},"type":"NEW_REQUEST|STATE_CHANGED|NEW_COMMENT","exceptions":[],"ts":"2020-04-17T11:15:08.085975Z","failureCounter":0,"changeRequestId":769,"status":"pending|failed|permanently_failed"}]}

Example

Request
GET /api/syncrequest/requests
Content-Type: */*
Accept: application/json

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

                
...
                
              

POST /api/syncrequest/requests

Get all sync requests for given list of changeRequests

Example of request:

[1,2,3]

Request Body
media type data type
application/json array of number (JSON)
Response Body
media type data type description
application/json object (JSON) JSON with list of sync requests

Example of response:

{"list":[{"id":"guid","parameters":{"changeRequestId":"number"},"type":"NEW_REQUEST|STATE_CHANGED|NEW_COMMENT","exceptions":[],"ts":"2020-04-17T11:15:08.085975Z","failureCounter":0,"changeRequestId":769,"status":"pending|failed|permanently_failed"}]}

Example

Request
POST /api/syncrequest/requests
Content-Type: application/json
Accept: application/json

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

                
...
                
              

POST /api/syncrequest/requests/retry

Retry sync requests

Example of request:

{"mode":"all|failed|permanently_failed|selected", "guids":["selected_guid1","selected_guid2"]}

Request Body
media type data type
application/json RetryRequest (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON)

Example

Request
POST /api/syncrequest/requests/retry
Content-Type: application/json
Accept: application/json

                
{
  "mode" : "SELECTED",
  "guids" : [ "...", "..." ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{ }
                
              

DELETE /api/syncrequest/requests/{id}

Remove sync request with given ID

Request Parameters
name type description
id path ID of sync request
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information, whether the removing has or has not been succeeded.

Example

Request
DELETE /api/syncrequest/requests/{id}
Content-Type: */*
Accept: application/json

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

                
{ }
                
              

GET /api/syncrequest/states/json

List of all request states from external service

Request Parameters
name type description default
filter query all
service query tp
Response Body
media type data type description
application/json object (JSON) JSON with list of states

Example of response:

{"list":[{"stateId":1,"name":"New"},{"stateId":2,"name":"Under Review"},{"stateId":3,"name":"Approved"},{"stateId":4,"name":"Closed"}]}

Example

Request
GET /api/syncrequest/states/json
Content-Type: */*
Accept: application/json

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

                
...
                
              

POST /api/ext/changerequest/addcomment/{token}

Add comment to change request

Request Parameters
name type description
token path authorization token

Example of request:

{"id":1,"comment":"comment","userMail":"user@mail.com","token":"token"} where: id - id of external request comment - new comment userMail - mail of user, which should be set as author of change
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) Response with information, whether the operation has or has not been succeeded.

Example

Request
POST /api/ext/changerequest/addcomment/{token}
Content-Type: application/json
Accept: application/json

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

                
{ }
                
              

POST /api/ext/changerequest/changestate/{token}

Change state of change request

Request Parameters
name type description
token path authorization token

Example of request:

{"id":1,"stateId":1,"userMail":"user@mail.com","token":"token"} where: id - id of external request stateId - new external state id userMail - mail of user, which should be set as author of change
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) Response with information, whether the operation has or has not been succeeded.

Example

Request
POST /api/ext/changerequest/changestate/{token}
Content-Type: application/json
Accept: application/json

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

                
{ }
                
              

GET /api/syncrequest/statesrelations/json/{stateId}

TargetProcess state related to HDC change request state

Request Parameters
name type description constraints
stateId path HDC change request state ID int
Response Body
media type data type description
application/json object (JSON) JSON with list of states

Example of response:

{"list":[{"stateId":1,"name":"New"}]}

Example

Request
GET /api/syncrequest/statesrelations/json/{stateId}
Content-Type: */*
Accept: application/json

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

                
...
                
              

DELETE /api/syncrequest/statesrelations/{crStateId}/{tpStateId}

Remove relation between states

Request Parameters
name type description constraints
crStateId path HDC change request state ID int
tpStateId path TargetProcess request state ID int
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information, whether the deletion has or has not been succeeded.

Example

Request
DELETE /api/syncrequest/statesrelations/{crStateId}/{tpStateId}
Content-Type: */*
Accept: application/json

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

                
{ }
                
              

POST /api/syncrequest/statesrelations/{crStateId}/{tpStateId}

Add relation between states

Request Parameters
name type description constraints
crStateId path HDC change request state ID int
tpStateId path TargetProcess request state ID int
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information, whether the adding has or has not been succeeded.

Example

Request
POST /api/syncrequest/statesrelations/{crStateId}/{tpStateId}
Content-Type: */*
Accept: application/json

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

                
{ }