DEC Documentation

Logo

Decentralized Ecosystem Cooperation

View the Project on GitHub dececo/docs

OpenTask Engine API

服务调用地址

目前服务处于开发调试阶段,调用地址是 http://opentask.api.chainpower.io:8080

GetAllPublished

列出发布的所有任务。

Parameters

Returns

Example

// Request
curl -s -X POST --data '{"jsonrpc":"2.0","method":"GetAllPublished","params":[0, 5],"id":"11"}' 'http://opentask.api.chainpower.io:8080/v1/' | jq .
// Result
{
  "id": "11",
  "jsonrpc": "2.0",
  "result": [
    {
      "Block": 0,
      "Tx": "",
      "Mission": "1",
      "Reward": 100,
      "Publisher": "",
      "Solutions": null
    },
    {
      "Block": 0,
      "Tx": "",
      "Mission": "m1",
      "Reward": 101,
      "Publisher": "",
      "Solutions": [
        {
          "Block": 0,
          "Tx": "",
          "Solution": "m1s1",
          "Mission": "m1",
          "Data": "i solved m1",
          "Solver": "",
          "Status": "accept",
          "Process": {
            "Block": 0,
            "Tx": "",
            "Solution": "m1s1",
            "Time": "2019-02-13 03:07:03",
            "Status": "accept"
          }
        }
      ]
    },
    {
      "Block": 0,
      "Tx": "",
      "Mission": "m2",
      "Reward": 102,
      "Publisher": "",
      "Solutions": [
        {
          "Block": 0,
          "Tx": "",
          "Solution": "m2s1",
          "Mission": "m2",
          "Data": "i solved m2",
          "Solver": "",
          "Status": "reject",
          "Process": {
            "Block": 0,
            "Tx": "",
            "Solution": "m2s1",
            "Time": "2019-02-13 03:07:03",
            "Status": "reject"
          }
        },
        {
          "Block": 0,
          "Tx": "",
          "Solution": "m2s2",
          "Mission": "m2",
          "Data": "i solved m2 too",
          "Solver": "",
          "Status": "accept",
          "Process": {
            "Block": 0,
            "Tx": "",
            "Solution": "m2s2",
            "Time": "2019-02-13 03:07:03",
            "Status": "accept"
          }
        }
      ]
    },
    {
      "Block": 0,
      "Tx": "",
      "Mission": "m2",
      "Reward": 102,
      "Publisher": "",
      "Solutions": null
    },
    {
      "Block": 0,
      "Tx": "",
      "Mission": "m3",
      "Reward": 103,
      "Publisher": "",
      "Solutions": [
        {
          "Block": 0,
          "Tx": "",
          "Solution": "m3s1",
          "Mission": "m3",
          "Data": "i solved m3",
          "Solver": "",
          "Status": "reject",
          "Process": {
            "Block": 0,
            "Tx": "",
            "Solution": "m3s1",
            "Time": "2019-02-13 03:07:03",
            "Status": "reject"
          }
        },
        {
          "Block": 0,
          "Tx": "",
          "Solution": "m3s2",
          "Mission": "m3",
          "Data": "i solved m3 too",
          "Solver": "",
          "Status": "reject",
          "Process": {
            "Block": 0,
            "Tx": "",
            "Solution": "m3s2",
            "Time": "2019-02-13 03:07:03",
            "Status": "reject"
          }
        }
      ]
    }
  ]
}