Help page for REST API project

Show supported Jukeboxes

Shows all jukeboxes that are supported by a specified settingId. The initial representation, where no parameters are specified, shows some possible setting identifiers, their requirements, and a list of jukeboxes that support them.





URL Parameters



Specifies the unique identifier of a setting. The settingId is used to retrieve the jukeboxes whose components match the requires of the setting. Note, if a setting has no requirements than all jukeboxes are returned.

example: settingId=86506865-f971-496e-9b90-75994f251459



Specifies the model name used to filter the resulting list of supported_jukeboxes to a particular model. Note, if this parameter is not passed, you will see all supported_jukeboxes associated with the settingId.

example: model=angelina


Specifies the maximum number of results to display in the query. The default value is five (5).

example: limit=10


Specifies the page number of the results. Results are paginated by the limit value and the offset parameter is used to select a specific page. The default value is zero (0).

Note, page indices start at zero (0). If you pass a value larger than the number of pages, the last available page will be selected.

example: offset=2

Success Response

Status Code: 200

Content: [{“id”: “5ca94a8a8b58770bb38055a0”, “model”: “angelina”, “components”: [{“name”: “money_storage”}, {“name”: “pcb”}]}, {“id”: “5ca94a8aa2330a0762019ac0”, “model”: “angelina”, “components”: [{“name”: “money_storage”}, {“name”: “amplifier”}]}]

Error Responses

Status Code: 400

Content: Invalid settingId passed.

Indicates the specified settingId value does not exist.

Status Code: 400

Content: offset parameter not a valid positive integer value. OR limit parameter not a valid positive integer value.

Indicates the offset or limit parameters were not a positive integer value. The request was malformed; adjust the offset or limit parameter to be a positive integer.

Status Code: 404

Content: The query did not return any response.

Indicates that there were no supported_jukeboxes for the specified query.

Status Code: 404

Content: Could not access upstream api so no results are available OR Unsupported status returned by upstream api, so no results are available.

Indicates that when querying an upstream API, either an exception was thrown or it returned an unexpected HTTP status. Make sure that you are connected to the internet and try again. If the problem persists, contact support.

Sample Query

The following query retrieves a list of supported_jukeboxes for a given settingId, where the model is constrained to angelina. The query returns 200 OK and provides an application/json response with the associated content.

curl -v "http://localhost:5000/testapi/v1/supported_jukeboxes/?settingId=515ef38b-0529-418f-a93a-7f2347fc5805&model=angelina"
< HTTP/1.0 200 OK
< Content-Type: application/json
< Content-Length: 240
< Server: Werkzeug/0.16.0 Python/3.7.4
< Date: Sun, 22 Dec 2019 17:07:46 GMT
[{"id": "5ca94a8a8b58770bb38055a0", "model": "angelina", "components": [{"name": "money_storage"}, {"name": "pcb"}]}, {"id": "5ca94a8aa2330a0762019ac0", "model": "angelina", "components": [{"name": "money_storage"}, {"name": "amplifier"}]}]