{"openapi":"3.1.0","info":{"title":"Image Portal Metadata Indexer API","description":"API for indexing metadata in the Image Portal","version":"1.0.0"},"servers":[{"url":"https://indexer.api.im.test.ntb.dev","description":"Server URL in Test environment"}],"tags":[{"name":"Tenants","description":"Provides details about tenants in the Image Portal"},{"name":"Reindex Jobs","description":"Provides functionality to re-index metadata"},{"name":"Indexes","description":"Provides functionality to metadata indexing"}],"paths":{"/api/v1/tenants/{tenantId}/reindex":{"get":{"tags":["Reindex Jobs"],"operationId":"getReindexJob","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReIndexJob"}}}}}},"put":{"tags":["Reindex Jobs"],"operationId":"reindex","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ReIndexJob"}}}}}}},"/api/v1/tenants/{tenantId}/indices/{indexName}":{"put":{"tags":["Indexes"],"operationId":"activateIndex","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"indexName","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndicesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexProperties"}}}}}},"delete":{"tags":["Indexes"],"operationId":"deleteIndex","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"indexName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexProperties"}}}}}}},"/api/v1/index":{"post":{"tags":["Indexes"],"operationId":"indexContents","parameters":[{"name":"bulk","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"boolean"}}}}}}},"/api/v1/tenants":{"get":{"tags":["Tenants"],"operationId":"getTenants","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Tenant"}}}}}}}},"/api/v1/tenants/{tenantId}":{"get":{"tags":["Tenants"],"operationId":"getTenant","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}}}}},"/api/v1/tenants/{tenantId}/indices":{"get":{"tags":["Indexes"],"operationId":"getIndices","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IndexProperties"}}}}}}}}},"components":{"schemas":{"ReindexRequest":{"type":"object","properties":{"action":{"type":"string","enum":["START","STOP","COMPLETE"]}}},"ReIndexJob":{"type":"object","properties":{"indexName":{"type":"string"},"tenant":{"type":"string"},"sdlJobId":{"type":"string"},"totalCount":{"type":"integer","format":"int64"},"state":{"type":"string","enum":["CREATED","INITIATED","IN_PROGRESS","COMPLETING","COMPLETED","FAILED","STOPPED"]},"processedCount":{"type":"integer","format":"int64"},"lastItemReceived":{"type":"boolean"},"createdTime":{"type":"integer","format":"int64"},"completedTime":{"type":"integer","format":"int64"}}},"IndicesRequest":{"type":"object","properties":{"action":{"type":"string","enum":["ACTIVATE"]}}},"IndexProperties":{"type":"object","properties":{"indexName":{"type":"string"},"docCount":{"type":"string"},"size":{"type":"string"},"createdAt":{"type":"string"},"alias":{"type":"string"},"status":{"type":"string","enum":["active","inactive","deleted"]}}},"Tenant":{"type":"object","properties":{"name":{"type":"string"},"owners":{"type":"array","items":{"type":"string"},"uniqueItems":true},"indexNamePrefix":{"type":"string"},"indexAlias":{"type":"string"}}}}}}