Support DESK

Follow

H5.3.1 - Engines Collection

Previous Article matchIT Hub Index Next Article 

Resources relative to http://host:8080/matchITHub

Before you can start adding data to the matchIT Hub Service you must create an instance of a Hub Engine.

REST resource Summary
GET engines get a list of instantiated engines
POST engines create engine/session and initialize.
Form data: activation_code=<code>
DELETE engines/<engine id> delete engine/session

GET /matchITHub/engines

Response

Name Value Description
ids <engine>,<engine>,... Comma separated list of the ids of all current engine instances

Description

Returns a list of active engine numbers.

Usage Examples

Using a browser:

Using cURL:

curl -X GET http://localhost:8080/matchITHub/engines
{"status":"OK","ids":""}

POST /matchITHub/engines

Request

Type Name Description
FormParam activation_code The hub activation code
FormParam name A name to give the engine instance

Response

Name Value Description
Engine <engine> The id of a newly created engine instance

Description

Initialises an instance of the engine and applies the activation_code.

The activation_code can be omitted, in which case a valid activation code must be PUT to the Initialization resource before the engine instance can be used.

If you supply a name for an instance, you can use this as <engine> in the url instead of the instance number.

Usage Example

Using cURL:

curl -X POST --data "activation_code=<activation_code>" http://localhost:8080/matchITHub/engines
{"status":"OK","engine":1}
Or:
curl -X POST --data-urlencode "activation_code@activation.txt" http://localhost:8080/matchITHub/engines
{"status":"OK","engine":1}

DELETE /matchITHub/engines/<engine>

Request

engine
Type Name Description
PathParam engine The id number (or name) of the engine instance to delete

Description

Deletes the specified engine instance.

Usage Example

Using cURL:

curl -X DELETE http://localhost:8080/matchITHub/engines/1
{"status":"OK"}

 

Previous Article matchIT Hub Index Next Article 
Was this article helpful?
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.