diff --git a/data/aquarius.json b/data/aquarius.json index a8aaacf9..d0f14b21 100644 --- a/data/aquarius.json +++ b/data/aquarius.json @@ -5,528 +5,528 @@ }, "host":"myfancyaquarius.com", "info":{ - "description":"Aquarius provides an off-chain database store for metadata about data assets. When running with our Docker images, it is exposed under `http://localhost:5000`.", - "title":"Aquarius", - "version":"0.1.4" + "description":"Aquarius provides an off-chain database store for metadata about data assets. When running with our Docker images, it is exposed under `http://localhost:5000`.", + "title":"Aquarius", + "version":"0.1.4" }, "paths":{ - "/api/v1/aquarius/assets":{ - "get":{ - "description":"", - "responses":{ - "200":{ - "description":"successful action" - } + "/api/v1/aquarius/assets":{ + "get":{ + "description":"", + "responses":{ + "200":{ + "description":"successful action" + } + }, + "summary":"Get all asset IDs.", + "tags":[ + "ddo" + ] + } + }, + "/api/v1/aquarius/assets/ddo":{ + "get":{ + "description":"", + "responses":{ + "200":{ + "description":"successful action" + } + }, + "summary":"Get DDO of all assets.", + "tags":[ + "ddo" + ] }, - "summary":"Get all asset IDs.", - "tags":[ - "ddo" - ] - } - }, - "/api/v1/aquarius/assets/ddo":{ - "get":{ - "description":"", - "responses":{ - "200":{ - "description":"successful action" - } - }, - "summary":"Get DDO of all assets.", - "tags":[ - "ddo" - ] - }, - "post":{ - "consumes":[ - "application/json" - ], - "description":"", - "parameters":[ - { - "description":"DDO of the asset.", - "in":"body", - "name":"body", - "required":true, - "schema":{ - "properties":{ - "@context":{ - "description":null, - "example":"https://w3id.org/future-method/v1", - "type":"string" - }, - "authentication":{ - "description":"List of authentication mechanisms.", - "example":[ - { - "type":"RsaSignatureAuthentication2018" - }, - { - "publicKey":"did:op:123456789abcdefghi#keys-1" - } - ], - "type":"array" - }, - "id":{ - "description":"ID of the asset.", - "example":"did:op:123456789abcdefghi", - "type":"string" - }, - "publicKey":{ - "description":"List of public keys.", - "example":[ - { - "id":"did:op:123456789abcdefghi#keys-1" - }, - { - "type":"Ed25519VerificationKey2018" - }, - { - "owner":"did:op:123456789abcdefghi" - }, - { - "publicKeyBase58":"H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" - } - ], - "type":"array" - }, - "service":{ - "description":"List of services.", - "example":[ - { - "serviceEndpoint":"http://mybrizo.org/api/v1/brizo/services/consume?pubKey=${pubKey}&serviceId={serviceId}&url={url}", - "type":"Consume" - }, - { - "serviceEndpoint":"http://mybrizo.org/api/v1/brizo/services/compute?pubKey=${pubKey}&serviceId={serviceId}&algo={algo}&container={container}", - "type":"Compute" - }, - { - "metadata":{ - "additionalInformation":{ - "structuredMarkup":[ - { - "mediaType":"application/ld+json", - "uri":"http://skos.um.es/unescothes/C01194/jsonld" - }, - { - "mediaType":"text/turtle", - "uri":"http://skos.um.es/unescothes/C01194/turtle" - } + "post":{ + "consumes":[ + "application/json" + ], + "description":"", + "parameters":[ + { + "description":"DDO of the asset.", + "in":"body", + "name":"body", + "required":true, + "schema":{ + "properties":{ + "@context":{ + "description":null, + "example":"https://w3id.org/future-method/v1", + "type":"string" + }, + "authentication":{ + "description":"List of authentication mechanisms.", + "example":[ + { + "type":"RsaSignatureAuthentication2018" + }, + { + "publicKey":"did:op:123456789abcdefghi#keys-1" + } ], - "updateFrecuency":"yearly" - }, - "base":{ - "author":"Met Office", - "compression":"zip", - "contentType":"text/csv", - "contentUrls":[ - "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip" + "type":"array" + }, + "id":{ + "description":"ID of the asset.", + "example":"did:op:123456789abcdefghi", + "type":"string" + }, + "publicKey":{ + "description":"List of public keys.", + "example":[ + { + "id":"did:op:123456789abcdefghi#keys-1" + }, + { + "type":"Ed25519VerificationKey2018" + }, + { + "owner":"did:op:123456789abcdefghi" + }, + { + "publicKeyBase58":"H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" + } ], - "copyrightHolder":"Met Office", - "dateCreated":"2012-10-10T17:00:000Z", - "description":"Weather information of UK including temperature and humidity", - "encoding":"UTF-8", - "inLanguage":"en", - "license":"CC-BY", - "links":[ - { - "sample1":"http://data.ceda.ac.uk/badc/ukcp09/data/gridded-land-obs/gridded-land-obs-daily/" - }, - { - "sample2":"http://data.ceda.ac.uk/badc/ukcp09/data/gridded-land-obs/gridded-land-obs-averages-25km/" - }, - { - "fieldsDescription":"http://data.ceda.ac.uk/badc/ukcp09/" - } + "type":"array" + }, + "service":{ + "description":"List of services.", + "example":[ + { + "serviceEndpoint":"http://mybrizo.org/api/v1/brizo/services/consume?pubKey=${pubKey}&serviceId={serviceId}&url={url}", + "type":"Consume" + }, + { + "serviceEndpoint":"http://mybrizo.org/api/v1/brizo/services/compute?pubKey=${pubKey}&serviceId={serviceId}&algo={algo}&container={container}", + "type":"Compute" + }, + { + "metadata":{ + "additionalInformation":{ + "structuredMarkup":[ + { + "mediaType":"application/ld+json", + "uri":"http://skos.um.es/unescothes/C01194/jsonld" + }, + { + "mediaType":"text/turtle", + "uri":"http://skos.um.es/unescothes/C01194/turtle" + } + ], + "updateFrecuency":"yearly" + }, + "base":{ + "author":"Met Office", + "compression":"zip", + "contentType":"text/csv", + "contentUrls":[ + "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip" + ], + "copyrightHolder":"Met Office", + "dateCreated":"2012-10-10T17:00:000Z", + "description":"Weather information of UK including temperature and humidity", + "encoding":"UTF-8", + "inLanguage":"en", + "license":"CC-BY", + "links":[ + { + "sample1":"http://data.ceda.ac.uk/badc/ukcp09/data/gridded-land-obs/gridded-land-obs-daily/" + }, + { + "sample2":"http://data.ceda.ac.uk/badc/ukcp09/data/gridded-land-obs/gridded-land-obs-averages-25km/" + }, + { + "fieldsDescription":"http://data.ceda.ac.uk/badc/ukcp09/" + } + ], + "name":"UK Weather information 2011", + "price":10, + "size":"3.1gb", + "tags":"weather, uk, 2011, temperature, humidity", + "type":"dataset", + "workExample":"423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68" + }, + "curation":{ + "numVotes":123, + "rating":0.93, + "schema":"Binary Votting" + } + }, + "serviceEndpoint":"http://myaquarius.org/api/v1/provider/assets/metadata/{did}", + "type":"Metadata" + } ], - "name":"UK Weather information 2011", - "price":10, - "size":"3.1gb", - "tags":"weather, uk, 2011, temperature, humidity", - "type":"dataset", - "workExample":"423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68" - }, - "curation":{ - "numVotes":123, - "rating":0.93, - "schema":"Binary Votting" - } - }, - "serviceEndpoint":"http://myaquarius.org/api/v1/provider/assets/metadata/{did}", - "type":"Metadata" - } - ], - "type":"array" - } + "type":"array" + } + }, + "required":[ + "@context", + "id", + "publicKey", + "authentication", + "service" + ], + "type":"object" + } + } + ], + "responses":{ + "201":{ + "description":"Asset successfully registered." }, - "required":[ - "@context", - "id", - "publicKey", - "authentication", - "service" - ], - "type":"object" - } - } - ], - "responses":{ - "201":{ - "description":"Asset successfully registered." - }, - "400":{ - "description":"One of the required attributes is missing." - }, - "404":{ - "description":"Invalid asset data." - }, - "500":{ - "description":"Error" - } - }, - "summary":"Register DDO of a new asset", - "tags":[ - "ddo" - ] - } - }, - "/api/v1/aquarius/assets/ddo/query":{ - "get":{ - "description":"", - "parameters":[ - { - "description":"ID of the asset.", - "in":"query", - "name":"text", - "required":true, - "type":"string" - }, - { - "description":"Key or list of keys to sort the result", - "example":{ - "value":1 - }, - "in":"query", - "name":"sort", - "type":"object" - }, - { - "description":"Number of records per page", - "example":100, - "in":"query", - "name":"offset", - "type":"int" - }, - { - "description":"Page showed", - "example":0, - "in":"query", - "name":"page", - "type":"int" - } - ], - "responses":{ - "200":{ - "description":"successful action" - } - }, - "summary":"Get a list of DDOs that match with the given text.", - "tags":[ - "ddo" - ] - }, - "post":{ - "consumes":[ - "application/json" - ], - "description":"", - "parameters":[ - { - "description":"Asset metadata.", - "in":"body", - "name":"body", - "required":true, - "schema":{ - "properties":{ - "offset":{ - "description":"Number of records per page", - "example":100, - "type":"int" - }, - "page":{ - "description":"Page showed", - "example":0, - "type":"int" - }, - "query":{ - "description":"Query to realize", - "example":{ + "400":{ + "description":"One of the required attributes is missing." + }, + "404":{ + "description":"Invalid asset data." + }, + "500":{ + "description":"Error" + } + }, + "summary":"Register DDO of a new asset", + "tags":[ + "ddo" + ] + } + }, + "/api/v1/aquarius/assets/ddo/query":{ + "get":{ + "description":"", + "parameters":[ + { + "description":"ID of the asset.", + "in":"query", + "name":"text", + "required":true, + "type":"string" + }, + { + "description":"Key or list of keys to sort the result", + "example":{ "value":1 - }, - "type":"string" - }, - "sort":{ - "description":"Key or list of keys to sort the result", - "example":{ - "value":1 - }, - "type":"object" - } + }, + "in":"query", + "name":"sort", + "type":"object" }, - "type":"object" - } - } - ], - "responses":{ - "200":{ - "description":"successful action" - } - }, - "summary":"Get a list of DDOs that match with the executed query.", - "tags":[ - "ddo" - ] - } - }, - "/api/v1/aquarius/assets/ddo/{did}":{ - "put":{ - "consumes":[ - "application/json" - ], - "description":"", - "parameters":[ - { - "description":"DDO of the asset.", - "in":"body", - "name":"body", - "required":true, - "schema":{ - "properties":{ - "@context":{ - "description":null, - "example":"https://w3id.org/future-method/v1", - "type":"string" - }, - "authentication":{ - "description":"List of authentication mechanisms.", - "example":[ - { - "type":"RsaSignatureAuthentication2018" - }, - { - "publicKey":"did:op:123456789abcdefghi#keys-1" - } - ], - "type":"array" - }, - "id":{ - "description":"ID of the asset.", - "example":"did:op:123456789abcdefghi", - "type":"string" - }, - "publicKey":{ - "description":"List of public keys.", - "example":[ - { - "id":"did:op:123456789abcdefghi#keys-1" - }, - { - "type":"Ed25519VerificationKey2018" - }, - { - "owner":"did:op:123456789abcdefghi" - }, - { - "publicKeyBase58":"H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" - } - ], - "type":"array" - }, - "service":{ - "description":"List of services.", - "example":[ - { - "serviceEndpoint":"http://mybrizo.org/api/v1/brizo/services/consume?pubKey=${pubKey}&serviceId={serviceId}&url={url}", - "type":"Consume" - }, - { - "serviceEndpoint":"http://mybrizo.org/api/v1/brizo/services/compute?pubKey=${pubKey}&serviceId={serviceId}&algo={algo}&container={container}", - "type":"Compute" - }, - { - "metadata":{ - "additionalInformation":{ - "structuredMarkup":[ - { - "mediaType":"application/ld+json", - "uri":"http://skos.um.es/unescothes/C01194/jsonld" - }, - { - "mediaType":"text/turtle", - "uri":"http://skos.um.es/unescothes/C01194/turtle" - } - ], - "updateFrecuency":"yearly" - }, - "base":{ - "author":"Met Office", - "compression":"zip", - "contentType":"text/csv", - "contentUrls":[ - "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip" - ], - "copyrightHolder":"Met Office", - "dateCreated":"2012-10-10T17:00:000Z", - "description":"Weather information of UK including temperature and humidity", - "encoding":"UTF-8", - "inLanguage":"en", - "license":"CC-BY", - "links":[ - { - "name":"Sample of Asset Data", - "type":"sample", - "url":"https://foo.com/sample.csv" - }, - { - "AssetID":"4d517500da0acb0d65a716f61330969334630363ce4a6a9d39691026ac7908ea", - "name":"Data Format Definition", - "type":"format" - } - ], - "name":"UK Weather information 2011", - "price":10, - "size":"3.1gb", - "tags":"weather, uk, 2011, temperature, humidity", - "type":"dataset", - "workExample":"423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68" - }, - "curation":{ - "numVotes":123, - "rating":0.93, - "schema":"Binary Voting" - } - }, - "serviceEndpoint":"http://myaquarius.org/api/v1/aquarius/assets/metadata/{did}", - "type":"Metadata" - } - ], - "type":"array" - } + { + "description":"Number of records per page", + "example":100, + "in":"query", + "name":"offset", + "type":"int" }, - "required":[ - "@context", - "id", - "publicKey", - "authentication", - "service" - ], - "type":"object" - } - } - ], - "responses":{ - "200":{ - "description":"Asset successfully updated." - }, - "201":{ - "description":"Asset successfully registered." - }, - "400":{ - "description":"One of the required attributes is missing." - }, - "404":{ - "description":"Invalid asset data." - }, - "500":{ - "description":"Error" - } + { + "description":"Page showed", + "example":0, + "in":"query", + "name":"page", + "type":"int" + } + ], + "responses":{ + "200":{ + "description":"successful action" + } + }, + "summary":"Get a list of DDOs that match with the given text.", + "tags":[ + "ddo" + ] }, - "summary":"Update DDO of an existing asset", - "tags":[ - "ddo" - ] - } - }, - "/api/v1/aquarius/assets/ddo/{id}":{ - "delete":{ - "description":"", - "parameters":[ - { - "description":"ID of the asset.", - "in":"path", - "name":"id", - "required":true, - "type":"string" - } - ], - "responses":{ - "200":{ - "description":"successfully deleted" - }, - "404":{ - "description":"This asset ID is not in OceanDB" - }, - "500":{ - "description":"Error" - } + "post":{ + "consumes":[ + "application/json" + ], + "description":"", + "parameters":[ + { + "description":"Asset metadata.", + "in":"body", + "name":"body", + "required":true, + "schema":{ + "properties":{ + "offset":{ + "description":"Number of records per page", + "example":100, + "type":"int" + }, + "page":{ + "description":"Page showed", + "example":0, + "type":"int" + }, + "query":{ + "description":"Query to realize", + "example":{ + "value":1 + }, + "type":"string" + }, + "sort":{ + "description":"Key or list of keys to sort the result", + "example":{ + "value":1 + }, + "type":"object" + } + }, + "type":"object" + } + } + ], + "responses":{ + "200":{ + "description":"successful action" + } + }, + "summary":"Get a list of DDOs that match with the executed query.", + "tags":[ + "ddo" + ] + } + }, + "/api/v1/aquarius/assets/ddo/{did}":{ + "put":{ + "consumes":[ + "application/json" + ], + "description":"", + "parameters":[ + { + "description":"DDO of the asset.", + "in":"body", + "name":"body", + "required":true, + "schema":{ + "properties":{ + "@context":{ + "description":null, + "example":"https://w3id.org/future-method/v1", + "type":"string" + }, + "authentication":{ + "description":"List of authentication mechanisms.", + "example":[ + { + "type":"RsaSignatureAuthentication2018" + }, + { + "publicKey":"did:op:123456789abcdefghi#keys-1" + } + ], + "type":"array" + }, + "id":{ + "description":"ID of the asset.", + "example":"did:op:123456789abcdefghi", + "type":"string" + }, + "publicKey":{ + "description":"List of public keys.", + "example":[ + { + "id":"did:op:123456789abcdefghi#keys-1" + }, + { + "type":"Ed25519VerificationKey2018" + }, + { + "owner":"did:op:123456789abcdefghi" + }, + { + "publicKeyBase58":"H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" + } + ], + "type":"array" + }, + "service":{ + "description":"List of services.", + "example":[ + { + "serviceEndpoint":"http://mybrizo.org/api/v1/brizo/services/consume?pubKey=${pubKey}&serviceId={serviceId}&url={url}", + "type":"Consume" + }, + { + "serviceEndpoint":"http://mybrizo.org/api/v1/brizo/services/compute?pubKey=${pubKey}&serviceId={serviceId}&algo={algo}&container={container}", + "type":"Compute" + }, + { + "metadata":{ + "additionalInformation":{ + "structuredMarkup":[ + { + "mediaType":"application/ld+json", + "uri":"http://skos.um.es/unescothes/C01194/jsonld" + }, + { + "mediaType":"text/turtle", + "uri":"http://skos.um.es/unescothes/C01194/turtle" + } + ], + "updateFrecuency":"yearly" + }, + "base":{ + "author":"Met Office", + "compression":"zip", + "contentType":"text/csv", + "contentUrls":[ + "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip" + ], + "copyrightHolder":"Met Office", + "dateCreated":"2012-10-10T17:00:000Z", + "description":"Weather information of UK including temperature and humidity", + "encoding":"UTF-8", + "inLanguage":"en", + "license":"CC-BY", + "links":[ + { + "name":"Sample of Asset Data", + "type":"sample", + "url":"https://foo.com/sample.csv" + }, + { + "AssetID":"4d517500da0acb0d65a716f61330969334630363ce4a6a9d39691026ac7908ea", + "name":"Data Format Definition", + "type":"format" + } + ], + "name":"UK Weather information 2011", + "price":10, + "size":"3.1gb", + "tags":"weather, uk, 2011, temperature, humidity", + "type":"dataset", + "workExample":"423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68" + }, + "curation":{ + "numVotes":123, + "rating":0.93, + "schema":"Binary Voting" + } + }, + "serviceEndpoint":"http://myaquarius.org/api/v1/aquarius/assets/metadata/{did}", + "type":"Metadata" + } + ], + "type":"array" + } + }, + "required":[ + "@context", + "id", + "publicKey", + "authentication", + "service" + ], + "type":"object" + } + } + ], + "responses":{ + "200":{ + "description":"Asset successfully updated." + }, + "201":{ + "description":"Asset successfully registered." + }, + "400":{ + "description":"One of the required attributes is missing." + }, + "404":{ + "description":"Invalid asset data." + }, + "500":{ + "description":"Error" + } + }, + "summary":"Update DDO of an existing asset", + "tags":[ + "ddo" + ] + } + }, + "/api/v1/aquarius/assets/ddo/{id}":{ + "delete":{ + "description":"", + "parameters":[ + { + "description":"ID of the asset.", + "in":"path", + "name":"id", + "required":true, + "type":"string" + } + ], + "responses":{ + "200":{ + "description":"successfully deleted" + }, + "404":{ + "description":"This asset ID is not in OceanDB" + }, + "500":{ + "description":"Error" + } + }, + "summary":"Retire metadata of an asset", + "tags":[ + "ddo" + ] }, - "summary":"Retire metadata of an asset", - "tags":[ - "ddo" - ] - }, - "get":{ - "description":"", - "parameters":[ - { - "description":"ID of the asset.", - "in":"path", - "name":"id", - "required":true, - "type":"string" - } - ], - "responses":{ - "200":{ - "description":"successful operation" - }, - "404":{ - "description":"This asset ID is not in OceanDB" - } - }, - "summary":"Get DDO of a particular asset.", - "tags":[ - "ddo" - ] - } - }, - "/api/v1/aquarius/assets/metadata/{id}":{ - "get":{ - "description":"", - "parameters":[ - { - "description":"ID of the asset.", - "in":"path", - "name":"id", - "required":true, - "type":"string" - } - ], - "responses":{ - "200":{ - "description":"successful operation." - }, - "404":{ - "description":"This asset ID is not in OceanDB." - } - }, - "summary":"Get metadata of a particular asset", - "tags":[ - "metadata" - ] - } - } + "get":{ + "description":"", + "parameters":[ + { + "description":"ID of the asset.", + "in":"path", + "name":"id", + "required":true, + "type":"string" + } + ], + "responses":{ + "200":{ + "description":"successful operation" + }, + "404":{ + "description":"This asset ID is not in OceanDB" + } + }, + "summary":"Get DDO of a particular asset.", + "tags":[ + "ddo" + ] + } + }, + "/api/v1/aquarius/assets/metadata/{id}":{ + "get":{ + "description":"", + "parameters":[ + { + "description":"ID of the asset.", + "in":"path", + "name":"id", + "required":true, + "type":"string" + } + ], + "responses":{ + "200":{ + "description":"successful operation." + }, + "404":{ + "description":"This asset ID is not in OceanDB." + } + }, + "summary":"Get metadata of a particular asset", + "tags":[ + "metadata" + ] + } + } }, "swagger":"2.0" } diff --git a/data/brizo.json b/data/brizo.json index 7302fe23..bb43ee47 100644 --- a/data/brizo.json +++ b/data/brizo.json @@ -5,196 +5,196 @@ }, "host":"myfancybrizo.com", "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`.", - "title":"Brizo", - "version":"0.1.2" + "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", + "version":"0.1.2" }, "paths":{ - "/api/v1/brizo/services/access/initialize":{ - "post":{ - "consumes":[ - "application/json" - ], - "description":"", - "parameters":[ - { - "description":"Service agreement initialization.", - "in":"body", - "name":"body", - "required":true, - "schema":{ - "properties":{ - "consumerAddress":{ - "description":"Consumer address.", - "example":"0x00a329c0648769A73afAc7F9381E08FB43dBEA72", - "type":"string" - }, - "did":{ - "description":"Identifier of the asset registered in ocean.", - "example":"did:op:08a429b8529856d59867503f8056903a680935a76950bb9649785cc97869a43d", - "type":"string" - }, - "serviceAgreementId":{ - "description":"Identifier of the service agreement.", - "example":"bb23s87856d59867503f80a690357406857698570b964ac8dcc9d86da4ada010", - "type":"string" - }, - "serviceDefinitionId":{ - "description":"Identifier of the service definition.", - "example":"0", - "type":"string" - }, - "signature":{ - "description":"Signature", - "example":"cade376598342cdae231321a0097876aeda656a567a67c6767fd8710129a9dc1", - "type":"string" - } + "/api/v1/brizo/services/access/initialize":{ + "post":{ + "consumes":[ + "application/json" + ], + "description":"", + "parameters":[ + { + "description":"Service agreement initialization.", + "in":"body", + "name":"body", + "required":true, + "schema":{ + "properties":{ + "consumerAddress":{ + "description":"Consumer address.", + "example":"0x00a329c0648769A73afAc7F9381E08FB43dBEA72", + "type":"string" + }, + "did":{ + "description":"Identifier of the asset registered in ocean.", + "example":"did:op:08a429b8529856d59867503f8056903a680935a76950bb9649785cc97869a43d", + "type":"string" + }, + "serviceAgreementId":{ + "description":"Identifier of the service agreement.", + "example":"bb23s87856d59867503f80a690357406857698570b964ac8dcc9d86da4ada010", + "type":"string" + }, + "serviceDefinitionId":{ + "description":"Identifier of the service definition.", + "example":"0", + "type":"string" + }, + "signature":{ + "description":"Signature", + "example":"cade376598342cdae231321a0097876aeda656a567a67c6767fd8710129a9dc1", + "type":"string" + } + }, + "required":[ + "did", + "serviceAgreementId", + "serviceDefinitionId", + "signature", + { + "consumerAddress":null + } + ], + "type":"object" + } + } + ], + "responses":{ + "201":{ + "description":"Service agreement successfully initialized." }, - "required":[ - "did", - "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":"

If the publisher of the assets
provide this service in the Service agreement related with the asset_did requested.
", - "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" - } + "400":{ + "description":"One of the required attributes is missing." }, - "required":[ - "asset_did", - "algorithm_did", - "consumer_wallet" - ], - "type":"object" - } - } - ], - "responses":{ + "404":{ + "description":"Invalid signature." + }, + "500":{ + "description":"Error" + } + }, + "summary":"Initialize the SLA between the publisher and the consumer.", + "tags":[ + "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.", - "tags":[ - "services" - ] - } - }, - "/api/v1/brizo/services/consume":{ - "get":{ - "consumes":[ - "application/json" - ], - "description":"", - "parameters":[ - { - "description":"The consumer address.", - "in":"query", - "name":"consumerAddress", - "required":true, - "type":"string" - }, - { - "description":"The service agreement id.", - "in":"query", - "name":"serviceAgreementId", - "required":true, - "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.", - "in":"query", - "name":"url", - "required":true, - "type":"string" - } - ], - "responses":{ - "302":{ - "description":"Redirect to valid asset url." - }, - "400":{ - "description":"One of the required attributes is missed." - }, - "404":{ - "description":"Invalid asset data." - }, - "500":{ - "description":"Error" - } - }, - "summary":"Allows download of asset data file.", - "tags":[ - "services" - ] - } - } + }, + "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":[ + "services" + ] + } + }, + "/api/v1/brizo/services/consume":{ + "get":{ + "consumes":[ + "application/json" + ], + "description":"", + "parameters":[ + { + "description":"The consumer address.", + "in":"query", + "name":"consumerAddress", + "required":true, + "type":"string" + }, + { + "description":"The ID of the service agreement.", + "in":"query", + "name":"serviceAgreementId", + "required":true, + "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.", + "in":"query", + "name":"url", + "required":true, + "type":"string" + } + ], + "responses":{ + "302":{ + "description":"Redirect to valid asset url." + }, + "400":{ + "description":"One of the required attributes is missing." + }, + "404":{ + "description":"Invalid asset data." + }, + "500":{ + "description":"Error" + } + }, + "summary":"Allows download of asset data file.", + "tags":[ + "services" + ] + } + } }, "swagger":"2.0" }