Computes

The Computes Developer Hub

Welcome to the Computes developer hub. You'll find comprehensive guides and documentation to help you start working with Computes as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

Get Queue

Get the queue data

 
gethttp://localhost:8189/v1/queue
GET /v1/queue HTTP/1.1
Host: localhost:8189
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8
A binary file was returned

You couldn't be authenticated

{
  "assigned": [
    "zdpuAqXePhzwAj8rrHxwnJgRKzv7JDTBQ2S25TmXMQW2sVhbG",
    "zdpuAqxeZZBcwiUuAQjRSkKNPKs7gYYAs4AR3ApdRX5R3AJsc",
    "zdpuAzFWVCfbHZzgCuHFS1MTmuU8GzZaEXQuD5B3bPXtFR7rn",
    "zdpuAtK5XBHsGVKcXoiyAaecEwWe7UTHpcf3zEH6kXNYGzKUc"
  ],
  "available": [
    "zdpuAqxeZZBcwiUuAQjRSkKNPKs7gYYAs4AR3ApdRX5R3AJsc",
    "zdpuAqXePhzwAj8rrHxwnJgRKzv7JDTBQ2S25TmXMQW2sVhbG",
    "zdpuAzFWVCfbHZzgCuHFS1MTmuU8GzZaEXQuD5B3bPXtFR7rn",
    "zdpuAtK5XBHsGVKcXoiyAaecEwWe7UTHpcf3zEH6kXNYGzKUc"
  ],
  "completed": [
    "zdpuAtK5XBHsGVKcXoiyAaecEwWe7UTHpcf3zEH6kXNYGzKUc",
    "zdpuAqXePhzwAj8rrHxwnJgRKzv7JDTBQ2S25TmXMQW2sVhbG",
    "zdpuAqxeZZBcwiUuAQjRSkKNPKs7gYYAs4AR3ApdRX5R3AJsc",
    "zdpuAzFWVCfbHZzgCuHFS1MTmuU8GzZaEXQuD5B3bPXtFR7rn"
  ],
  "uuid": "69A57DBC-26A0-45A9-AC1A-B64E24417216"
}
 
Suggest Edits

Enqueue Task

 
puthttp://localhost:8189/v1/tasks/id
PUT /v1/tasks/zdpuAqxeZZBcwiUuAQjRSkKNPKs7gYYAs4AR3ApdRX5R3AJsc HTTP/1.1
Host: localhost:8189
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8
A binary file was returned

You couldn't be authenticated

No response examples available

Path Params

id
string
required

Task IPFS CID

 
Suggest Edits

Task Status

Get Task Status Dataset

 
gethttp://localhost:8189/v1/task/id
GET /v1/task/zdpuAqxeZZBcwiUuAQjRSkKNPKs7gYYAs4AR3ApdRX5R3AJsc HTTP/1.1
Host: localhost:8189
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8
A binary file was returned

You couldn't be authenticated

{
  "taskEvents": {
    "tasks": [
      "zdpuAqxeZZBcwiUuAQjRSkKNPKs7gYYAs4AR3ApdRX5R3AJsc"
    ]
  },
  "taskManager": {
    "execute": [
      {
        "hostname": "skynet.lan",
        "timestamp": "2018-01-22T22:39:13-07:00"
      }
    ],
    "return": [
      {
        "hostname": "skynet.lan",
        "timestamp": "2018-01-22T22:39:21-07:00"
      }
    ]
  },
  "taskSet": {
    "assigned": [
      {
        "hostname": "skynet.lan",
        "timestamp": "2018-01-22T22:39:13-07:00"
      }
    ],
    "available": [
      {
        "hostname": "skynet.lan",
        "timestamp": "2018-01-23T14:16:55-07:00"
      }
    ],
    "completed": [
      {
        "hostname": "skynet.lan",
        "timestamp": "2018-01-22T22:39:22-07:00"
      }
    ]
  },
  "uuid": "06784C55-80C5-4E19-B201-1A92012F2E9D"
}

Path Params

id
string
required

Task IPFS CID

 
Suggest Edits

Create Dataset

 
posthttp://localhost:8189/v1/datasets
POST /v1/datasets?uuid=A109BF19-C873-43DC-858D-5C4D6C7302CC HTTP/1.1
Host: localhost:8189
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8
A binary file was returned

You couldn't be authenticated

"zdpuB1wcCyB24mSPitfs4ArnLDUqeFggSyDaSSUg1rrLpDyBS"

Query Params

uuid
string

Seed value for the dataset

 
Suggest Edits

Get Dataset

Get a specific version of the database

 
gethttp://localhost:8189/v1/datasets/id
GET /v1/datasets/zdpuAxC1mnb6USNY8psFA2fowsDrngsFNefMx42TX9ZDjLvVr HTTP/1.1
Host: localhost:8189
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8
A binary file was returned

You couldn't be authenticated

{
  "split": {
    "input": 3
  }
}

Path Params

id
string
required

The dataset hash

 
Suggest Edits

Get Latest Dataset

Get the latest version of an origin dataset hash

 
gethttp://localhost:8189/v1/datasets/id/latest
GET /v1/datasets/zdpuAxC1mnb6USNY8psFA2fowsDrngsFNefMx42TX9ZDjLvVr/latest HTTP/1.1
Host: localhost:8189
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8
A binary file was returned

You couldn't be authenticated

{
  "map": {
    "results": [
      1,
      2,
      1
    ]
  },
  "split": {
    "input": 3,
    "results": [
      1,
      2,
      3
    ]
  },
  "taskEvents": {
    "tasks": [
      "zdpuAtK5XBHsGVKcXoiyAaecEwWe7UTHpcf3zEH6kXNYGzKUc",
      "zdpuAzFWVCfbHZzgCuHFS1MTmuU8GzZaEXQuD5B3bPXtFR7rn",
      "zdpuAqXePhzwAj8rrHxwnJgRKzv7JDTBQ2S25TmXMQW2sVhbG",
      "zdpuAqxeZZBcwiUuAQjRSkKNPKs7gYYAs4AR3ApdRX5R3AJsc"
    ]
  }
}

Path Params

id
string
required

The origin dataset hash

 
Suggest Edits

Get Latest Hash Pointer

Get the latest hash pointer from an origin hash

 
gethttp://localhost:8189/v1/hpcp/id
GET /v1/hpcp/zdpuAxC1mnb6USNY8psFA2fowsDrngsFNefMx42TX9ZDjLvVr HTTP/1.1
Host: localhost:8189
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8
A binary file was returned

You couldn't be authenticated

"zdpuAkw2YXyvH7ZjahsHe1Q55M7eU84xB6rUA2CYZbiypRrto"

Path Params

id
string
required

the origin hash

 
Suggest Edits

Dataset Changed

 

Receives the latest Hash using the Hash Pointer Collaboration Protocol.

The messages are published to {COMPUTES_NAMESPACE}:computes:hpcp:{ORIGIN_HASH}.

ipfs pubsub sub namespace:computes:hpcp:originHash
> zdpuAkw2YXyvH7ZjahsHe1Q55M7eU84xB6rUA2CYZbiypRrto