1. Overview

Microservice containing the business logic for managing segments-definition-service.

Descriptions of these functions can be found in the section headers for each collection of relevant resources.

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • segments-definition-controller : Segments Definition Controller

2. Resources

2.1. Segments-definition-controller

Segments Definition Controller

2.1.1. Endpoint for getting all the supported schema versions

GET /blankSegmentsDocuments
Responses
HTTP Code Description Schema

200

OK

< Schema > array

401

Unauthorized

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.1.2. Endpoint for getting blank Segments document for a given schema version

GET /blankSegmentsDocuments/{schemaVersion}
Parameters
Type Name Description Schema

Path

schemaVersion
required

Schema version

integer (int32)

Responses
HTTP Code Description Schema

200

OK

SegmentsDefinitionInfo

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.1.3. Endpoint for upgrading Segments document for a given schema version

POST /upgradeSegmentsDocument
Parameters
Type Name Description Schema

Query

schemaVersion
required

schemaVersion

integer (int32)

Body

schemaDefinition
required

schemaDefinition

object

Responses
HTTP Code Description Schema

200

OK

SegmentsDefinitionInfo

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

422

Unprocessible 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.1.4. Validate segments

POST /validateSegmentsDocument
Parameters
Type Name Description Schema Default

Query

validateSchemaOnly
optional

True to validate SegmentsSchema. False to validate both Segments schema and content

boolean

"false"

Body

segmentsDefinition
required

segmentsDefinition

object

Responses
HTTP Code Description Schema

204

Success

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

422

Unprocessible Entity

HttpErrorResponse

503

Service Unavailable

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

3. Definitions

3.1. BillOfMaterialInfo

Bill of Materials of a route.

Name Description Schema

behaviors
required

Behaviours of a BOM item

object

bomItemId
required

Bom Item Id of the material

integer (int32)

defaultStorageUnitId
optional

V8: defaultStorageUnitId of a BOM item

integer (int32)

lowerTolerance
optional

V8: lowerTolerance of a BOM item

number (double)

lowerTolerancePrecision
optional

V8: lowerTolerancePrecision of a BOM item

integer (int32)

materialId
required

Id of the material

integer (int32)

propertyValues
optional

properties associated to a segment.

< PropertiesDefInfo > array

quantity
required

Quantity of the material

number (double)

quantityPrecision
required

V8: quantityPrecision of a BOM item

integer (int32)

scrapFactor
optional

V8: scrapFactor of a BOM item

object

unitOfMeasureId
required

Id of the unitOfMeasure

integer (int32)

upperTolerance
optional

V8: upperTolerance of a BOM item

number (double)

upperTolerancePrecision
optional

V8: upperTolerancePrecision of a BOM item

integer (int32)

visualization
required

Visualization of a BOM item

BillOfMaterialsVisualization

3.2. BillOfMaterialsBehaviours

Behaviours for Bill of Material of a route.

Name Description Schema

requiresConsumptionTracking
required

Boolean property to specify if a BOM item requires consumption acknowledgment/tracking
Example : false

boolean

3.3. BillOfMaterialsVisualization

Behaviours for Bill of Material of a route.

Name Description Schema

displayOrder
required

BOM item requires displayOrder

integer (int32)

3.4. DocumentInfo

Documents of a route.

Name Description Schema

displayName
required

Name of the document

string

link
required

Link of the document

string

3.5. Error

Error details.

Name Description Schema

code
optional

string

details
optional

Details of the error.

object

3.6. 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

3.7. OperationsInfo

Operations of a route.

Name Description Schema

id
required

Id of the operation

integer (int64)

sequenceNumber
required

Sequence number of the operation

integer (int32)

skipIfSuccessorStarted
optional

V8: Indicates if implicit skip is enabled
Example : false

boolean

3.8. PropertiesDefInfo

Properties of a route.

Name Description Schema

propertyDefinitionId
required

Id of property

string

propertyValue
required

Value of property

string

3.9. RouteSegmentInfo

RouteSegment data tranfer object

Name Description Schema

id
required

id of the route Segment

integer (int64)

3.10. Schema

Name Schema

schemaVersion
optional

string

3.11. SegmentInfo

Segment data tranfer object

Name Description Schema

appliesTo
required

Qualifiers for operations based on this segment.

SegmentsAppliesTo

behaviors
optional

Behaviors of a segment

< string > array

billOfMaterials
optional

Bill of materials associated to a segment.

< BillOfMaterialInfo > array

description
optional

Description of the segment.

string

documents
optional

documents associated to a segment.

< DocumentInfo > array

id
required

id of the route segment

integer (int64)

name
required

Name of the segment.

string

plannedUnitIds
optional

units associated to a segment.

< integer (int64) > array

propertyValues
optional

properties associated to a segment.

< PropertiesDefInfo > array

segmentType
required

Type of the segment. Possible options are Segment, Reference

string

suggestedLaborTypes
required

Labor types to expected on operations for this segment. First value is the default labor type.

< integer (int64) > array

3.12. SegmentsAppliesTo

Qualifiers for the segment definition.

Name Description Schema

materialLotActualIds
required

Material lot actual(s) that the segment applies to. Applies to all material lot actual(s) if empty.

< integer (int64) > array

3.13. SegmentsDefinitionInfo

Segment data tranfer object

Name Description Schema

plannedLineId
required

Line Id to which segment document belongs/refers to

integer (int64)

producedMaterialId
required

produced material Id

integer (int64)

schemaVersion
required

Version of the segments document.

integer (int32)

segments
required

List of segments

< SegmentInfo > array

structure
required

Structure of segments

StructureInfo

structureType
required

Structure Type of segment. Possible options are Simple, TreeHierarchy

string

3.14. StructureInfo

Name Description Schema

operations
required

List of operations

< OperationsInfo > array

routeSegment
required

Route segment details

RouteSegmentInfo

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.