Commit f6cce53a authored by Matt Wise's avatar Matt Wise
Browse files

Add postman for dataset registry workflow

parent be010bae
{
"info": {
"_postman_id": "3801f01a-bc6a-4ce9-9691-dd0e34c81bb7",
"name": "OSDU Dataset Registry Workflow",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "1. Create Dataset Registry Schema",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{bearer_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "data-partition-id",
"type": "text",
"value": "{{data_partition_id}}"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"kind\": \"{{data_partition_id}}:osdu:dataset-registry:0.0.1\",\r\n \"schema\": [\r\n {\r\n \"path\": \"ResourceTypeID\",\r\n \"kind\": \"string\",\r\n \"ext\": {}\r\n },\r\n {\r\n \"path\": \"ResourceID\",\r\n \"kind\": \"string\",\r\n \"ext\": {}\r\n },\r\n {\r\n \"path\": \"ResourceSecurityClassification\",\r\n \"kind\": \"string\",\r\n \"ext\": {}\r\n },\r\n {\r\n \"path\": \"ResourceName\",\r\n \"kind\": \"string\",\r\n \"ext\": {}\r\n },\r\n {\r\n \"path\": \"ResourceDescription\",\r\n \"kind\": \"string\",\r\n \"ext\": {}\r\n },\r\n {\r\n \"path\": \"ResourceSource\",\r\n \"kind\": \"string\",\r\n \"ext\": {}\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{osdu_api_base}}/api/storage/v2/schemas",
"host": [
"{{osdu_api_base}}"
],
"path": [
"api",
"storage",
"v2",
"schemas"
]
}
},
"response": []
},
{
"name": "2. Create LegalTag for Dataset Registry",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{bearer_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "data-partition-id",
"type": "text",
"value": "{{data_partition_id}}"
},
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "correlation-id",
"type": "text",
"value": "workflow-correlation-8b8ca323-f4d6-4653-b5c1-a1f4b0c32ca1",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\t\r\n\t\"name\": \"public-usa-dataset\",\t\r\n\t\"properties\": {\t\t\r\n\t\t\"countryOfOrigin\":[\"US\"], \r\n\t\t\"contractId\":\"A1234\",\r\n\t\t\"expirationDate\":2222222222222, \r\n\t\t\"originator\":\"Default\", \r\n\t\t\"dataType\":\"Public Domain Data\", \r\n\t\t\"securityClassification\":\"Public\", \r\n\t\t\"personalData\":\"No Personal Data\", \r\n\t\t\"exportClassification\":\"EAR99\"\t\r\n\t\t},\t\r\n\t\"description\": \"A default legal tag\"\r\n}\r\n\r\n",
"options": {
"raw": {}
}
},
"url": {
"raw": "{{osdu_api_base}}/api/legal/v1/legaltags",
"host": [
"{{osdu_api_base}}"
],
"path": [
"api",
"legal",
"v1",
"legaltags"
]
}
},
"response": []
},
{
"name": "3. Register Dataset",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{bearer_token}}",
"type": "string"
},
{
"key": "password",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [
{
"key": "data-partition-id",
"type": "text",
"value": "{{data_partition_id}}"
},
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"datasetRegistries\": [{\n\t\t\"kind\": \"{{data_partition_id}}:osdu:dataset-registry:0.0.1\",\n\t\t\"type\": \"dataset-registry\",\n\t\t\"data\": {\n\t\t\t\"ResourceID\": \"srn:osdu:file:dc556e0e3a554105a80cfcb19372a62d:\",\n\t\t\t\"ResourceTypeID\": \"srn:type:file/json:\",\n\t\t\t\"ResourceSecurityClassification\": \"srn:reference-data/ResourceSecurityClassification:RESTRICTED:\",\n\t\t\t\"ResourceSource\": \"Some Company App\",\n\t\t\t\"ResourceName\": \"trajectories - 1000.json\",\n \"ResourceDescription\": \"Trajectory For Wellbore xyz\",\n\t\t\t\"DatasetProperties\": {\n\t\t\t\t\"FileSourceInfo\": {\n\t\t\t\t\t\"FileSource\": \"\",\n\t\t\t\t\t\"PreLoadFilePath\": \"s3://default_bucket/r1/data/provided/trajectories/1000.json\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"namespace\": \"{{data_partition_id}}:osdu\",\n\t\t\"legal\": {\n\t\t\t\"legaltags\": [\n\t\t\t\t\"{{data_partition_id}}-public-usa-dataset\"\n\t\t\t],\n\t\t\t\"otherRelevantDataCountries\": [\n\t\t\t\t\"US\"\n\t\t\t],\n\t\t\t\"status\": \"compliant\"\n\t\t},\n\t\t\"acl\": {\n\t\t\t\"viewers\": [\n\t\t\t\t\"data.default.viewers@{{data_partition_id}}.testing.com\"\n\t\t\t],\n\t\t\t\"owners\": [\n\t\t\t\t\"data.default.owners@{{data_partition_id}}.testing.com\"\n\t\t\t]\n\t\t}\n\n\t}]\n}"
},
"url": {
"raw": "{{osdu_api_base}}/api/dataset-registry/v1/registry",
"host": [
"{{osdu_api_base}}"
],
"path": [
"api",
"dataset-registry",
"v1",
"registry"
]
}
},
"response": []
},
{
"name": "Health of Dataset Registry",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{bearer_token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "data-partition-id",
"type": "text",
"value": "{{data_partition_id}}"
},
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"url": {
"raw": "{{osdu_api_base}}/api/dataset-registry/v1/actuator/health",
"host": [
"{{osdu_api_base}}"
],
"path": [
"api",
"dataset-registry",
"v1",
"actuator",
"health"
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment