PUZZLE Overview Image Plugin (8.2.0-SNAPSHOT)

Changelog

Component Category Description
Overview Image Plugin 8.2.0-SNAPSHOT Dependency PUZZLE core version 50.0.0-SNAPSHOT.
Improvement Beta: Add additional REST endpoint POST /export/{jobId}.png that allows a Client to demand a customized graphic with a domain specific language
Dependency PUZZLE core version 49.2.0.
Overview Image Plugin 8.1.1 Dependency PUZZLE core version 49.2.0.
Bug The overview image plugin now does render in an linux environment.
Overview Image Plugin 7.1.0 Dependency PUZZLE core version 48.0.0.
Overview Image Plugin 7.0.0 Dependency PUZZLE core version 47.0.0.

Description

Plugin for PUZZLE, that allows a client to create an overview image for a job. The overview image is the composition of the images of the load of each solution of the job.

A client can define the color for the loading device and the colors of the sides of the items. Please see the PUZZLE REST API Documentation for details.

The following figure shows the overview images for all three examples:

Left: Overview image for the pallet example. Middle: Overview image for the carton example. Right: Overview image for the best-fit example

/export/{jobId}.png

Precondition: the state of the job is DONE.

Returns the overview image for the job in the PNG format with HTTP status code 200.

If you specify an unknown jobId, PUZZLE returns an error with HTTP status code 404 (see response samples for 404).

If the job does not have the state expected in the precondition, PUZZLE returns an error with HTTP status code 500 (see response samples for 500).

path Parameters
jobId
required
integer <int64> >= 1

The Id of the job.

Responses

200

The overview image as png.

Pallet example Box example

Response Schema: image/png
string <binary>
404

There does not exist a job with the given jobId.

500

An error occurred.

get /export/{jobId}.png
PUZZLE instance at host hostname port 8888
http://hostname:8888/puzzle/api/v1/export/{jobId}.png
PUZZLE instance at localhost port 8888
http://localhost:8888/puzzle/api/v1/export/{jobId}.png

Response samples

application/json
Copy
Expand all Collapse all
{
  • "errorMessage": "PUZZLE cannot find job with id 123",
  • "additionalInformation": "",
  • "errorClass": "de.fraunhofer.iml.puzzle.adapter.execution.Exceptions.Rest.PuzzleJobNotFoundException"
}

/export/{jobId}.png

Precondition: the state of the job is DONE.

Returns the overview image for the job in the PNG format with HTTP status code 200.

If you specify an unknown jobId, PUZZLE returns an error with HTTP status code 404 (see response samples for 404).

If the job does not have the state expected in the precondition, PUZZLE returns an error with HTTP status code 500 (see response samples for 500).

path Parameters
jobId
required
integer <int64> >= 1

The Id of the job.

Request Body schema: application/json
imageHeight
int >= 1
Default: 1200

length of the image in pixel

imageWidth
int >= 1
Default: 1200

width of the image in pixel

graphicDescription
required
string

Responses

200

The overview image as png.

Pallet example Box example

Response Schema: image/png
string <binary>
404

There does not exist a job with the given jobId.

500

An error occurred.

post /export/{jobId}.png
PUZZLE instance at host hostname port 8888
http://hostname:8888/puzzle/api/v1/export/{jobId}.png
PUZZLE instance at localhost port 8888
http://localhost:8888/puzzle/api/v1/export/{jobId}.png

Request samples

application/json
Copy
Expand all Collapse all
{
  • "imageHeight": 1200,
  • "imageWidth": 1200,
  • "graphicDescription": "loadUnit(grid, texture=number, dimensions=height, view=front)"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "errorMessage": "PUZZLE cannot find job with id 123",
  • "additionalInformation": "",
  • "errorClass": "de.fraunhofer.iml.puzzle.adapter.execution.Exceptions.Rest.PuzzleJobNotFoundException"
}