{"openapi":"3.0.1","info":{"title":"Metadata","description":"To interact with bluestone metadata service.\n <b><h1>Deprecated endpoints:</h1></b><table border=\"1px;\"><tr><th style=\"text-align: center; vertical-align: middle;\"><b><h3>Uri</b></h3></th><th><b>Method</b></th><th><b><h3>Since</h3></b></th><th><b><h3>End of life</h3></b></th></tr></table>","version":"1-core"},"servers":[{"url":"api.test.bluestonepim.com/metadata","description":"default"}],"tags":[{"name":"Metadata","description":"To manage metadata."},{"name":"Organization","description":"Controller to remove organization data."},{"name":"Task","description":"To handle background job statuses."},{"name":"Provider","description":"To manage provider."}],"paths":{"/provider/by-numbers":{"post":{"tags":["Provider"],"summary":"List providers by numbers.","operationId":"listProviders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProviderRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProviderResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"METADATA_PROVIDER","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/provider":{"get":{"tags":["Provider"],"summary":"Get providers for organization.","operationId":"getRegisteredProviders","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProviderResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"METADATA_PROVIDER","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/metadata/{providerId}/cursor/views/all":{"post":{"tags":["Metadata"],"summary":"Get metadata for given provider using cursor with details from given views.","operationId":"findProviderMetadataWithCursorAndViewsByProviderId","parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataWithCursorAndViewsByProviderIdRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataWithCursorAndViewsByProviderIdResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"METADATA","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/metadata/{providerId}/by-entities":{"post":{"tags":["Metadata"],"summary":"Get metadata for entities for given provider.","operationId":"getMetadataForEntities","parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string"}},{"name":"context-fallback","in":"header","required":false,"schema":{"type":"boolean","default":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMetadataForEntitiesRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMetadataForEntitiesResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"METADATA","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/metadata/{providerId}":{"post":{"tags":["Metadata"],"summary":"Upsert metadata for given provider.","operationId":"upsertMetadata","parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertMetadataRequest"}}},"required":true},"responses":{"204":{"description":"No Content","content":{}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"METADATA","accessType":"WRITE"}],"security":[{"oauth2":[]}]},"delete":{"tags":["Metadata"],"summary":"Delete metadata for given provider.","operationId":"deleteMetadata","parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMetadataRequest"}}},"required":true},"responses":{"204":{"description":"No Content","content":{}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"METADATA","accessType":"WRITE"}],"security":[{"oauth2":[]}]}},"/metadata/{providerId}/by-ids":{"delete":{"tags":["Metadata"],"summary":"Delete metadata for given provider by ids.","operationId":"deleteProviderMetadataByIds","parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProviderMetadataByIdsRequest"}}},"required":true},"responses":{"204":{"description":"No Content","content":{}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"METADATA","accessType":"WRITE"}],"security":[{"oauth2":[]}]}}},"components":{"schemas":{"ListProviderRequest":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"string"},"maxItems":100,"minItems":0,"title":"List of entity numbers."}},"required":["numbers"]},"ListProviderResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderResponseDto"}}},"required":["data"]},"ObjectId":{"type":"string"},"ProviderResponseDto":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"number":{"type":"string"},"entityType":{"type":"string","enum":["PRODUCT","CATEGORY"]}},"required":["entityType","id","name","number"]},"MetadataViewTypeRequest":{"type":"object","properties":{"type":{"type":"string","enum":["METADATA"]}},"required":["type"]},"MetadataWithCursorAndViewsByProviderIdRequest":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/MetadataViewTypeRequest"}},"count":{"type":"integer","format":"int32","maximum":100,"minimum":1},"cursor":{"$ref":"#/components/schemas/ObjectId"}},"required":["count"]},"MetadataWithCursorAndViewsByProviderIdDto":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/ObjectId"},"contextId":{"type":"string"},"metadata":{}},"required":["contextId","entityId"]},"MetadataWithCursorAndViewsByProviderIdResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MetadataWithCursorAndViewsByProviderIdDto"}},"nextCursor":{"$ref":"#/components/schemas/ObjectId"}},"required":["data"]},"GetMetadataForEntitiesRequest":{"type":"object","properties":{"entitiesIds":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"},"maxItems":100,"minItems":0},"contextId":{"type":"string"}},"required":["contextId","entitiesIds"]},"GetMetadataForEntitiesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderEntityMetadata"}}},"required":["data"]},"ProviderEntityMetadata":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/ObjectId"},"providerName":{"type":"string"},"metadata":{},"contextId":{"type":"string"}},"required":["contextId","entityId","metadata","providerName"]},"UpsertMetadataDto":{"type":"object","properties":{"entityId":{"type":"string","title":"An identifier randomly generated by PIM. ID is unique."},"contextId":{"type":"string","title":"Context id for given entity."},"value":{"title":"Metadata value. Must have JSON format."}},"required":["entityId","value"]},"UpsertMetadataRequest":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UpsertMetadataDto"},"maxItems":10,"minItems":0}},"required":["data"]},"DeleteProviderMetadataByIdsDto":{"type":"object","properties":{"entityId":{"$ref":"#/components/schemas/ObjectId"},"contextId":{"type":"string"}},"required":["contextId","entityId"]},"DeleteProviderMetadataByIdsRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"$ref":"#/components/schemas/DeleteProviderMetadataByIdsDto"},"maxItems":100,"minItems":1}},"required":["ids"]},"DeleteMetadataRequest":{"type":"object","properties":{"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId","title":"List of entity IDs to delete."},"maxItems":100,"minItems":0}},"required":["entityIds"]},"ErrorResponse":{"properties":{"status":{"type":"integer","format":"int32","title":"Error status code."},"error":{"type":"string","title":"General error description."},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"title":"List of errors details."},"requestId":{"type":"string","title":"Request ID used for logging."},"timestamp":{"type":"integer","format":"int64","title":"Error timestamp."},"conflictingEntities":{"type":"array","items":{"$ref":"#/components/schemas/ConflictingEntity"},"title":"Additional entity id list related to error"},"quotaLimitExceededDetails":{"type":"array","items":{"$ref":"#/components/schemas/LimitExceededDetails"},"title":"Additional details related to quota limit exceeded errors"}}},"ErrorDetails":{"properties":{"message":{"type":"string","title":"Error message."},"field":{"type":"string","title":"Error related field."},"rejectedValue":{"type":"string","title":"Invalid value causing error."}}},"ConflictingEntity":{"properties":{"entityId":{"type":"string","title":"Identifier of the related entity causing the conflict"}}},"LimitExceededDetails":{"properties":{"message":{"type":"string","title":"Detailed quota error message"},"quota":{"type":"string","title":"Unique quota identifier"},"limit":{"type":"integer","format":"int32","title":"Allowed limit"},"entityId":{"type":"string","title":"ID of the entity that violated the quota"},"entityType":{"type":"string","title":"Type of the entity that violated the quota"}}}},"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://idp.test.bluestonepim.com/op/token","scopes":{"openid profile systemRoles permissions organization email name nickname":"All needed scopes."}}}}}},"x-amazon-apigateway-api-key-source":"AUTHORIZER"}