POST /definitions/processes/:definitionId
Description
Start a process using a specified process definition.
It returns the state of the newly created process.
Resource URL
https://api.playlyfe.com/definitions/processes/:definitionId
Method
POST
Scopes
player, game, debug
Parameters
Location | Parameter Name | Default Value | Description |
---|---|---|---|
Query | definitionId | The process definition ID from which the process will be created | |
Request Body | id | auto generated | The ID of the newly created process instance |
Request Body | access | strictest access setting allowed by the definition | The access setting of the process instance. It can be either public , protected or private |
Example
Request
POST https://api.playlyfe.com/definitions/processes/rule { "id": "process1", "access": "private" }
Response
{ "id": "morpheus/53134988a747879d2d5b287e", "definition": "destroy_evil", "state": "ACTIVE", "version": "51ee6b5b0b13c87f5d036ab2c9d552df", "created": "2014-03-02T15:08:56.934Z", "name": "The Matrix", "access": "PRIVATE", "performers": { "morpheus": { "*": "owner" } }, "collaborators": {}, "keys": { "morpheus/53134988a747879d2d5b287e": "destroy_evil" }, "containers": { "destroy_evil": { "key": "morpheus/53134988a747879d2d5b287e", "tokens": 1, "nodes": { "choose_your_path": { "enabled": true, "routes": { "try_to_save_the_world": false, "destroy_the_world": false, "let_it_burn": false }, "tokens": 1 } } } } }