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

remove all the file things

This commit is contained in:
Matthias Kretschmann 2021-11-04 17:22:18 +01:00
parent 37bba3244d
commit cb831cb439
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -97,8 +97,8 @@ This object holds information describing the actual actual asset.
| **`author`** | `string` | **✓** | Name of the entity generating this data (e.g. Tfl, Disney Corp, etc.). | | **`author`** | `string` | **✓** | Name of the entity generating this data (e.g. Tfl, Disney Corp, etc.). |
| **`license`** | `string` | **✓** | Short name referencing the license of the asset (e.g. Public Domain, CC-0, CC-BY, No License Specified, etc. ). If it's not specified, the following value will be added: "No License Specified". | | **`license`** | `string` | **✓** | Short name referencing the license of the asset (e.g. Public Domain, CC-0, CC-BY, No License Specified, etc. ). If it's not specified, the following value will be added: "No License Specified". |
| **`links`** | Array of `string` | | Mapping of URL strings for data samples, or links to find out more information. Links may be to either a URL or another asset. | | **`links`** | Array of `string` | | Mapping of URL strings for data samples, or links to find out more information. Links may be to either a URL or another asset. |
| **`contentLanguage`** | `string` | | The language of the content. Please use one of the language codes from the [IETF BCP 47 standard](https://tools.ietf.org/html/bcp47) | | **`contentLanguage`** | `string` | | The language of the content. Use one of the language codes from the [IETF BCP 47 standard](https://tools.ietf.org/html/bcp47) |
| **`categories`** | Array of `string` | | Optional array of categories associated to the asset. Note: recommended to use `"tags"` instead of this. | | **`categories`** | Array of `string` | | Optional array of categories associated to the asset. Note: recommended to use `tags` instead of this. |
| **`tags`** | Array of `string` | | Array of keywords or tags used to describe this content. Empty by default. | | **`tags`** | Array of `string` | | Array of keywords or tags used to describe this content. Empty by default. |
| **`additionalInformation`** | Object | | Stores additional information, this is customizable by publisher | | **`additionalInformation`** | Object | | Stores additional information, this is customizable by publisher |
| **`algorithm`** | [Algorithm Metadata](#algorithm-metadata) | **✓** (for algorithm assets only) | Information about asset of `type` `algorithm` | | **`algorithm`** | [Algorithm Metadata](#algorithm-metadata) | **✓** (for algorithm assets only) | Information about asset of `type` `algorithm` |
@ -136,37 +136,37 @@ The `container` object has the following attributes defining the Docker image th
| **`tag`** | `string` | **✓** | Tag of the Docker image. | | **`tag`** | `string` | **✓** | Tag of the Docker image. |
| **`checksum`** | `string` | **✓** | Checksum of the Docker image. | | **`checksum`** | `string` | **✓** | Checksum of the Docker image. |
```json
{
"metadata": {
"description": "Sample description",
"name": "Sample algorithm asset",
"type": "algorithm",
"author": "OPF",
"license": "https://market.oceanprotocol.com/terms",
"algorithm": {
"language": "",
"version": "",
"container": {
"entrypoint": "",
"image": "",
"tag": "",
"checksum": ""
}
}
}
}
```
### Files ### Files
The `ddo.files` array contains a `file` object which needs to be present when publishing a new asset. This then gets removed and transformed into an `ddo.encryptedFiles` string which contains the encrypted urls. The `ddo.files` field is returned as a string which holds the encrypted file URLs. During the publish process this needs to be encrypted with a respective _Provider_ API call.
Each `file` object has the following attributes, with the details necessary to consume and validate the data.
| Attribute | Required | Description |
| -------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`contentType`** | **✓** | File MIME type. |
| **`url`** | Local | Content URL. Omitted from the remote metadata. Supports `http(s)://` and `ipfs://` URLs. |
| **`name`** | | File name. |
| **`checksum`** | | Checksum of the file using your preferred format (i.e. MD5). Format specified in `checksumType`. If it's not provided can't be validated if the file was not modified after registering. |
| **`checksumType`** | | Format of the provided checksum. Can vary according to server (i.e Amazon vs. Azure) |
| **`contentLength`** | | Size of the file in bytes. |
| **`encoding`** | | File encoding (e.g. UTF-8). |
| **`compression`** | | File compression (e.g. no, gzip, bzip2, etc). |
| **`encrypted`** | | Boolean. Is the file encrypted? If is not set is assumed the file is not encrypted |
| **`encryptionMode`** | | Encryption mode used. Just valid if `encrypted=true` |
| **`resourceId`** | | Remote identifier of the file in the external provider. It is typically the remote id in the cloud provider. |
| **`attributes`** | | Key-Value hash map with additional attributes describing the asset file. It could include details like the Amazon S3 bucket, region, etc. |
Example: Example:
```json ```json
{ {
"files": [ "files": "0x044736da6dae39889ff570c34540f24e5e084f4e5bd81eff3691b729c2dd1465ae8292fc721e9d4b1f10f56ce12036c9d149a4dab454b0795bd3ef8b7722c6001e0becdad5caeb2005859642284ef6a546c7ed76f8b350480691f0f6c6dfdda6c1e4d50ee90e83ce3cb3ca0a1a5a2544e10daa6637893f4276bb8d7301eb35306ece50f61ca34dcab550b48181ec81673953d4eaa4b5f19a45c0e9db4cd9729696f16dd05e0edb460623c843a263291ebe757c1eb3435bb529cc19023e0f49db66ef781ca692655992ea2ca7351ac2882bf340c9d9cb523b0cbcd483731dc03f6251597856afa9a68a1e0da698cfc8e81824a69d92b108023666ee35de4a229ad7e1cfa9be9946db2d909735"
{
"url": "https://demo.com/file.csv"
}
],
"encryptedFiles": "0x044736da6dae39889ff570c34540f24e5e084f4e5bd81eff3691b729c2dd1465ae8292fc721e9d4b1f10f56ce12036c9d149a4dab454b0795bd3ef8b7722c6001e0becdad5caeb2005859642284ef6a546c7ed76f8b350480691f0f6c6dfdda6c1e4d50ee90e83ce3cb3ca0a1a5a2544e10daa6637893f4276bb8d7301eb35306ece50f61ca34dcab550b48181ec81673953d4eaa4b5f19a45c0e9db4cd9729696f16dd05e0edb460623c843a263291ebe757c1eb3435bb529cc19023e0f49db66ef781ca692655992ea2ca7351ac2882bf340c9d9cb523b0cbcd483731dc03f6251597856afa9a68a1e0da698cfc8e81824a69d92b108023666ee35de4a229ad7e1cfa9be9946db2d909735"
} }
``` ```
@ -174,27 +174,27 @@ Example:
Services define the access to the asset. Services define the access to the asset.
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ---------------------- | --------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | ---------------------- | ----------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **`type`** | `string` | **✓** | Type of service (`access`, `compute`, `wss`, etc. | | **`type`** | `string` | **✓** | Type of service (`access`, `compute`, `wss`, etc. |
| **`name`** | `string` | | Service friendly name | | **`name`** | `string` | | Service friendly name |
| **`description`** | `string` | | Service description | | **`description`** | `string` | | Service description |
| **`datatokenAddress`** | `string` | **✓** | Datatoken address | | **`datatokenAddress`** | `string` | **✓** | Datatoken address |
| **`providerEndpoint`** | `string` | **✓** | Provider endpoint URI (URI + path) | | **`providerEndpoint`** | `string` | **✓** | Provider endpoint URI (URI + path) |
| **`timeout`** | `number` | **✓** | describing how long the service can be used after consumption is initiated. A timeout of 0 represents no time limit. Expressed in seconds. | | **`timeout`** | `number` | **✓** | describing how long the service can be used after consumption is initiated. A timeout of 0 represents no time limit. Expressed in seconds. |
| **`files`** | Array of [Files](#files) | **✓** | Array of [Files](#files) objects for publishing. These will be transformed to `encryptedFiles` during publish process. | | **`files`** | `string`, see [Files](#files) | **✓** | Encrypted file URLs |
| **`privacy`** | [Privacy](#compute-privacy) | **✓** (for compute assets only) | If asset service is of `type` `compute`, holds information about the compute-related privacy settings. | | **`privacy`** | [Privacy](#compute-privacy) | **✓** (for compute assets only) | If asset service is of `type` `compute`, holds information about the compute-related privacy settings. |
#### Compute Privacy #### Compute Privacy
An asset with a service of `type` `compute` has the following additional attributes under the `privacy` object. This object is required if the asset is of `type` `compute`, but can be omitted for `type` of `access`. An asset with a service of `type` `compute` has the following additional attributes under the `privacy` object. This object is required if the asset is of `type` `compute`, but can be omitted for `type` of `access`.
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ------------------------------------------ | ------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------ | | ------------------------------------------ | ------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| **`allowRawAlgorithm`** | `boolean` | **✓** | If `true`, a drag & drop algorithm can be run | | **`allowRawAlgorithm`** | `boolean` | **✓** | If `true`, a drag & drop algorithm can be run |
| **`allowNetworkAccess`** | `boolean` | **✓** | If `true`, the algorithm job will have network access (still WIP) | | **`allowNetworkAccess`** | `boolean` | **✓** | If `true`, the algorithm job will have network access (still WIP) |
| **`publisherTrustedAlgorithmPublishers `** | Array of `String` | **✓** | If Empty , then any published algo is allowed. Otherwise, only published algorithms by some publishers are allowed | | **`publisherTrustedAlgorithmPublishers `** | Array of `String` | **✓** | If empty, then any published algorithm is allowed. Otherwise, only published algorithms by some publishers are allowed |
| **`publisherTrustedAlgorithms `** | Array of `publisherTrustedAlgorithms` | **✓** | If Empty , then any published algo is allowed. (see below) | | **`publisherTrustedAlgorithms `** | Array of `publisherTrustedAlgorithms` | **✓** | If empty, then any published algorithm is allowed. (see below) |
The `publisherTrustedAlgorithms ` is an array of objects with the following structure: The `publisherTrustedAlgorithms ` is an array of objects with the following structure: