Skip to content
logoBack to home screen

Legacy REST Action Operations

Action calls allow you to execute actions saved in the Workbench using a REST call.

This is the documentation for the old REST API endpoint. For the documentation for the latest REST endpoint, see REST v2 Introduction.

Available Calls

NameSyntaxMethodsParameters
Workbench Action.../rest/actionGET, POST, OPTIONSsessionId, accessId, name

Workbench Action

This REST call allows you to execute actions saved in a workbench using a REST call. This done by using the name of the folder which has the required action attached to it.

This call can trigger the following actions:

  • RPC Actions
  • SimpleQueryAction
  • PrototypeQueryAction
  • TemplateQueryAction
  • SimpleInstantiationAction
  • TemplateInstantiationAction

URL Syntax

https://TRIBEFIRE_SERVER:PORT_NUMBER/tribefire-services/rest/action?PARAMETERS

Parameters

NameDescriptionRequired
sessionIdThe valid session that grants the call access to tribefire.Yes
accessIdThe access through which the REST can gain access to the needed workbench access.Yes
nameThe name of the folder, as defined by the folder's name property, to which the folder content belongs. The folder content is the action which provides the information returned.Yes
*Variable_NameThe name of a variable, if required by the action. To use this parameter enter the name of the variable with an asterisk in front and then its value: &*VariableName=VariableValue. In the case of a workbench action operation, this parameter could be required to define the value variables in a Template Query Action, or to provide new values for an entity instantiated using either the Simple Query Action or Template Instantiation Action, for example.No

Projections

RPC Actions
NameDescription
envelopeReturns a RpcResponse
payloadReturns the ReturnValue property of the RpcResponse object
Query Actions
NameDescription
envelopeReturns the object responsible for handling the query results.
payload(Default) Returns the entities that are matched by the simple query action.
first-of-payloadReturns the first element of the payload projection.
Instantiation Actions
NameDescription
envelopeReturns the manipulation response that is responsible for the instantiation of the new entity.
payloadReturns the ChangeValueManipulation that is responsible for creating the new entity.
idReturns the id property of the newly instantiated entity.
entityReturns the newly instantiated entity.

Example

In this example we are using a folder called persons which has a Simple Query Action assigned as its content. This executes a simple query based on the entity Person in the Demo Access. There are three required properties for this call: sessionId, accessId and name.

Call:

POST
http://localhost:8080/tribefire-services/rest/action?sessionId=yourSessionId&accessId=access.demo&name=persons

Response:

[
    {
        "_type": "tribefire.demo.model.data.Person",
        "_id": "0",
        "firstName": "James",
        "gender": {
            "value": "male",
            "_type": "tribefire.demo.model.data.Gender"
        },
        "id": {
            "value": "36",
            "_type": "long"
        },
        "lastName": "Doe",
        "partition": "access.demo",
        "ssn": "444"
    },
    {
        "_type": "tribefire.demo.model.data.Person",
        "_id": "1",
        "firstName": "Sue",
        "gender": {
            "value": "female",
            "_type": "tribefire.demo.model.data.Gender"
        },
        "id": {
            "value": "31",
            "_type": "long"
        },
        "lastName": "Doe",
        "partition": "access.demo",
        "ssn": "333"
    },
    {
        "_type": "tribefire.demo.model.data.Person",
        "_id": "2",
        "anything": 1,
        "firstName": "John",
        "gender": {
            "value": "male",
            "_type": "tribefire.demo.model.data.Gender"
        },
        "id": {
            "value": "21",
            "_type": "long"
        },
        "lastName": "Doe",
        "partition": "access.demo",
        "ssn": "111"
    },
    {
        "_type": "tribefire.demo.model.data.Person",
        "_id": "3",
        "firstName": "J.J.",
        "gender": {
            "value": "male",
            "_type": "tribefire.demo.model.data.Gender"
        },
        "id": {
            "value": "41",
            "_type": "long"
        },
        "lastName": "Doe",
        "partition": "access.demo",
        "ssn": "555"
    },
    {
        "_type": "tribefire.demo.model.data.Person",
        "_id": "4",
        "firstName": "Mary",
        "gender": {
            "value": "female",
            "_type": "tribefire.demo.model.data.Gender"
        },
        "id": {
            "value": "46",
            "_type": "long"
        },
        "lastName": "Doe",
        "partition": "access.demo",
        "ssn": "666"
    },
    {
        "_type": "tribefire.demo.model.data.Person",
        "_id": "5",
        "anything": "MyTest",
        "firstName": "Jane",
        "gender": {
            "value": "female",
            "_type": "tribefire.demo.model.data.Gender"
        },
        "id": {
            "value": "26",
            "_type": "long"
        },
        "lastName": "Doe",
        "partition": "access.demo",
        "ssn": "222"
    }
]

If you don't know what is the name of a particular action, switch to the workbench access and search for the name of the folder as its displayed in the access.