1. Overview

Microservice containing the business logic for managing route-service.

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • route-command-controller : Route Command Controller

  • route-controller : Route Controller

  • segment-controller : Segment Controller

2. Resources

2.1. Route-command-controller

Route Command Controller

2.1.1. Archive route

PATCH /routes/{routeId}/archive
Parameters
Type Name Description Schema

Path

routeId
required

routeId

integer (int64)

Body

routeInfo
required

routeInfo

RouteForStatusUpdateInfo

Responses
HTTP Code Description Schema

200

OK

RouteInfoResult

400

Bad request

Api error

401

Unauthorized

Api error

404

Not Found

Api error

422

Unprocessable Entity

Api error

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.2. Copy route

POST /routes/{routeId}/copyRoute
Parameters
Type Name Description Schema

Path

routeId
required

Id of the route to be released

integer (int64)

Body

routeInput
required

routeInput

RouteForCopyInfo

Responses
HTTP Code Description Schema

200

OK

RouteInfoResult

400

Bad request

Api error

401

Unauthorized

Api error

404

Not Found

Api error

422

Unprocessable Entity

Api error

500

Internal Server error

Api error

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.3. Release route

POST /routes/{routeId}/{confirmRelease}/release
Parameters
Type Name Description Schema Default

Path

confirmRelease
required

confirm release flag

boolean

"false"

Path

routeId
required

Id of the route to be released

integer (int64)

Responses
HTTP Code Description Schema

200

OK

RouteInfoResult

400

Bad request

Api error

401

Unauthorized

Api error

404

Not Found

Api error

422

Unprocessable Entity

Api error

500

Internal Server error

Api error

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2. Route-controller

Route Controller

2.2.1. Create route

POST /routes
Parameters
Type Name Description Schema

Body

input
required

Details of the route to create

RouteForCreateInfo

Responses
HTTP Code Description Schema

201

Created

RouteInfoResult

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.2. Get routes

GET /routes
Parameters
Type Name Description Schema Default

Query

description
optional

description

string

Query

modifiedBy
optional

modifiedBy

string

Query

name
optional

name

string

Query

orderBy
optional

enum (asc, desc)

"desc"

Query

orderByColumn
optional

orderByColumn

string

"lastModifiedOn"

Query

page
optional

integer (int32)

0

Query

producedMaterialId
optional

producedMaterialId

integer (int64)

Query

productionLineId
optional

productionLineId

integer (int64)

Query

showAllRevisions
optional

showAllRevisions

boolean

"true"

Query

size
optional

integer (int32)

20

Query

status
optional

status

string

Responses
HTTP Code Description Schema

200

OK

RouteInfoResults

401

Unauthorized

No Content

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.3. Upgrade route segment documents to latest schema version

GET /routes/upgrade/{schemaVersion}/{routeId}
Parameters
Type Name Description Schema

Path

routeId
required

RouteId of segment

integer (int64)

Path

schemaVersion
required

Schema Version

integer (int32)

Responses
HTTP Code Description Schema

200

OK

RouteInfoResult

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.4. Get a route

GET /routes/{routeId}
Parameters
Type Name Description Schema

Path

routeId
required

Id of the route

integer (int64)

Responses
HTTP Code Description Schema

200

OK

RouteInfoResult

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.5. Delete a route

DELETE /routes/{routeId}
Parameters
Type Name Description Schema

Path

routeId
required

Route Id to be deleted

integer (int64)

Responses
HTTP Code Description Schema

200

OK

object

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

Produces
  • /

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.6. Update route

PATCH /routes/{routeId}
Parameters
Type Name Description Schema

Path

routeId
required

Details on the route to update

integer (int64)

Body

routeInfo
required

routeInfo

RouteForUpdateInfo

Responses
HTTP Code Description Schema

200

OK

RouteInfoResult

400

Bad request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.7. Create a New Revision

POST /routes/{routeId}/revision
Parameters
Type Name Description Schema

Path

routeId
required

Id of the route to create a new revision

integer (int64)

Responses
HTTP Code Description Schema

200

OK

RouteInfoResult

400

Bad request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3. Segment-controller

Segment Controller

2.3.1. Get Segments Definition Document

GET /routes/{routeId}/segments
Parameters
Type Name Description Schema

Path

routeId
required

Get segments of the RouteId

integer (int64)

Responses
HTTP Code Description Schema

200

OK

object

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3.2. Update segmentDefinition

PUT /routes/{routeId}/segments
Parameters
Type Name Description Schema

Path

routeId
required

RouteId of segments

integer (int64)

Body

segmentDefInput
required

Segments Definition to update

object

Responses
HTTP Code Description Schema

201

Created

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3.3. Delete segments

DELETE /routes/{routeId}/segments
Description

This would delete all the segments except route segment.

Parameters
Type Name Description Schema

Path

routeId
required

RouteId for which segments to be deleted

integer (int64)

Responses
HTTP Code Description Schema

200

OK

object

303

See Other. (Segments deleted and route segment added)

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3.4. Get segment

GET /routes/{routeId}/segments/{segmentId}
Parameters
Type Name Description Schema

Path

routeId
required

RouteId of the segment

integer (int64)

Path

segmentId
required

SegmentId fof the segment

integer (int64)

Responses
HTTP Code Description Schema

200

OK

object

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

3. Definitions

3.1. Api error

Http Error response.

Name Schema

errorCode
optional

string

message
optional

string

requestPath
optional

string

status
optional

enum (100, 101, 102, 103, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511)

subErrors
optional

ApiSubError

timestamp
optional

string

3.2. ApiSubError

Name Schema

args
optional

< string > array

errorCode
optional

string

field
optional

string

message
optional

string

value
optional

object

3.3. Error

Error details.

Name Description Schema

code
optional

string

details
optional

Details of the error.

object

3.4. HttpErrorResponse

Http Error response.

Name Description Schema

error
optional

Error details

Error

path
optional

URL at which error occured.

string

timestamp
optional

Timestamp at which error occured

string

Name Schema

href
optional

string

rel
optional

string

templated
optional

boolean

3.6. PageMetadata

Name Schema

number
optional

integer (int64)

size
optional

integer (int64)

totalElements
optional

integer (int64)

totalPages
optional

integer (int64)

3.7. Resource«RouteInfo»

Name Description Schema

bomFormulationId
optional

bomFormulationId of the route

integer (int64)

count
optional

Determines count of revisions of a route.

integer (int64)

createdBy
optional

User that Created the route.

string

createdOn
optional

Date that the route was created.

string (date-time)

description
optional

description of the route

string

lastModifiedBy
optional

User that last modified the route.

string

lastModifiedOn
optional

Date that the route was last modified.

string (date-time)

latest
optional

Determines if revision of route is latest. 0 - if revision is old. 1 - If revision is new.
Example : false

boolean

links
optional

< Link > array

name
optional

name of the route

string

producedMaterialId
optional

producedMaterialId of the route

integer (int64)

productionLineId
optional

productionLineId of the route

integer (int64)

released
optional

Determines if route been released. 0 - if Route is not released. 1 - If route is released.
Example : false

boolean

revision
optional

revision of the route

integer (int32)

routeId
optional

id of the route

integer (int64)

state
optional

State of the route.
Example : false

boolean

status
optional

status of the route

string

3.8. RouteForCopyInfo

Name Description Schema

bomFormulationId
optional

bomFormulationId of the route

integer (int64)

description
optional

description of the route record

string

name
optional

name of the route record

string

producedMaterialId
optional

producedMaterialId of the route record

integer (int64)

productionLineId
optional

productionLineId of the route record

integer (int64)

productionUnits
optional

productionUnits of the route record

< integer (int64) > array

secretKey
optional

secretkey of the BFF request

string

3.9. RouteForCreateInfo

Route data tranfer object for creation.

Name Description Schema

bomFormulationId
optional

bomFormulationId of the route record

integer (int64)

description
optional

description of the route record

string

name
required

name of the route record

string

producedMaterialId
required

producedMaterialId of the route record

integer (int64)

productionLineId
required

productionLineId of the route record

integer (int64)

revision
required

revision of the route record

integer (int32)

secretKey
optional

secretkey of the BFF request

string

status
required

status of the route record

string

3.10. RouteForStatusUpdateInfo

Route data tranfer object for update

Name Description Schema

status
required

Status of the route record

string

3.11. RouteForUpdateInfo

Route data tranfer object for update

Name Description Schema

bomFormulationId
optional

bomFormulationId of the route record

integer (int64)

description
optional

Description of the route record

string

name
optional

Name of the route record

string

status
optional

Status of the route record

string

3.12. RouteInfo

Route data tranfer object

Name Description Schema

bomFormulationId
optional

bomFormulationId of the route

integer (int64)

count
optional

Determines count of revisions of a route.

integer (int64)

createdBy
optional

User that Created the route.

string

createdOn
optional

Date that the route was created.

string (date-time)

description
optional

description of the route

string

lastModifiedBy
optional

User that last modified the route.

string

lastModifiedOn
optional

Date that the route was last modified.

string (date-time)

latest
optional

Determines if revision of route is latest. 0 - if revision is old. 1 - If revision is new.
Example : false

boolean

name
optional

name of the route

string

producedMaterialId
optional

producedMaterialId of the route

integer (int64)

productionLineId
optional

productionLineId of the route

integer (int64)

released
optional

Determines if route been released. 0 - if Route is not released. 1 - If route is released.
Example : false

boolean

revision
optional

revision of the route

integer (int32)

routeId
optional

id of the route

integer (int64)

state
optional

State of the route.
Example : false

boolean

status
optional

status of the route

string

3.13. RouteInfoResult

Name Description Schema

bomFormulationId
optional

bomFormulationId of the route

integer (int64)

count
optional

Determines count of revisions of a route.

integer (int64)

createdBy
optional

User that Created the route.

string

createdOn
optional

Date that the route was created.

string (date-time)

description
optional

description of the route

string

lastModifiedBy
optional

User that last modified the route.

string

lastModifiedOn
optional

Date that the route was last modified.

string (date-time)

latest
optional

Determines if revision of route is latest. 0 - if revision is old. 1 - If revision is new.
Example : false

boolean

links
optional

< Link > array

name
optional

name of the route

string

producedMaterialId
optional

producedMaterialId of the route

integer (int64)

productionLineId
optional

productionLineId of the route

integer (int64)

released
optional

Determines if route been released. 0 - if Route is not released. 1 - If route is released.
Example : false

boolean

revision
optional

revision of the route

integer (int32)

routeId
optional

id of the route

integer (int64)

state
optional

State of the route.
Example : false

boolean

status
optional

status of the route

string

3.14. RouteInfoResults

Name Schema

content
optional

< Resource«RouteInfo» > array

links
optional

< Link > array

page
optional

PageMetadata

4. Security

4.1. access_token

Type : oauth2
Flow : accessCode
Token URL : https://localhost:8443/uaa/oauth/authorize
Token URL : https://localhost:8443/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.2. resource_owner

Type : oauth2
Flow : password
Token URL : https://localhost:8443/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.3. implicit_grant

Type : oauth2
Flow : implicit
Token URL : https://localhost:8443/uaa/oauth/authorize

Name Description

default

Default oauth2 scope.

4.4. client_creds

Type : oauth2
Flow : application
Token URL : https://localhost:8443/uaa/oauth/token

Name Description

default

Default oauth2 scope.