Agent HTTP API

Overview

Version information

Version : 0.18.3

Paths

GET /

Description

Displays information about this agent.

Responses

HTTP Code Description Schema
200 Agent Info Response 200

Response 200

Name Schema
processes
optional
< string, Process > map

GET /processes

Description

Returns a list of the processes handled by this agent.

Responses

HTTP Code Description Schema
200 Process list < Process > array

GET /{process}/remove

Description

Removes a process from an agent.

Parameters

Type Name Description Schema
Path process
required
Name of the process to be removed string

Responses

HTTP Code Description Schema
200 Process removed < Process > array
404 Process not found No Content

POST /{process}/segments

Description

Creates a new map for a process.

Parameters

Type Name Description Schema
Path process
required
Name of the process string
Body arguments
optional
Parameters that should be passed on to the init action object

Responses

HTTP Code Description Schema
200 Map created Segment
404 Process not found No Content

GET /{process}/segments

Description

Finds the segments that match the given filter.

Parameters

Type Name Description Schema
Path process
required
Name of the process string
Query limit
optional
Limit number of returned segments integer
Query linkHashes
optional
Return segments that match one of the linkHashes < string > array
Query mapIds
optional
Return segments with specified map ID < string > array
Query offset
optional
Offset of first returned segment integer
Query prevLinkHash
optional
Return segments with specified previous link hash string
Query tags
optional
Return segments that contain all the tags < string > array

Responses

HTTP Code Description Schema
200 Segments < Segment > array
404 Process not found No Content

GET /{process}/segments/{linkHash}

Description

Returns the segment with the given linkHash.

Parameters

Type Name Description Schema
Path linkHash
required
linkHash of the parent of the new Segment string
Path process
required
Name of the process string

Responses

HTTP Code Description Schema
200 Segment Segment
404 Segment not found or Process not found No Content

POST /{process}/segments/{linkHash}/{action}

Description

Creates a new segment in a process.

Parameters

Type Name Description Schema
Path action
required
Name of the action that will be executed string
Path linkHash
required
linkHash of the parent of the new Segment string
Path process
required
Name of the process string
Body arguments
optional
Parameters that should be passed on to the action object

Responses

HTTP Code Description Schema
200 Segment created Segment
403 Action fordidden by a filter No Content
404 Process not found or parent Segment not found No Content

POST /{process}/upload

Description

Dynamically uploads a new process to a running agent. This endpoint is only available when the agent is started with enableProcessUpload to true.

Parameters

Type Name Schema
Path process
required
string
Body process
required
process

process

Name Description Schema
fossilizers
optional
List of fossilizers that should be used < fossilizers > array
plugins
optional
List of plugins that should be used < plugins > array
store
optional
Store used to save Segment of this process store

fossilizers

Name Schema
url
optional
string

plugins

Name Schema
id
optional
string

store

Name Schema
url
optional
string

Responses

HTTP Code Description Schema
200 Process created < Process > array
400 Process already exists or actions are empty No Content

Definitions

Evidence

Name Description Schema
backend
optional
Type of the evidence (Bitcoin, Tendermint, …) string
proof
optional
Actual, objectively verifiable, proof of existence of the Segment object
provider
optional
Origin of the evidence (Chain, Identifier of the third-party…) string
state
optional
Current state of the evidence (Pending or Complete) string

Process

Name Description Schema
fossilizersInfo
optional
Information about the fossilizer that will be used for the segments created by this process < object > array
name
optional
Name of the Process string
processInfo
optional
processInfo
storeInfo
optional
Information about the store that will be used for the segments created by this process object

processInfo

Name Description Schema
actions
optional
A map of all available actions in this process along with their arguments object
pluginsInfo
optional
List of the plugins that have been activated for this process < pluginsInfo > array

pluginsInfo

Name Schema
description
optional
string
name
optional
string

Segment

Name Schema
link
required
link
meta
required
meta

link

Name Description Schema
meta
required
Metadata about the state object
state
required
Functional variables object

meta

Name Description Schema
evidences
required
List of evidences that proves the existence of this segment < Evidence > array
linkHash
required
Identifier of this segment. Computed as the hash of its link. string