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/reactorsAuthorization: Bearer <YOUR TOKEN>
curl -i -X GET \ https://<hantera-hostname>/resources/reactors \ -H 'Authorization: Bearer <YOUR TOKEN>'
Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/reactors" `-Method GET ` `-Headers @{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
reactorId | string Must be a non-empty string containing a-z, 0-9 or underscore. |
Request Sample
Request
GET https://<hantera-hostname>/resources/reactors/my-apiAuthorization: Bearer <YOUR TOKEN>
curl -i -X GET \ https://<hantera-hostname>/resources/reactors/my-api \ -H 'Authorization: Bearer <YOUR TOKEN>'
Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/reactors/my-api" `-Method GET ` `-Headers @{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
reactorId | string Must be a non-empty string containing a-z, 0-9 or underscore. |
Body Parameters
componentId | string ID of the component to use for this reactor. |
parameters | map of string to any value The parameters to pass to the Reactor Component during instantiation. |
Response Properties
reactorId | string The Reactor ID |
componentId | string ID of the component used for this reactor. |
parameters | map of string to filtrera code value The parameters passed to the Reactor Component during instantiation, formatted as literal filtrera values. |
methods | array of method signatures Metadata about the Reactor’s methods. |
Request Sample
Request
POST https://<hantera-hostname>/resources/reactors/my-apiAuthorization: Bearer <YOUR TOKEN>Content-Type: application/json
{ "componentId": "myReactorComponent", "parameters": { "param1": "'a text value'" }}
curl -i -X POST \ https://<hantera-hostname>/resources/reactors/my-api \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "componentId": "myReactorComponent", "parameters": { "param1": "'a text value'" }}'
Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/reactors/my-api" `-Method POST ` `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"}-Body '{ "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
reactorId | string Must be a non-empty string containing a-z, 0-9 or underscore. |
Request Sample
Request
DELETE https://<hantera-hostname>/resources/reactors/my-apiAuthorization: Bearer <YOUR TOKEN>
curl -i -X DELETE \ https://<hantera-hostname>/resources/reactors/my-api \ -H 'Authorization: Bearer <YOUR TOKEN>'
Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/reactors/my-api" `-Method DELETE ` `-Headers @{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
reactorId | string The ID of the Reactor to call. |
methodName | string 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/myMethodAuthorization: Bearer <YOUR TOKEN>Content-Type: application/json
{ "arg1": "The argument value"}
curl -i -X POST \ https://<hantera-hostname>/resources/reactors/my-api/myMethod \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "arg1": "The argument value"}'
Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/reactors/my-api/myMethod" `-Method POST ` `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"}-Body '{ "arg1": "The argument value"}'
Response
Status: 200
"The method says: Hello world!"