FeatureCloud App Developer API (1.1.0)

Download OpenAPI specification:Download

This is a sample client of a federated computation in FeatureCloud.

setup

When the participants are ready to start the federated execution, the platform will send the /setup request. This is the starting point of the federated execution, the app can use it as a trigger to start the computation based on it's local data. In this call, each participant gets an id, an array of the participating clients and the information if they are the coordinator.

Setup the local client and trigger start of local execution

Request Body schema: application/json

Setup object

id
required
string
coordinator
required
boolean
clients
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "coordinator": true,
  • "clients": [
    ]
}

status

With the response to this request the federated app reports its current /status. It is frequently sent and indicates if there is data available to be transferred to the coordinator (from participant), data to be broadcasted to the participants (from coordinator) or if the execution of the app is finished. Furthermore, it supports a message that is shown to the user, an estimation of the current progress and the state of the execution. If available has been set to true, a consecutive GET /data call is triggered, fetching the data. If finished has been set to true at the coordinator instance, all containers of the workflow are shut down.

Status of the local client

Responses

Response samples

Content type
application/json
{
  • "available": false,
  • "finished": false,
  • "message": "Computing local parameters",
  • "progress": 0.1,
  • "state": "running",
  • "destination": 1,
  • "smpc": {
    }
}

data

Exchange /data between clients and coordinator. The platform reads the data and redirects in the following way, depending on the sender. If the data is coming from a participant, it will be sent to the coordinator. If the data is coming from a coordinator, it will be broadcast to all other participants.

Receive data from coordinator or other clients

Responses

Response samples

Content type
application/octet-stream
{
  "1": null,
  "2": null,
  "3": null,
  "4": null,
  "5": null
}

Send data to coordinator or broadcast data from coordinator to other clients

Request Body schema: application/octet-stream

Data object

string <binary>

Responses

Request samples

Content type
application/octet-stream
{
  "1": null,
  "2": null,
  "3": null,
  "4": null,
  "5": null
}