Skip to content
Snippets Groups Projects
Commit 349bd97a authored by Yurii Kondakov's avatar Yurii Kondakov
Browse files

update tutorial documentation

parent 51565cae
No related branches found
No related tags found
1 merge request!546Update Storage to be Collaboration Context Aware
Pipeline #146680 passed
# Collaboration context
> Collaboration enables domain users to always consume quality data from the OSDU, share data within your team and control how and what you want to share back. This maintains the data integrity of the OSDU while enabling teams to succeed in creating new value.
In order to use storage api in a collaboration context, the API user needs to add a __x-collaboration HTTP header__ to the requests.
The header holds directives instructing the OSDU to handle in context of the provided collaboration instance and not in the context of the promoted or trusted data.
### HTTP Header Syntax
* Caching directives are case-insensitive but lowercase is recommended
* Multiple directives are comma-separated
### Request Directives
| Directive | Optionality | Description |
|:-------------|:------------|:-------------------------------------------------------------------------------------------------------------------------|
| id | Mandatory | ID of the collaboration to handle the request against. |
| application | Mandatory | Name of the application sending the request |
| transaction | Optional | Transaction ID to handle this request against. The transaction must exist and be in an active state on the collaboration |
### Examples
<details><summary>GET the latest version in collaboration</summary>
```
curl --request GET \
--url '/api/storage/v2/records/{id}'\
--header 'accept: application/json' \
--header 'authorization: Bearer <JWT>' \
--header 'content-type: application/json' \
--header 'Data-Partition-Id: common' \
--header 'x-collaboration: id=collaboration-id, application=app-name'\
```
</details>
<details><summary>CREATE or UPDATE a Wellbore entity in a collaboration</summary>
```
curl --request POST\
--url '/api/os-wellbore-ddms/ddms/v3/wellbores' \
--header 'authorization: Bearer <JWT>' \
--header 'content-type: application/json' \
--header 'Data-Partition-Id: opendes' \
--header 'x-collaboration: id=collaboration-id, transaction=transaction-id, application=app-name' \
--data '[{
"id": "<welllog-id-1>"
...
}]' \
```
</details>
### Record structure
For collaboration context each Cloud Service Provider should use collaboration id combined with the record id for the primary key of the metadata's data model.
That is, the __record id__ in this case can be represented as:
``{Data-Partition-Id}:{object-type}:{uuid}{collaboration_id}``
##### More info
More info about __Namespacing storage records__ can be found [here](https://community.opengroup.org/osdu/platform/system/storage/-/issues/149).
......@@ -42,6 +42,7 @@
- [Using skipdupes <a name="skipdupes"></a>](#using-skipdupes)
- [Support for GeoJSON types <a name="geojson-support"></a>](#support-for-geojson-types)
- [Version info endpoint](#version-info-endpoint)
- [Using Storage APIs in the Collaboration context <a name="collaboration-context"></a>](#cocollaboration-context)
## Introduction <a name="Introduction"></a>
After performing the basic user management procedures (create users and groups, assign users to groups, etc.) through [Entitlements Service](/solutions/dataecosystem/tutorials/entitlementsservice), DELFI developer can use the Data Ecosystem Storage Service to ingest metadata information generated by DELFI applications into the Data Ecosystem. The Storage Service provides a set of APIs to manage the entire metadata life-cycle such as ingestion (persistence), modification, deletion, versioning and data schema.
......@@ -767,4 +768,7 @@ properties:
- `version.info.buildPropertiesPath`
- `version.info.gitPropertiesPath`
[Back to table of contents](#TOC)
\ No newline at end of file
[Back to table of contents](#TOC)
## Using Storage APIs in the Collaboration context
Query, Records and Patch API can also be used in the [Collaboration context](CollaborationContext.md)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment