1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

update swagger specs

This commit is contained in:
Matthias Kretschmann 2018-11-30 17:35:59 +01:00
parent b0852d2754
commit 8f3c109602
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 695 additions and 695 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,196 +5,196 @@
}, },
"host":"myfancybrizo.com", "host":"myfancybrizo.com",
"info":{ "info":{
"description":"Brizo is the technical component executed by Publishers allowing them to provide extended data services. When running with our Docker images, it is exposed under `http://localhost:8030`.", "description":"Brizo is the technical component executed by Publishers allowing them to provide extended data services. When running with our Docker images, it is exposed under `http://localhost:8030`.",
"title":"Brizo", "title":"Brizo",
"version":"0.1.2" "version":"0.1.2"
}, },
"paths":{ "paths":{
"/api/v1/brizo/services/access/initialize":{ "/api/v1/brizo/services/access/initialize":{
"post":{ "post":{
"consumes":[ "consumes":[
"application/json" "application/json"
], ],
"description":"", "description":"",
"parameters":[ "parameters":[
{ {
"description":"Service agreement initialization.", "description":"Service agreement initialization.",
"in":"body", "in":"body",
"name":"body", "name":"body",
"required":true, "required":true,
"schema":{ "schema":{
"properties":{ "properties":{
"consumerAddress":{ "consumerAddress":{
"description":"Consumer address.", "description":"Consumer address.",
"example":"0x00a329c0648769A73afAc7F9381E08FB43dBEA72", "example":"0x00a329c0648769A73afAc7F9381E08FB43dBEA72",
"type":"string" "type":"string"
}, },
"did":{ "did":{
"description":"Identifier of the asset registered in ocean.", "description":"Identifier of the asset registered in ocean.",
"example":"did:op:08a429b8529856d59867503f8056903a680935a76950bb9649785cc97869a43d", "example":"did:op:08a429b8529856d59867503f8056903a680935a76950bb9649785cc97869a43d",
"type":"string" "type":"string"
}, },
"serviceAgreementId":{ "serviceAgreementId":{
"description":"Identifier of the service agreement.", "description":"Identifier of the service agreement.",
"example":"bb23s87856d59867503f80a690357406857698570b964ac8dcc9d86da4ada010", "example":"bb23s87856d59867503f80a690357406857698570b964ac8dcc9d86da4ada010",
"type":"string" "type":"string"
}, },
"serviceDefinitionId":{ "serviceDefinitionId":{
"description":"Identifier of the service definition.", "description":"Identifier of the service definition.",
"example":"0", "example":"0",
"type":"string" "type":"string"
}, },
"signature":{ "signature":{
"description":"Signature", "description":"Signature",
"example":"cade376598342cdae231321a0097876aeda656a567a67c6767fd8710129a9dc1", "example":"cade376598342cdae231321a0097876aeda656a567a67c6767fd8710129a9dc1",
"type":"string" "type":"string"
} }
},
"required":[
"did",
"serviceAgreementId",
"serviceDefinitionId",
"signature",
{
"consumerAddress":null
}
],
"type":"object"
}
}
],
"responses":{
"201":{
"description":"Service agreement successfully initialized."
}, },
"required":[ "400":{
"did", "description":"One of the required attributes is missing."
"serviceAgreementId",
"serviceDefinitionId",
"signature",
{
"consumerAddress":null
}
],
"type":"object"
}
}
],
"responses":{
"201":{
"description":"Service agreement initialize successfully."
},
"400":{
"description":"One of the required attributes is missed."
},
"404":{
"description":"Invalid signature."
},
"500":{
"description":"Error"
}
},
"summary":"Initialize the SLA between the puvblisher and the consumer.",
"tags":[
"services"
]
}
},
"/api/v1/brizo/services/compute":{
"post":{
"consumes":[
"application/json"
],
"description":"<br/><br/>If the publisher of the assets<br/>provide this service in the Service agreement related with the asset_did requested.<br/>",
"parameters":[
{
"description":"Asset metadata.",
"in":"body",
"name":"body",
"required":true,
"schema":{
"properties":{
"algorithm_did":{
"description":"Identifier of the algorithm to execute",
"example":"0x0234242345",
"type":"string"
},
"asset_did":{
"description":"Identifier of the asset registered in ocean",
"example":"0x0234242345",
"type":"string"
},
"consumer_wallet":{
"description":"Address of the wallet of the consumer of the asset. Ex. data-science...",
"example":"0x0234242345",
"type":"string"
},
"cpu":{
"description":"Number of cpus to execute the algorithm.",
"example":1,
"type":"integer"
},
"docker_image":{
"description":"Docker image where the algorithm is going to be executed. It must include all the libraries needs to run it.",
"example":"python:3.6-alpine",
"type":"string"
},
"memory":{
"description":"Ammout of memory in Gb to run the algorithm",
"example":1.5,
"type":"number"
}
}, },
"required":[ "404":{
"asset_did", "description":"Invalid signature."
"algorithm_did", },
"consumer_wallet" "500":{
], "description":"Error"
"type":"object" }
} },
} "summary":"Initialize the SLA between the publisher and the consumer.",
], "tags":[
"responses":{ "services"
]
}
},
"/api/v1/brizo/services/compute":{
"post":{
"consumes":[
"application/json"
],
"description":"",
"parameters":[
{
"description":"Asset metadata.",
"in":"body",
"name":"body",
"required":true,
"schema":{
"properties":{
"algorithm_did":{
"description":"Identifier of the algorithm to execute",
"example":"0x0234242345",
"type":"string"
},
"asset_did":{
"description":"Identifier of the asset registered in Ocean",
"example":"0x0234242345",
"type":"string"
},
"consumer_wallet":{
"description":"Address of the wallet of the asset consumer. Ex. data-science...",
"example":"0x0234242345",
"type":"string"
},
"cpu":{
"description":"Number of CPUs to execute the algorithm.",
"example":1,
"type":"integer"
},
"docker_image":{
"description":"Docker image where the algorithm is going to be executed. Docker image must include all the libraries needed to run it.",
"example":"python:3.6-alpine",
"type":"string"
},
"memory":{
"description":"Ammout of memory in GB to run the algorithm",
"example":1.5,
"type":"number"
}
},
"required":[
"asset_did",
"algorithm_did",
"consumer_wallet"
],
"type":"object"
}
}
],
"responses":{
}, },
"summary":"Allows to execute an algorithm inside in a docker instance in the cloud aquarius.", "summary":"Allows to execute an algorithm inside a Docker instance in the cloud. Requires the publisher of the assets to provide this service in the service agreement related with the requested `asset_did`.",
"tags":[ "tags":[
"services" "services"
] ]
} }
}, },
"/api/v1/brizo/services/consume":{ "/api/v1/brizo/services/consume":{
"get":{ "get":{
"consumes":[ "consumes":[
"application/json" "application/json"
], ],
"description":"", "description":"",
"parameters":[ "parameters":[
{ {
"description":"The consumer address.", "description":"The consumer address.",
"in":"query", "in":"query",
"name":"consumerAddress", "name":"consumerAddress",
"required":true, "required":true,
"type":"string" "type":"string"
}, },
{ {
"description":"The service agreement id.", "description":"The ID of the service agreement.",
"in":"query", "in":"query",
"name":"serviceAgreementId", "name":"serviceAgreementId",
"required":true, "required":true,
"type":"string" "type":"string"
}, },
{ {
"description":"This URL is only valid if BRIZO acts as a proxy. Consumer can't download using the URL if it's not through Brizo.", "description":"This URL is only valid if Brizo acts as a proxy. Consumer can't download using the URL if it's not through Brizo.",
"in":"query", "in":"query",
"name":"url", "name":"url",
"required":true, "required":true,
"type":"string" "type":"string"
} }
], ],
"responses":{ "responses":{
"302":{ "302":{
"description":"Redirect to valid asset url." "description":"Redirect to valid asset url."
}, },
"400":{ "400":{
"description":"One of the required attributes is missed." "description":"One of the required attributes is missing."
}, },
"404":{ "404":{
"description":"Invalid asset data." "description":"Invalid asset data."
}, },
"500":{ "500":{
"description":"Error" "description":"Error"
} }
}, },
"summary":"Allows download of asset data file.", "summary":"Allows download of asset data file.",
"tags":[ "tags":[
"services" "services"
] ]
} }
} }
}, },
"swagger":"2.0" "swagger":"2.0"
} }