{"openapi":"3.0.1","info":{"title":"History","description":"Bluestone History API\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/history","description":"Default Server URL"}],"tags":[{"name":"History","description":"To interact with history api"}],"paths":{"/history":{"get":{"tags":["History"],"summary":"Retrieve history events.","operationId":"list","parameters":[{"name":"page","in":"query","description":"A number sequence representing a block of items to return as a result set.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"Size of a block of items to return. It corresponds with the page parameter.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32"}},{"name":"eventType","in":"query","description":"Type of event that we want to search","required":false,"schema":{"type":"string"}},{"name":"field","in":"query","description":"Field","required":false,"schema":{"type":"string"}},{"name":"origin","in":"query","description":"Origin","required":false,"schema":{"type":"string"}},{"name":"userId","in":"query","description":"User ID","required":false,"schema":{"type":"string"}},{"name":"fromTime","in":"query","description":"From time in milliseconds (epoch time)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"toTime","in":"query","description":"To time in milliseconds (epoch time)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"eventId","in":"query","description":"Event ID","required":false,"schema":{"type":"string"}},{"name":"metadataEntityId","in":"query","description":"Metadata Entity ID","required":false,"schema":{"type":"string"}},{"name":"context","in":"query","description":"Context","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListableHistoryEntryDto"}}}},"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":["STANDARD"],"x-bluestone-permission":[{"module":"HISTORY","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/history/{entityType}":{"get":{"tags":["History"],"summary":"Retrieve history events for given entity type.","operationId":"list_1","parameters":[{"name":"entityType","in":"path","description":"Entity type","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"page","in":"query","description":"A number sequence representing a block of items to return as a result set.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"Size of a block of items to return. It corresponds with the page parameter.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32"}},{"name":"eventType","in":"query","description":"Type of event that we want to search","required":false,"schema":{"type":"string"}},{"name":"field","in":"query","description":"Field","required":false,"schema":{"type":"string"}},{"name":"origin","in":"query","description":"Origin","required":false,"schema":{"type":"string"}},{"name":"userId","in":"query","description":"User ID","required":false,"schema":{"type":"string"}},{"name":"fromTime","in":"query","description":"From time in milliseconds (epoch time)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"toTime","in":"query","description":"To time in milliseconds (epoch time)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"eventId","in":"query","description":"Event ID","required":false,"schema":{"type":"string"}},{"name":"metadataEntityId","in":"query","description":"Metadata Entity ID","required":false,"schema":{"type":"string"}},{"name":"context","in":"query","description":"Context","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListableHistoryEntryDto"}}}},"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":["STANDARD"],"x-bluestone-permission":[{"module":"HISTORY","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/history/{entityType}/{id}":{"get":{"tags":["History"],"summary":"Retrieve the history (audit log) events recorded for one specific entity instance.","description":"Returns a paginated list of history events for the entity identified by entityType and id, optionally narrowed with the query parameters below.\nUse GET /history/{entityType} to list events for all entities of that type instead of one id, or GET /history/{entityType}/{id}/count to get just the number of matching events.\nAn entityType or id that doesn't exist isn't an error: the result is simply an empty list.\nFor restricted users, only entityType PRODUCT, CATEGORY, or RULES_ENGINE can be queried, and only for entities within the user's assigned policies; anything else fails with no access to the entity.\n","operationId":"list_2","parameters":[{"name":"entityType","in":"path","description":"The type of the entity to retrieve history for, e.g. PRODUCT, CATEGORY, or ORGANIZATION, as recorded by the service that produced the event.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"id","in":"path","description":"The id of the specific entity instance to retrieve history for (the product, category, etc. whose changes are being looked up).","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"page","in":"query","description":"A number sequence representing a block of items to return as a result set.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"Size of a block of items to return. It corresponds with the page parameter.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32"}},{"name":"eventType","in":"query","description":"Filters to events of this type, e.g. CREATE, UPDATE, DELETE, ASSOCIATE, or DISASSOCIATE depending on the service that produced the event; not validated against a fixed list.","required":false,"schema":{"type":"string"}},{"name":"field","in":"query","description":"Filters to events that changed this specific attribute/field of the entity, matching the field name shown in the event's metadata.","required":false,"schema":{"type":"string"}},{"name":"origin","in":"query","description":"Filters to events produced by this originating service, e.g. bluestone-pim, bluestone-tasks, or bluestone-labels.","required":false,"schema":{"type":"string"}},{"name":"userId","in":"query","description":"Filters to events performed by this user id.","required":false,"schema":{"type":"string"}},{"name":"fromTime","in":"query","description":"Only includes events at or after this time, in epoch milliseconds.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"toTime","in":"query","description":"Only includes events at or before this time, in epoch milliseconds.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"eventId","in":"query","description":"Accepted but currently has no effect on the results - do not rely on it to fetch a single event.","required":false,"schema":{"type":"string"}},{"name":"metadataEntityId","in":"query","description":"Filters to events whose metadata references this related entity id (e.g. a category or attribute referenced by a product change), distinct from the entity identified by the id path parameter.","required":false,"schema":{"type":"string"}},{"name":"context","in":"query","description":"Filters to events in this context, e.g. 'en'; matches the context field on the event.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListableHistoryEntryDto"}}}},"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":"HISTORY","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/history/{entityType}/{id}/count":{"get":{"tags":["History"],"summary":"Count events for given entity.","operationId":"count","parameters":[{"name":"entityType","in":"path","description":"Entity type","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"id","in":"path","description":"Id of resource","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"eventType","in":"query","description":"Type of event that we want to search","required":false,"schema":{"type":"string"}},{"name":"field","in":"query","description":"Field","required":false,"schema":{"type":"string"}},{"name":"origin","in":"query","description":"Origin","required":false,"schema":{"type":"string"}},{"name":"userId","in":"query","description":"User ID","required":false,"schema":{"type":"string"}},{"name":"fromTime","in":"query","description":"From time in milliseconds (epoch time)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"toTime","in":"query","description":"To time in milliseconds (epoch time)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"eventId","in":"query","description":"Event ID","required":false,"schema":{"type":"string"}},{"name":"metadataEntityId","in":"query","description":"Metadata Entity ID","required":false,"schema":{"type":"string"}},{"name":"context","in":"query","description":"Context","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryEntryCountResponse"}}}},"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":"HISTORY","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/history/{entityType}/scroll":{"get":{"tags":["History"],"summary":"Retrieve history events for a given entity type using Point-In-Time (PIT) search. Suitable for paginated access to large result sets.","description":"Use the 'count' parameter in the initial request to specify how many results to return.\nIn subsequent requests, use both 'scrollId' (returned from the previous response) and 'count' parameters together.\n\nNote: A new scrollId is returned with each response and must be used in the next request. Always update the scroll in your pagination logic.\n","operationId":"scrollList","parameters":[{"name":"entityType","in":"path","description":"Entity type","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"scrollId","in":"query","description":"Point in time cursor.","required":false,"schema":{"type":"string","nullable":true}},{"name":"count","in":"query","description":"Number of items to be returned.","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer","format":"int32","nullable":true}},{"name":"eventType","in":"query","description":"Type of event that we want to search","required":false,"schema":{"type":"string"}},{"name":"field","in":"query","description":"Field","required":false,"schema":{"type":"string"}},{"name":"origin","in":"query","description":"Origin","required":false,"schema":{"type":"string"}},{"name":"userId","in":"query","description":"User ID","required":false,"schema":{"type":"string"}},{"name":"fromTime","in":"query","description":"From time in milliseconds (epoch time)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"toTime","in":"query","description":"To time in milliseconds (epoch time)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"eventId","in":"query","description":"Event ID","required":false,"schema":{"type":"string"}},{"name":"metadataEntityId","in":"query","description":"Metadata Entity ID","required":false,"schema":{"type":"string"}},{"name":"context","in":"query","description":"Context","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListableWithCursorHistoryEntryDto"}}}},"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":["STANDARD"],"x-bluestone-permission":[{"module":"HISTORY","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/history/search/{entityType}":{"get":{"tags":["History"],"summary":"Retrieving the history of events for a given type of entities that have a value from the query.","operationId":"search","parameters":[{"name":"entityType","in":"path","description":"Entity type","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"page","in":"query","description":"A number sequence representing a block of items to return as a result set.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"Size of a block of items to return. It corresponds with the page parameter.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32"}},{"name":"context","in":"query","required":false,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"maxLength":2147483647,"minLength":2,"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListableHistoryEntryDto"}}}},"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":["STANDARD"],"x-bluestone-permission":[{"module":"HISTORY","accessType":"READ"}],"security":[{"oauth2":[]}]}},"/history/search/{entityType}/{id}":{"get":{"tags":["History"],"summary":"Retrieve history events for given entity that have a value from the query.","operationId":"search_1","parameters":[{"name":"entityType","in":"path","description":"Entity type","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"id","in":"path","description":"Id of resource","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"page","in":"query","description":"A number sequence representing a block of items to return as a result set.","required":false,"schema":{"minimum":0,"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"Size of a block of items to return. It corresponds with the page parameter.","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32"}},{"name":"context","in":"query","required":false,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"maxLength":2147483647,"minLength":2,"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListableHistoryEntryDto"}}}},"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":"HISTORY","accessType":"READ"}],"security":[{"oauth2":[]}]}}},"components":{"schemas":{"EntityDto":{"type":"object","properties":{"name":{"type":"string","nullable":true},"id":{"type":"string"},"type":{"type":"string"},"subEntity":{"$ref":"#/components/schemas/EntityDto"}},"nullable":true},"HistoryEntryDto":{"type":"object","properties":{"id":{"type":"string","nullable":true},"language":{"type":"string","nullable":true},"date":{"type":"integer","format":"int64","nullable":true},"metadata":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/HistoryEntryMetadataDto"}},"organizationId":{"type":"string","nullable":true},"entityType":{"type":"string","nullable":true},"eventType":{"type":"string","nullable":true},"entityIds":{"type":"array","nullable":true,"items":{"type":"string"}},"userId":{"type":"string","nullable":true},"origin":{"type":"string","nullable":true},"eventId":{"type":"string","nullable":true}}},"HistoryEntryMetadataDto":{"type":"object","properties":{"value":{"type":"string","nullable":true},"field":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"entity":{"$ref":"#/components/schemas/EntityDto"},"oldValue":{"type":"string","nullable":true}}},"ListableHistoryEntryDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntryDto"}}}},"HistoryEntryCountResponse":{"type":"object","properties":{"count":{"type":"integer","format":"int64"}}},"ListableWithCursorHistoryEntryDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntryDto"}}}},"ErrorResponse":{"type":"object","properties":{"status":{"title":"Error status code.","type":"integer","format":"int32"},"error":{"title":"General error description.","type":"string"},"errorDetails":{"title":"List of errors details.","type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}},"requestId":{"title":"Request ID used for logging.","type":"string"},"timestamp":{"title":"Error timestamp.","type":"integer","format":"int64"},"conflictingEntities":{"title":"Additional entity id list related to error","type":"array","items":{"$ref":"#/components/schemas/ConflictingEntity"}},"quotaLimitExceededDetails":{"title":"Additional details related to quota limit exceeded errors","type":"array","items":{"$ref":"#/components/schemas/LimitExceededDetails"}}}},"ErrorDetails":{"type":"object","properties":{"message":{"title":"Error message.","type":"string"},"field":{"title":"Error related field.","type":"string"},"rejectedValue":{"title":"Invalid value causing error.","type":"string"},"entityId":{"title":"Identifier of the entity related to the error.","type":"string"},"entityType":{"title":"Type of the entity related to the error.","type":"string"}}},"ConflictingEntity":{"type":"object","properties":{"entityId":{"title":"Identifier of the related entity causing the conflict","type":"string"},"entityType":{"title":"Type of the related entity causing the conflict","type":"string"}}},"LimitExceededDetails":{"type":"object","properties":{"message":{"title":"Detailed quota error message","type":"string"},"quota":{"title":"Unique quota identifier","type":"string"},"limit":{"title":"Allowed limit","type":"integer","format":"int32"},"entityId":{"title":"ID of the entity that violated the quota","type":"string","nullable":true},"entityType":{"title":"Type of the entity that violated the quota","type":"string","nullable":true}}}},"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"}