Skip to content
Snippets Groups Projects
Commit 5de62f10 authored by Riabokon Stanislav(EPAM)[GCP]'s avatar Riabokon Stanislav(EPAM)[GCP]
Browse files

Merge branch 'swagger-api-docs' into 'master'

Added indexer_openapi.yaml

See merge request !658
parents be091d58 0b8878d3
No related branches found
No related tags found
1 merge request!658Added indexer_openapi.yaml
Pipeline #230501 passed
openapi: 3.0.1
info:
title: Indexer Service
description: Indexer service creates an index, which is a methodical arrangement of records designed to enable users to locate information quickly.
contact:
name: OSDU Data Platform Team
email: dps@OSDU.org
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: '2.0'
servers:
- url: /api/indexer/v2
security:
- Authorization: []
tags:
- name: partition-setup-api
description: Partition Setup API
- name: reindex-api
description: Reindex API
- name: health-check-api
description: Health Check API
- name: cleanup-indicies-api
description: Cleanup Indicies API
- name: info
description: Version info endpoint
paths:
/partitions/provision:
put:
tags:
- partition-setup-api
summary: Provision partition
description: 'Provision partition. Required roles: `users.datalake.ops`'
operationId: provisionPartition
parameters:
- name: data-partition-id
in: header
required: true
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
type: object
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'403':
description: User not authorized to perform the action
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'500':
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'502':
description: Bad Gateway
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
security:
- Authorization: []
/reindex:
post:
tags:
- reindex-api
summary: Re-index given 'kind'
description: 'This API allows users to re-index a ''kind'' without re-ingesting the records via storage API. Required roles: `service.search.admin`'
operationId: reindex
parameters:
- name: force_clean
in: query
description: Force Clean
required: false
schema:
type: boolean
default: false
- name: data-partition-id
in: header
description: Data Partition Id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RecordReindexRequest'
required: true
responses:
'200':
description: OK
content:
'*/*':
schema:
type: object
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'403':
description: User not authorized to perform the action
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'500':
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'502':
description: Bad Gateway
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
security:
- Authorization: []
patch:
tags:
- reindex-api
summary: Full Re-index by data partition
description: 'This API allows users to re-index an entire partition without re-ingesting the records via storage API.Required roles: `users.datalake.ops`'
operationId: fullReindex
parameters:
- name: force_clean
in: query
description: Force Clean
required: false
schema:
type: boolean
default: false
- name: data-partition-id
in: header
description: Data Partition Id
required: true
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
type: string
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'403':
description: User not authorized to perform the action
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'500':
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'502':
description: Bad Gateway
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
security:
- Authorization: []
/reindex/records:
post:
tags:
- reindex-api
summary: Re-index given records
description: 'This API allows users to re-index the given records by providing record ids without re-ingesting the records via storage API. Required roles: `service.search.admin`'
operationId: reindexRecords
parameters:
- name: data-partition-id
in: header
description: Data Partition Id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ReindexRecordsRequest'
required: true
responses:
'202':
description: Accepted
content:
'*/*':
schema:
type: object
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'403':
description: User not authorized to perform the action
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'500':
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'502':
description: Bad Gateway
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/AppError'
security:
- Authorization: []
/readiness_check:
get:
tags:
- health-check-api
summary: Readiness Check endpoint
description: For deployment available public `/readiness_check` endpoint.
operationId: readinessCheck
parameters:
- name: data-partition-id
in: header
description: Data Partition Id
required: true
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
type: string
/liveness_check:
get:
tags:
- health-check-api
summary: Liveness Check endpoint
description: For deployment available public `/liveness_check` endpoint.
operationId: livenessCheck
parameters:
- name: data-partition-id
in: header
description: Data Partition Id
required: true
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
type: string
/info:
get:
tags:
- info
summary: Version info
description: For deployment available public `/info` endpoint, which provides build and git related information.
operationId: info
parameters:
- name: data-partition-id
in: header
description: Data Partition Id
required: true
schema:
type: string
responses:
'200':
description: Version info.
content:
application/json:
schema:
$ref: '#/components/schemas/VersionInfo'
/index:
delete:
tags:
- cleanup-indicies-api
summary: Delete Index for the given kind
description: 'Delete Index for the given kind. Required roles: `users.datalake.ops`'
operationId: deleteIndex
parameters:
- name: kind
in: query
description: Kind
required: true
schema:
type: string
example: tenant1:public:well:1.0.2
- name: data-partition-id
in: header
description: Data Partition Id
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: string
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/AppError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/AppError'
'403':
description: User not authorized to perform the action
content:
application/json:
schema:
$ref: '#/components/schemas/AppError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/AppError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/AppError'
'502':
description: Bad Gateway
content:
application/json:
schema:
$ref: '#/components/schemas/AppError'
'503':
description: Service Unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/AppError'
security:
- Authorization: []
components:
schemas:
AppError:
type: object
properties:
code:
type: integer
format: int32
reason:
type: string
message:
type: string
RecordReindexRequest:
required:
- kind
type: object
properties:
kind:
type: string
cursor:
type: string
ReindexRecordsRequest:
required:
- recordIds
type: object
properties:
recordIds:
maxItems: 1000
minItems: 1
type: array
items:
type: string
ConnectedOuterService:
type: object
properties:
name:
type: string
version:
type: string
VersionInfo:
type: object
properties:
groupId:
type: string
artifactId:
type: string
version:
type: string
buildTime:
type: string
branch:
type: string
commitId:
type: string
commitMessage:
type: string
connectedOuterServices:
type: array
items:
$ref: '#/components/schemas/ConnectedOuterService'
securitySchemes:
Authorization:
type: http
scheme: bearer
bearerFormat: Authorization
\ No newline at end of file
......@@ -284,3 +284,21 @@ Execute following command to build code and run all the integration tests:
# above are already exported in your environment.
$ (cd testing/indexer-test-baremetal/ && mvn clean test)
```
## License
Copyright © Google LLC
Copyright © EPAM Systems
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](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.
\ No newline at end of file
......@@ -218,3 +218,21 @@ Execute following command to build code and run all the integration tests:
# above are already exported in your environment.
$ (cd testing/indexer-test-gc/ && mvn clean test)
```
## License
Copyright © Google LLC
Copyright © EPAM Systems
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](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.
\ No newline at end of file
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