Market 2.0 API

OpenAPI spec of Market 2.0 API.

List of supported DDO contracts

get

List of supported DDO contracts

Responses
200
OK - Success
application/json
Responsestring
get
GET /contracts HTTP/1.1
Host: 
Accept: */*
text

List of supported products

get

List of supported products

Responses
200
OK - Success
application/json
Responsestring
get
GET /products HTTP/1.1
Host: 
Accept: */*
text

List of supported dats sources

get

List of supported data sources

Responses
200
OK - Success
application/json
Responsestring
get
GET /sources HTTP/1.1
Host: 
Accept: */*
text

List of supported DDO contracts

get

List of supported DDO contracts

Path parameters
idstringRequired

id

Responses
200
OK - Success
application/json
Responsestring
get
GET /status/{id} HTTP/1.1
Host: 
Accept: */*
text

Make a mk20 deal

post

Make a mk20 deal

Body
clientall ofOptional

Client wallet for the deal

objectOptional
dataall ofOptional

Data represents the source of piece data and associated metadata.

identifierinteger[]Optional

Identifier represents a unique identifier for the deal in UUID format.

productsall ofOptional

Products represents a collection of product-specific information associated with a deal

Responses
200
Ok represents a successful operation with an HTTP status code of 200
application/json
Responseinteger · enumPossible values:
post
POST /store HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 775

{
  "client": {},
  "data": {
    "format": {
      "aggregate": "[Circular Reference]",
      "car": {},
      "raw": {}
    },
    "piece_cid": {},
    "source_aggregate": {
      "pieces": [
        "[Circular Reference]"
      ]
    },
    "source_http": {
      "urls": [
        {
          "fallback": true,
          "headers": {
            "ANY_ADDITIONAL_PROPERTY": [
              "text"
            ]
          },
          "priority": 1,
          "url": "text"
        }
      ]
    },
    "source_httpput": {},
    "source_offline": {}
  },
  "identifier": [
    1
  ],
  "products": {
    "ddo_v1": {
      "allocation_id": 0,
      "contract_address": "text",
      "contract_verify_method": "text",
      "contract_verify_method_params": [
        1
      ],
      "duration": 1,
      "notification_address": "text",
      "notification_payload": [
        1
      ],
      "piece_manager": {},
      "provider": {}
    },
    "pdp_v1": {
      "add_root": true,
      "create_proof_set": true,
      "delete_proof_set": true,
      "delete_root": true,
      "extra_data": [
        1
      ],
      "proof_set_id": 1
    },
    "retrieval_v1": {
      "announce_payload": true,
      "announce_piece": true,
      "indexing": true
    }
  }
}
200

Update the deal details of existing deals.

get

Useful for adding adding additional products and updating PoRep duration

Path parameters
idstringRequired

id

Body
clientall ofOptional

Client wallet for the deal

objectOptional
dataall ofOptional

Data represents the source of piece data and associated metadata.

identifierinteger[]Optional

Identifier represents a unique identifier for the deal in UUID format.

productsall ofOptional

Products represents a collection of product-specific information associated with a deal

Responses
200
Ok represents a successful operation with an HTTP status code of 200
application/json
Responseinteger · enumPossible values:
get
GET /update/{id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 775

{
  "client": {},
  "data": {
    "format": {
      "aggregate": "[Circular Reference]",
      "car": {},
      "raw": {}
    },
    "piece_cid": {},
    "source_aggregate": {
      "pieces": [
        "[Circular Reference]"
      ]
    },
    "source_http": {
      "urls": [
        {
          "fallback": true,
          "headers": {
            "ANY_ADDITIONAL_PROPERTY": [
              "text"
            ]
          },
          "priority": 1,
          "url": "text"
        }
      ]
    },
    "source_httpput": {},
    "source_offline": {}
  },
  "identifier": [
    1
  ],
  "products": {
    "ddo_v1": {
      "allocation_id": 0,
      "contract_address": "text",
      "contract_verify_method": "text",
      "contract_verify_method_params": [
        1
      ],
      "duration": 1,
      "notification_address": "text",
      "notification_payload": [
        1
      ],
      "piece_manager": {},
      "provider": {}
    },
    "pdp_v1": {
      "add_root": true,
      "create_proof_set": true,
      "delete_proof_set": true,
      "delete_root": true,
      "extra_data": [
        1
      ],
      "proof_set_id": 1
    },
    "retrieval_v1": {
      "announce_payload": true,
      "announce_piece": true,
      "indexing": true
    }
  }
}
200

Finalizes the upload process

post

Finalizes the upload process once all the chunks are uploaded.

Path parameters
idstringRequired

id

Body
clientall ofOptional

Client wallet for the deal

objectOptional
dataall ofOptional

Data represents the source of piece data and associated metadata.

identifierinteger[]Optional

Identifier represents a unique identifier for the deal in UUID format.

productsall ofOptional

Products represents a collection of product-specific information associated with a deal

Responses
200
Ok represents a successful operation with an HTTP status code of 200
application/json
Responseinteger · enumPossible values:
post
POST /upload/finalize/{id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 775

{
  "client": {},
  "data": {
    "format": {
      "aggregate": "[Circular Reference]",
      "car": {},
      "raw": {}
    },
    "piece_cid": {},
    "source_aggregate": {
      "pieces": [
        "[Circular Reference]"
      ]
    },
    "source_http": {
      "urls": [
        {
          "fallback": true,
          "headers": {
            "ANY_ADDITIONAL_PROPERTY": [
              "text"
            ]
          },
          "priority": 1,
          "url": "text"
        }
      ]
    },
    "source_httpput": {},
    "source_offline": {}
  },
  "identifier": [
    1
  ],
  "products": {
    "ddo_v1": {
      "allocation_id": 0,
      "contract_address": "text",
      "contract_verify_method": "text",
      "contract_verify_method_params": [
        1
      ],
      "duration": 1,
      "notification_address": "text",
      "notification_payload": [
        1
      ],
      "piece_manager": {},
      "provider": {}
    },
    "pdp_v1": {
      "add_root": true,
      "create_proof_set": true,
      "delete_proof_set": true,
      "delete_root": true,
      "extra_data": [
        1
      ],
      "proof_set_id": 1
    },
    "retrieval_v1": {
      "announce_payload": true,
      "announce_piece": true,
      "indexing": true
    }
  }
}
200

Status of deal upload

get

Return a json struct detailing the current status of a deal upload.

Path parameters
idstringRequired

id

Responses
200
UploadStatusCodeOk represents a successful upload operation with status code 200
application/json
Responseinteger · enumPossible values:
get
GET /upload/{id} HTTP/1.1
Host: 
Accept: */*
200

Starts the upload process

post

Initializes the upload for a deal. Each upload must be initialized before chunks can be uploaded for a deal.

Path parameters
idstringRequired

id

Responses
200
UploadStartCodeOk indicates a successful upload start request with status code 200
application/json
Responseinteger · enumPossible values:
post
POST /upload/{id} HTTP/1.1
Host: 
Accept: */*
200

Upload a file chunk

put

Allows uploading chunks for a deal file. Method can be called in parallel to speed up uploads.

Path parameters
idstringRequired

id

chunkNumstringRequired

chunkNum

Bodyinteger[]
integer[]Optional
Responses
200
UploadOk indicates a successful upload operation, represented by the HTTP status code 200
application/json
Responseinteger · enumPossible values:
put
PUT /upload/{id}/{chunkNum} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 3

[
  1
]
200

Last updated