{
  "openapi": "3.0.0",
  "info": {
    "description": "Indexer service creates an index, which is a methodical arrangement of records designed to enable users to locate information quickly.\n\n```plain {% title=\"Client ID\" %}\n963f2cc6915e479fa0fcb73ec2ec90e7\n```\n",
    "version": "2.0.0",
    "x-product-id": "OSDU-Indexer-Service",
    "title": "Indexer Service APIs",
    "contact": {
      "name": "SLB Customer Support for Digital",
      "url": "https://customersupport.digital.slb.com"
    }
  },
  "servers": [
    {
      "url": "https://as5.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (SGP)"
    },
    {
      "url": "https://br5.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB SaaS OSDU (BRS)"
    },
    {
      "url": "https://eu5.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (WEU)"
    },
    {
      "url": "https://eu6.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB SaaS OSDU (EUT)"
    },
    {
      "url": "https://eu7.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (MDE)"
    },
    {
      "url": "https://us5.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (PSC)"
    },
    {
      "url": "https://us7.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (USC)"
    },
    {
      "url": "https://us8.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (WUS)"
    },
    {
      "url": "https://as6.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (SAS)"
    },
    {
      "url": "https://eu8.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (SWC)"
    },
    {
      "url": "https://as7.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (MYW)"
    },
    {
      "url": "https://za1.api.enterprisedata.slb.com/api/indexer/v2",
      "description": "SLB Saas OSDU (ZAN)"
    }
  ],
  "tags": [
    {
      "name": "Reindex api",
      "description": "Reindex Api"
    },
    {
      "name": "Info",
      "description": "Build and git information"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/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: `users.datalake.admins`",
        "operationId": "reindexUsingPOST_1",
        "parameters": [
          {
            "$ref": "#/components/parameters/data-partition-id"
          },
          {
            "name": "force_clean",
            "in": "query",
            "description": "force_clean",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "description": "recordReindexRequest",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordReindexRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Created"
          },
          "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": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "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": "fullReindexUsingPATCH",
        "parameters": [
          {
            "$ref": "#/components/parameters/data-partition-id"
          },
          {
            "name": "force_clean",
            "in": "query",
            "description": "force_clean",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/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: `users.datalake.admins`",
        "operationId": "Reindex records",
        "parameters": [
          {
            "$ref": "#/components/parameters/data-partition-id"
          }
        ],
        "requestBody": {
          "description": "List of records",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReindexRecordsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReindexRecordsResponse"
                }
              }
            }
          },
          "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": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/info": {
      "get": {
        "tags": [
          "Info"
        ],
        "summary": "Version info",
        "description": "For deployment available public `/info` endpoint,  which provides build and git related information.",
        "operationId": "Version info",
        "responses": {
          "200": {
            "description": "Version info.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionInfo"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "data-partition-id": {
        "name": "data-partition-id",
        "in": "header",
        "description": "desired data partition id",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "User Token from SLB Authenticator Service"
      }
    },
    "schemas": {
      "RecordReindexRequest": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          }
        }
      },
      "ReindexRecordsRequest": {
        "type": "object",
        "properties": {
          "recordIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ReindexRecordsResponse": {
        "type": "object",
        "properties": {
          "reIndexedRecords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notFoundRecords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AppError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "reason": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "description": "An error that occurs during normal application logic"
      },
      "VersionInfo": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "description": "Maven artifact group ID."
          },
          "actifactId": {
            "type": "string",
            "description": "Maven artifact ID."
          },
          "version": {
            "type": "string",
            "description": "Maven artifact version"
          },
          "buildTime": {
            "type": "string",
            "description": "Maven artifact build time"
          },
          "branch": {
            "type": "string",
            "description": "Current git branch"
          },
          "commitId": {
            "type": "string",
            "description": "Latest commit hash"
          },
          "commitMessage": {
            "type": "string",
            "description": "Latest commit message"
          },
          "connectedOuterServices": {
            "type": "array",
            "description": "Connected outer services information",
            "items": {
              "$ref": "#/components/schemas/ConnectedOuterService"
            }
          }
        },
        "description": "Version info."
      },
      "ConnectedOuterService": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Connected outer service name."
          },
          "version": {
            "type": "string",
            "description": "Connected outer service version."
          }
        },
        "description": "Connected outer service information."
      }
    }
  }
}