|
|
```
|
|
|
{
|
|
|
"swagger": "2.0",
|
|
|
"info": {
|
|
|
"version": "1.0.0",
|
|
|
"title": "Document indexing service",
|
|
|
"description": "Endpoints to index well documents"
|
|
|
},
|
|
|
"tags": [
|
|
|
{
|
|
|
"name": "Indexing Service"
|
|
|
}
|
|
|
],
|
|
|
"host": "cmz-discovery-index-service.endpoints.dtw-migration-sandbox.cloud.goog",
|
|
|
"x-google-endpoints": [
|
|
|
{
|
|
|
"name": "cmz-discovery-index-service.endpoints.dtw-migration-sandbox.cloud.goog",
|
|
|
"target": "35.195.55.0"
|
|
|
}
|
|
|
],
|
|
|
"basePath": "/search-index/api",
|
|
|
"schemes": [
|
|
|
"https"
|
|
|
],
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"paths": {
|
|
|
"/search/v1/index": {
|
|
|
"post": {
|
|
|
"operationId": "index",
|
|
|
"summary": "Index documents",
|
|
|
"description": "Index well documents",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"in": "body",
|
|
|
"name": "body",
|
|
|
"required": true,
|
|
|
"description": "Index request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/IndexRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/IndexResponse"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Validation Error"
|
|
|
},
|
|
|
"403": {
|
|
|
"description": "Not Authorized"
|
|
|
},
|
|
|
"404": {
|
|
|
"description": "Not Found"
|
|
|
}
|
|
|
},
|
|
|
"security" : [
|
|
|
{
|
|
|
"Bearer" : [ ]
|
|
|
},
|
|
|
{
|
|
|
"sauth_id_token" : [ ]
|
|
|
}
|
|
|
],
|
|
|
"tags": [
|
|
|
"Indexing Service"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"/search/v1/reIndex": {
|
|
|
"post": {
|
|
|
"summary": "ReIndex the document and update metadata",
|
|
|
"operationId": "search-reindexer",
|
|
|
"parameters": [{
|
|
|
"in": "body",
|
|
|
"name": "ReIndex Request Payload",
|
|
|
"description": "Enter the location which need to be indexed",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ReIndexRequest"
|
|
|
}
|
|
|
}],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "successful operation",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/IndexResponse"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Validation Error"
|
|
|
},
|
|
|
"403": {
|
|
|
"description": "Not Authorized"
|
|
|
},
|
|
|
"404": {
|
|
|
"description": "Not Found"
|
|
|
}
|
|
|
},
|
|
|
"security" : [
|
|
|
{
|
|
|
"Bearer" : [ ]
|
|
|
},
|
|
|
{
|
|
|
"sauth_id_token" : [ ]
|
|
|
}
|
|
|
],
|
|
|
"tags": [
|
|
|
"Indexing Service"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"/search/v1/fileRecordEventListener": {
|
|
|
"post": {
|
|
|
"summary": "Auto-Index the document based on fileRecord subscription event",
|
|
|
"operationId": "file-event-indexer",
|
|
|
"parameters": [{
|
|
|
"in": "body",
|
|
|
"name": "Subscription Request Payload",
|
|
|
"description": "Encoded data for file record being created/updated/deleted in datalake",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/SubRecieverRequest"
|
|
|
}
|
|
|
}],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "successful operation",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/IndexResponse"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Validation Error"
|
|
|
},
|
|
|
"403": {
|
|
|
"description": "Not Authorized"
|
|
|
},
|
|
|
"404": {
|
|
|
"description": "Not Found"
|
|
|
}
|
|
|
},
|
|
|
"security" : [
|
|
|
{
|
|
|
"Bearer" : [ ]
|
|
|
},
|
|
|
{
|
|
|
"sauth_id_token" : [ ]
|
|
|
}
|
|
|
],
|
|
|
"tags": [
|
|
|
"Indexing Service"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"/search/v1/wellRecordEventListener": {
|
|
|
"post": {
|
|
|
"summary": "Auto-Index the document based on wellRecord subscription event",
|
|
|
"operationId": "well-event-indexer",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"security" : [
|
|
|
{
|
|
|
"Bearer" : [ ]
|
|
|
},
|
|
|
{
|
|
|
"sauth_id_token" : [ ]
|
|
|
}
|
|
|
],
|
|
|
"tags": [
|
|
|
"Indexing Service"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"parameters": [{
|
|
|
"in": "body",
|
|
|
"name": "Subscription Request Payload",
|
|
|
"description": "Encoded data for well record being created/updated/deleted in datalake",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/SubRecieverRequest"
|
|
|
}
|
|
|
}],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "successful operation",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/IndexResponse"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Validation Error"
|
|
|
},
|
|
|
"403": {
|
|
|
"description": "Not Authorized"
|
|
|
},
|
|
|
"404": {
|
|
|
"description": "Not Found"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"securityDefinitions": {
|
|
|
"api-key": {
|
|
|
"type": "apiKey",
|
|
|
"name": "key",
|
|
|
"in": "query"
|
|
|
},
|
|
|
"sauth_id_token": {
|
|
|
"authorizationUrl": "https://opsauth-dot-cfsauth-preview.appspot.com/v1/auth",
|
|
|
"flow": "implicit",
|
|
|
"type": "oauth2",
|
|
|
"x-google-issuer":"s-auth-preview.slb.com",
|
|
|
"x-google-jwks_uri":"https://opsauth-dot-cfsauth-preview.appspot.com/v1/certs",
|
|
|
"x-google-audiences":"entitlement-datalake.slbclient.com,dev-slbdev-devportal.slbapp.com,test-slbdev-devportal.slbapp.com",
|
|
|
"scopes": {}
|
|
|
},
|
|
|
"Bearer": {
|
|
|
"type": "apiKey",
|
|
|
"name": "Authorization",
|
|
|
"in": "header"
|
|
|
}
|
|
|
},
|
|
|
"definitions": {
|
|
|
"IndexRequest": {
|
|
|
"type": "object",
|
|
|
"required": [
|
|
|
"wellFileRecordKind",
|
|
|
"wellboreKind"
|
|
|
],
|
|
|
"properties": {
|
|
|
"wellFileRecordKind": {
|
|
|
"type": "string",
|
|
|
"description": "Datalake well document kind",
|
|
|
"example": "oga:wellFileRecord:1.0.0"
|
|
|
},
|
|
|
"wellboreKind": {
|
|
|
"type": "string",
|
|
|
"description": "Datalake wellbore kind",
|
|
|
"example": "oga:wellbore:1.0.0"
|
|
|
},
|
|
|
"limit": {
|
|
|
"type": "integer",
|
|
|
"format": "int32",
|
|
|
"default": -1,
|
|
|
"minimum": 1
|
|
|
},
|
|
|
"workFlowType": {
|
|
|
"type": "string",
|
|
|
"description": "Used to update only the meta information",
|
|
|
"example": "metaUpdate"
|
|
|
},
|
|
|
"query": {
|
|
|
"type": "string",
|
|
|
"default": "Folder_Filename=.pdf OR Folder_Filename=.tif OR Folder_Filename=.tiff",
|
|
|
"description": "Query to filter records that need to be indexed"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"IndexResponse": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"code": {
|
|
|
"type": "integer",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
"message": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"status": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"ReIndexRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"url": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"SubRecieverRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"message": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"data": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |