Skip to content

Reactors API Reference

GET /resources/reactors

Gets all reactors that the current session has read access to.

Request Sample
Request
GET https://<hantera-hostname>/resources/reactors
Authorization: Bearer <YOUR TOKEN>
Response
Status: 200
[{
"reactorId": "my-api",
"componentId": "myReactorComponent",
"parameters": {
"param1": "'a text value'"
},
"methods": [{
"name": "myMethod",
"parameters": "{ arg1: text }"
}]
}]

GET /resources/reactors/<reactorId>

Gets a reactor if the current session has read access to it.

URI Parameters
reactorIdstring

Must be a non-empty string containing a-z, 0-9 or underscore.

Request Sample
Request
GET https://<hantera-hostname>/resources/reactors/my-api
Authorization: Bearer <YOUR TOKEN>
Response
Status: 200
{
"reactorId": "my-api",
"componentId": "myReactorComponent",
"parameters": {
"param1": "'a text value'"
},
"methods": [{
"name": "myMethod",
"parameters": "{ arg1: text }"
}]
}

POST /resources/reactors/<reactorId>

Creates or updates an existing Reactor instance if the current session has write access to it.

URI Parameters
reactorIdstring

Must be a non-empty string containing a-z, 0-9 or underscore.

Body Parameters
componentIdstring

ID of the component to use for this reactor.

parametersmap of string to any value

The parameters to pass to the Reactor Component during instantiation.

Response Properties
reactorIdstring

The Reactor ID

componentIdstring

ID of the component used for this reactor.

parametersmap of string to filtrera code value

The parameters passed to the Reactor Component during instantiation, formatted as literal filtrera values.

methodsarray of method signatures

Metadata about the Reactor’s methods.

Request Sample
Request
POST https://<hantera-hostname>/resources/reactors/my-api
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
{
"componentId": "myReactorComponent",
"parameters": {
"param1": "'a text value'"
}
}
Response
Status: 200
{
"reactorId": "my-api",
"componentId": "myReactorComponent",
"parameters": {
"param1": "'a text value'"
},
"methods": [{
"name": "myMethod",
"parameters": "{ arg1: text }"
}]
}

DELETE /resources/reactors/<reactorId>

Deletes a Reactor if the current session has write access to it.

URI Parameters
reactorIdstring

Must be a non-empty string containing a-z, 0-9 or underscore.

Request Sample
Request
DELETE https://<hantera-hostname>/resources/reactors/my-api
Authorization: Bearer <YOUR TOKEN>
Response
Status: 200

POST /resources/reactors/<reactorId>/<methodName>

Calls a method on a reactor if the current session has call access to it.

URI Parameters
reactorIdstring

The ID of the Reactor to call.

methodNamestring

The name of the method to call.

Body

The body of a Reactor method call must be a JSON object with properties matching the method’s expected parameters and value types.

Response

The response can be any value decided by the Reactor method.

Request Sample
Request
POST https://<hantera-hostname>/resources/reactors/my-api/myMethod
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
{
"arg1": "The argument value"
}
Response
Status: 200
"The method says: Hello world!"