Commit 53ba8ca9 authored by Luc Yriarte's avatar Luc Yriarte
Browse files

These openAPI specs are only relevant to SLB portals

parent b3138cbf
Pipeline #68680 passed with stages
in 84 minutes and 57 seconds
This diff is collapsed.
# Copyright 2021 Schlumberger
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
openapi: 3.0.2
info:
title: Log Recognition OSDU
version: '0.2'
servers:
- url: https://api.evq.csp.slb.com/osdu/wdms/log-recognition/v2
security:
- bearer: []
- appkey: []
paths:
/family:
post:
tags:
- Log recognition
summary: Recognize family and unit
description: Find the most probable family and unit using family assignment rule based catalogs. User defined catalog will have the priority.
operationId: family
parameters:
- description: identifier of the data partition to query
required: false
schema:
title: data partition id
minLength: 1
type: string
description: identifier of the data partition to query
default: slb-osdu-dev-sis-internal-hq
name: data-partition-id
in: header
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GuessRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GuessResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- bearer: []
- appkey: []
/upload-catalog:
put:
tags:
- Log recognition
summary: Upload user-defined catalog with family assignment rules
description: |-
Upload user-defined catalog with family assignment rules for specific partition ID.
If there is an existing catalog, it will be replaced. It takes maximum of 5 mins to replace the existing catalog.
Hence, any call to retrieve the family should be made after 5 mins of uploading the catalog. <p>Required roles: 'users.datalake.editors' or 'users.datalake.admins'.</p>
operationId: upload-catalog
parameters:
- description: identifier of the data partition to query
required: false
schema:
title: data partition id
minLength: 1
type: string
description: identifier of the data partition to query
default: slb-osdu-dev-sis-internal-hq
name: data-partition-id
in: header
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CatalogRecord'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUpdateRecordsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- bearer: []
- appkey: []
components:
schemas:
Catalog:
title: Catalog
required:
- family_catalog
type: object
properties:
family_catalog:
title: Family Catalog
type: array
items:
$ref: '#/components/schemas/CatalogItem'
main_family_catalog:
title: Main Family Catalog
type: array
items:
$ref: '#/components/schemas/MainFamilyCatalogItem'
CatalogItem:
title: CatalogItem
required:
- unit
- rule
type: object
properties:
unit:
title: Unit
type: string
family:
title: Family
type: string
default: ''
rule:
title: Rule
type: string
CatalogRecord:
title: CatalogRecord
required:
- acl
- legal
- data
type: object
properties:
acl:
$ref: '#/components/schemas/StorageAcl'
legal:
$ref: '#/components/schemas/Legal'
data:
$ref: '#/components/schemas/Catalog'
example:
acl:
viewers:
- 'abc@slb.com, cde@slb.com'
owners:
- 'abc@slb.com, cde@slb.com'
legal:
legaltags:
- opendes-public-usa-dataset-1
otherRelevantDataCountries:
- US
data:
family_catalog:
- unit: ohm.m
family: Medium Resistivity
rule: MEDR
main_family_catalog:
- MainFamily: Resistivity
Family: Medium Resistivity
Unit: OHMM
CreateUpdateRecordsResponse:
title: CreateUpdateRecordsResponse
type: object
properties:
recordCount:
title: Recordcount
type: integer
recordIdVersions:
title: Recordidversions
type: array
items:
type: string
recordIds:
title: Recordids
type: array
items:
type: string
skippedRecordIds:
title: Skippedrecordids
type: array
items:
type: string
GuessRequest:
title: GuessRequest
required:
- label
type: object
properties:
label:
title: Label
type: string
log_unit:
title: Log Unit
type: string
description:
title: Description
type: string
example:
label: GRD
log_unit: GAPI
description: LDTD Gamma Ray
GuessResponse:
title: GuessResponse
type: object
properties:
family:
title: Family
type: string
family_type:
title: Family Type
type: array
items:
type: string
log_unit:
title: Log Unit
type: string
base_unit:
title: Base Unit
type: string
HTTPValidationError:
title: HTTPValidationError
type: object
properties:
errors:
title: Errors
type: array
items:
$ref: '#/components/schemas/ValidationError'
Legal:
title: Legal
type: object
properties:
legaltags:
title: Legaltags
type: array
items:
type: string
otherRelevantDataCountries:
title: Otherrelevantdatacountries
type: array
items:
type: string
MainFamilyCatalogItem:
title: MainFamilyCatalogItem
required:
- MainFamily
- Family
- Unit
type: object
properties:
MainFamily:
title: Mainfamily
type: string
Family:
title: Family
type: string
Unit:
title: Unit
type: string
StorageAcl:
title: StorageAcl
required:
- viewers
- owners
type: object
properties:
viewers:
title: Viewers
type: array
items:
type: string
owners:
title: Owners
type: array
items:
type: string
ValidationError:
title: ValidationError
required:
- loc
- msg
- type
type: object
properties:
loc:
title: Location
type: array
items:
type: string
msg:
title: Message
type: string
type:
title: Error Type
type: string
securitySchemes:
bearer:
type: apiKey
name: Authorization
in: header
appkey:
type: apiKey
in: header
name: appkey
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
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