AZURE M22 - Core Services - Augmented Index
Hello,
I'm trying to Reindex the Records but getting response 404 Not Found. So far what I've node is:
- Collection: Azure_OSDU_Smoke_Tests.postman_collection.json
- Environment: Verify_Preshipping_New_TeamA-E.postman_environment.json
1. Create Recrod Using Storage Service
PUT https://{{STORAGE_HOST}}/records/
BODY CURL VERSION
curl --location --request PUT 'https://osdu-ship.msft-osdu-test.org/api/storage/v2/records/' \
--header 'data-partition-id: opendes' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <Token>' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"acl": {
"owners": [
"data.default.owners@opendes.contoso.com"
],
"viewers": [
"data.default.viewers@opendes.contoso.com"
]
},
"data": {
"Source": "Juliana",
"PlayID": "01292024-JFA",
"PlayName": "JFA29JAN",
"PlayDescription": "Creating a record do Augmented Index",
"NameAliases": [
{
"AliasName": "SFA-ID01292024",
"AliasNameTypeID": "opendes:reference-data--AliasNameType:RegulatoryIdentifier:"
}
]
},
"id": "opendes:master-data--Play:Play-JFA29JAN",
"kind": "osdu:wks:master-data--Play:1.0.0",
"legal": {
"legaltags": [
"opendes-Test-Legal-Tag-4375119"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"meta": [],
"version": 0
}
]
'
BODY
[
{
"acl": {
"owners": [
"{{New_OwnerDataGroup}}@{{data-partition-id}}{{domain}}"
],
"viewers": [
"{{New_ViewerDataGroup}}@{{data-partition-id}}{{domain}}"
]
},
"data": {
"Source": "Juliana",
"PlayID": "01292024-JFA",
"PlayName": "JFA29JAN",
"PlayDescription": "Creating a record do Augmented Index",
"NameAliases": [
{
"AliasName": "SFA-ID01292024",
"AliasNameTypeID": "{{data-partition-id}}:reference-data--AliasNameType:RegulatoryIdentifier:"
}
]
},
"id": "{{data-partition-id}}:master-data--Play:Play-JFA29JAN",
"kind": "osdu:wks:master-data--Play:1.0.0",
"legal": {
"legaltags": [
"{{LegalTagNameExists}}"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"meta": [],
"version": 0
}
]
RESPONSE
{
"recordCount": 1,
"recordIds": [
"opendes:master-data--Play:Play-JFA29JAN"
],
"skippedRecordIds": [],
"recordIdVersions": [
"opendes:master-data--Play:Play-JFA29JAN:1706530251825746"
]
}
2. Retrieve Record using Storage
GET https://{{STORAGE_HOST}}/records/{{recordID}}
BODY CURL VERSION
curl --location 'https://osdu-ship.msft-osdu-test.org/api/storage/v2/records/opendes:master-data--Play:Play-JFA29JAN' \
--header 'data-partition-id: opendes' \
--header 'Authorization: Bearer <Token>'
RESPONSE
{
"data": {
"Source": "Juliana",
"PlayID": "01292024-JFA",
"PlayName": "JFA29JAN",
"PlayDescription": "Creating a record do Augmented Index",
"NameAliases": [
{
"AliasName": "SFA-ID01292024",
"AliasNameTypeID": "opendes:reference-data--AliasNameType:RegulatoryIdentifier:"
}
]
},
"meta": [],
"id": "opendes:master-data--Play:Play-JFA29JAN",
"version": 1706530251825746,
"kind": "osdu:wks:master-data--Play:1.0.0",
"acl": {
"viewers": [
"data.default.viewers@opendes.contoso.com"
],
"owners": [
"data.default.owners@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-Test-Legal-Tag-4375119"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"createUser": "preshipping@azureglobal1.onmicrosoft.com",
"createTime": "2024-01-29T12:10:52.772Z"
}
3. Retrieve Record using Search
POST https://{{SEARCH_HOST}}/query
BODY CURL VERSION
curl --location 'https://osdu-ship.msft-osdu-test.org/api/search/v2/query' \
--header 'Authorization: Bearer <Token>' \
--header 'data-partition-id: opendes' \
--header 'Content-Type: application/json' \
--data '{
"kind": "osdu:wks:master-data--Play:1.0.0",
"query": "id: \"opendes:master-data--Play:Play-JFA29JAN\" "
}
'
BODY
{
"kind": "osdu:wks:master-data--Play:1.0.0",
"query": "id: \"opendes:master-data--Play:Play-JFA29JAN\" "
}
RESPONSE
{
"results": [
{
"data": {
"VirtualProperties.DefaultLocation.QuantitativeAccuracyBandID": null,
"ResourceLifecycleStatus": null,
"ResourceCurationStatus": null,
"TechnicalAssuranceID": null,
"PlayID": "01292024-JFA",
"VirtualProperties.DefaultLocation.SpatialGeometryTypeID": null,
"Source": "Juliana",
"VirtualProperties.DefaultName": "JFA29JAN",
"PlayDescription": "Creating a record do Augmented Index",
"VersionCreationReason": null,
"VirtualProperties.DefaultLocation.CoordinateQualityCheckPerformedBy": null,
"ResourceSecurityClassification": null,
"SpatialLocation.SpatialParameterTypeID": null,
"ExistenceKind": null,
"SpatialLocation.CoordinateQualityCheckPerformedBy": null,
"NameAliases": [
{
"AliasName": "SFA-ID01292024",
"AliasNameTypeID": "opendes:reference-data--AliasNameType:RegulatoryIdentifier:",
"DefinitionOrganisationID": null
}
],
"PlayTypeID": null,
"DCCustomRegulatoryID": "SFA-ID01292024",
"TechnicalAssuranceTypeID": null,
"PlayName": "JFA29JAN",
"SpatialLocation.QualitativeSpatialAccuracyTypeID": null,
"SpatialLocation.SpatialGeometryTypeID": null,
"VirtualProperties.DefaultLocation.SpatialParameterTypeID": null,
"ResourceHomeRegionID": null,
"VirtualProperties.DefaultLocation.QualitativeSpatialAccuracyTypeID": null,
"SpatialLocation.QuantitativeAccuracyBandID": null
},
"kind": "osdu:wks:master-data--Play:1.0.0",
"source": "wks",
"acl": {
"viewers": [
"data.default.viewers@opendes.contoso.com"
],
"owners": [
"data.default.owners@opendes.contoso.com"
]
},
"type": "master-data--Play",
"version": 1706530251825746,
"tags": {
"normalizedKind": "osdu:wks:master-data--Play:1"
},
"createTime": "2024-01-29T12:10:52.772Z",
"authority": "osdu",
"namespace": "osdu:wks",
"legal": {
"legaltags": [
"opendes-Test-Legal-Tag-4375119"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"createUser": "preshipping@azureglobal1.onmicrosoft.com",
"id": "opendes:master-data--Play:Play-JFA29JAN"
}
],
"aggregations": null,
"phraseSuggestions": [],
"totalCount": 1
}
4. Create Reference data for Augmented Index
PUT https://{{STORAGE_HOST}}/records/
BODY CURL VERSION
curl --location --request PUT 'https://osdu-ship.msft-osdu-test.org/api/storage/v2/records/' \
--header 'data-partition-id: opendes' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <Token>' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"acl": {
"owners": [
"data.default.owners@opendes.contoso.com"
],
"viewers": [
"data.default.viewers@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-Test-Legal-Tag-4375119"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"meta": [],
"data": {
"Name": "Play-IndexPropertyPathConfiguration",
"Description": "valid for all master-data--Play kinds for major version 1.",
"Code": "osdu:wks:master-data--Play:1.",
"AttributionAuthority": "OSDU",
"Configurations": [
{
"Name": "DCCustomRegulatoryID",
"Policy": "ExtractFirstMatch",
"Paths": [
{
"ValueExtraction": {
"RelatedConditionMatches": [
"opendes:reference-data--AliasNameType:RegulatoryIdentifier:"
],
"RelatedConditionProperty": "data.NameAliases[].AliasNameTypeID",
"ValuePath": "data.NameAliases[].AliasName"
}
}
],
"UseCase": "As a user I want to discover and match Play records by their custom field value."
}
]
},
"id": "opendes:reference-data--IndexPropertyPathConfiguration:wks:master-data--Play:1.",
"kind": "osdu:wks:reference-data--IndexPropertyPathConfiguration:1.0.0",
"version": 0
}
]'
BODY
[
{
"acl": {
"owners": [
"{{New_OwnerDataGroup}}@{{data-partition-id}}{{domain}}"
],
"viewers": [
"{{New_ViewerDataGroup}}@{{data-partition-id}}{{domain}}"
]
},
"legal": {
"legaltags": [
"{{LegalTagNameExists}}"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"meta": [],
"data": {
"Name": "Play-IndexPropertyPathConfiguration",
"Description": "valid for all master-data--Play kinds for major version 1.",
"Code": "osdu:wks:master-data--Play:1.",
"AttributionAuthority": "OSDU",
"Configurations": [
{
"Name": "DCCustomRegulatoryID",
"Policy": "ExtractFirstMatch",
"Paths": [
{
"ValueExtraction": {
"RelatedConditionMatches": [
"{{data-partition-id}}:reference-data--AliasNameType:RegulatoryIdentifier:"
],
"RelatedConditionProperty": "data.NameAliases[].AliasNameTypeID",
"ValuePath": "data.NameAliases[].AliasName"
}
}
],
"UseCase": "As a user I want to discover and match Play records by their custom field value."
}
]
},
"id": "{{data-partition-id}}:reference-data--IndexPropertyPathConfiguration:wks:master-data--Play:1.",
"kind": "osdu:wks:reference-data--IndexPropertyPathConfiguration:1.0.0",
"version": 0
}
]
RESPONSE
{
"recordCount": 1,
"recordIds": [
"opendes:reference-data--IndexPropertyPathConfiguration:wks:master-data--Play:1."
],
"skippedRecordIds": [],
"recordIdVersions": [
"opendes:reference-data--IndexPropertyPathConfiguration:wks:master-data--Play:1.:1706530435891902"
]
}
5. Reindex Records
POST https://{{INDEXER_HOST}}/reindex?force_clean=true
BODY CURL VERSION
curl --location 'https://osdu-ship.msft-osdu-test.org/api/indexer/v2/ /reindex?force_clean=true' \
--header 'Content-Type: application/json' \
--header 'data-partition-id: opendes' \
--header 'Authorization: Bearer <Token>' \
--data '{
"kind": "osdu:wks:master-data--Play:1.0.0"
}'
BODY
{
"kind": "osdu:wks:master-data--Play:1.0.0"
}
RESPONSE
{
"timestamp": "2024-01-29T12:17:35.896+00:00",
"status": 404,
"error": "Not Found",
"path": "/api/indexer/v2/%20/reindex"
}
Regards,