> For the complete documentation index, see [llms.txt](https://docs.enlyze.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enlyze.com/enlyze-api/api-referenz/production-runs.md).

# Production Runs

## Get Production Runs

> Returns a list of all production runs in your organization.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Production Runs"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"PaginatedProductionRuns":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProductionRun"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedProductionRuns"},"ProductionRun":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"The UUID of the production run."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The UUID of the machine the production run was executed on."},"production_order":{"type":"string","title":"Production Order","description":"The identifier of the production order."},"product":{"type":"string","format":"uuid","title":"Product","description":"The UUID of the product that was produced."},"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the production run in ISO8601 format with timezone info."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"The end of the production run in ISO8601 format with timezone info. If the value of this field is `null`, the production run is not yet finished."},"average_throughput":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Throughput","description":"The average throughput of the production run **excluding** downtimes."},"quantity_total":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Total Quantity","description":"This is the sum of scrap and yield."},"quantity_scrap":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Scrap Quantity","description":"The amount of product produced that doesn't meet quality criteria."},"quantity_yield":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Yield Quantity","description":"The amount of product produced that can be sold."},"availability":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Availability","description":"OEE component that reflects when the machine did not produce."},"performance":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Performance","description":"OEE component that reflects how fast the machine has run."},"quality":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Quality","description":"OEE component that reflects how many defects have been produced."},"productivity":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Productivity","description":"Aggregate OEE score that comprises availability, performance and quality."},"maximum_run_speed":{"anyOf":[{"$ref":"#/components/schemas/MaximumRunSpeed"},{"type":"null"}],"title":"Maximum Run Speed","description":"Maximum speed during the production run."},"data_quality":{"anyOf":[{"$ref":"#/components/schemas/DataQuality"},{"type":"null"}],"title":"Data Quality","description":"Data Quality metrics of the production run. A `null` value indicates that the metrics are not yet available, e.g. when a production run is still being executed."},"attributes":{"anyOf":[{"$ref":"#/components/schemas/Attributes"},{"type":"null"}],"title":"Attributes","description":"Arbitrary attributes of the production run."}},"type":"object","required":["uuid","machine","production_order","product","start","end","average_throughput","quantity_total","quantity_scrap","quantity_yield","availability","performance","quality","productivity","maximum_run_speed","data_quality","attributes"],"title":"ProductionRun"},"Quantity":{"properties":{"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical unit of quantity"},"value":{"type":"number","title":"The quantity expressed in `unit`"}},"type":"object","required":["unit","value"],"title":"Quantity"},"OEEComponent":{"properties":{"score":{"type":"number","title":"Score","description":"The score is expressed as a ratio between 0 and 1.0, with 1.0 meaning 100 %."},"time_loss":{"type":"integer","title":"Time Loss","description":"Time lost (in seconds) due to non-ideal production."}},"type":"object","required":["score","time_loss"],"title":"OEEComponent"},"MaximumRunSpeed":{"properties":{"value":{"type":"number","title":"Maximum Run Speed","description":"The highest speed observed during the observation period."},"observation_period_start":{"type":"string","format":"date-time","title":"Observation Period Start","description":"The start of the MRS observation period in ISO8601 format with timezone info."},"observation_period_end":{"type":"string","format":"date-time","title":"Observation Period End","description":"The end of the MRS observation period in ISO8601 format with timezone info."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of the maximum run speed."}},"type":"object","required":["value","observation_period_start","observation_period_end","unit"],"title":"MaximumRunSpeed"},"DataQuality":{"properties":{"data_coverage":{"type":"number","maximum":1,"minimum":0,"title":"Data Coverage","description":"The percentage of data coverage of the throughput variable for the production run."},"overlap_percentage":{"type":"number","maximum":1,"minimum":0,"title":"Overlap Percentage","description":"The percentage of overlap with other production runs."},"overlap_time":{"type":"integer","minimum":0,"title":"Overlap Time","description":"The time of overlap with other production runs in seconds."}},"type":"object","required":["data_coverage","overlap_percentage","overlap_time"],"title":"DataQuality"},"Attributes":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Attributes"},"Metadata":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pagination continuation point. Specify its value as the `cursor` parameter in a request with otherwise the same parameters to fetch the next page. `None`, if there is no more data to be fetched from the server."}},"additionalProperties":false,"type":"object","required":["next_cursor"],"title":"Metadata"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/production-runs":{"get":{"tags":["Production Runs"],"summary":"Get Production Runs","description":"Returns a list of all production runs in your organization.","operationId":"get_production_runs_v2_production_runs_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"name":"machine","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more machine UUIDs.","description":"If not set, production runs for all machines will be considered."},"description":"If not set, production runs for all machines will be considered."},{"name":"product-external-id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter by the external id of a product.","description":"If not set, all products will be considered."},"description":"If not set, all products will be considered."},{"name":"product","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Filter by product UUID","description":"If not set, all products will be considered."},"description":"If not set, all products will be considered."},{"name":"production-order-external-id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter by the external id of a production order.","description":"If not set, all production orders will be considered."},"description":"If not set, all production orders will be considered."},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filter by time, starting from","description":"Only production runs being executed starting at `start` will be returned. If not set, no lower time bound will be assumed."},"description":"Only production runs being executed starting at `start` will be returned. If not set, no lower time bound will be assumed."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filter by time, up to","description":"Only production runs being executed up to `end` will be returned. If not set, no upper time bound will be assumed."},"description":"Only production runs being executed up to `end` will be returned. If not set, no upper time bound will be assumed."},{"name":"uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more production run UUIDs.","description":"If not set, production runs for all UUIDs will be considered."},"description":"If not set, production runs for all UUIDs will be considered."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(?P<product_external_id>product-external-id:)(?P<product_external_id_value>.*)|^(?P<production_order_external_id>production-order-external-id:)(?P<production_order_external_id_value>.*)"},{"type":"null"}],"title":"Search query","description":"Filter production runs based on a partial match of the external id of the production order **or** product. Use `product-external-id:` and `production-external-id:` prefixes to specify the field to search in. "},"description":"Filter production runs based on a partial match of the external id of the production order **or** product. Use `product-external-id:` and `production-external-id:` prefixes to specify the field to search in. "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductionRuns"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get Production Run

> Returns details for a specific production run.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Production Runs"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ProductionRun":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"The UUID of the production run."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The UUID of the machine the production run was executed on."},"production_order":{"type":"string","title":"Production Order","description":"The identifier of the production order."},"product":{"type":"string","format":"uuid","title":"Product","description":"The UUID of the product that was produced."},"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the production run in ISO8601 format with timezone info."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"The end of the production run in ISO8601 format with timezone info. If the value of this field is `null`, the production run is not yet finished."},"average_throughput":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Throughput","description":"The average throughput of the production run **excluding** downtimes."},"quantity_total":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Total Quantity","description":"This is the sum of scrap and yield."},"quantity_scrap":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Scrap Quantity","description":"The amount of product produced that doesn't meet quality criteria."},"quantity_yield":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Yield Quantity","description":"The amount of product produced that can be sold."},"availability":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Availability","description":"OEE component that reflects when the machine did not produce."},"performance":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Performance","description":"OEE component that reflects how fast the machine has run."},"quality":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Quality","description":"OEE component that reflects how many defects have been produced."},"productivity":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Productivity","description":"Aggregate OEE score that comprises availability, performance and quality."},"maximum_run_speed":{"anyOf":[{"$ref":"#/components/schemas/MaximumRunSpeed"},{"type":"null"}],"title":"Maximum Run Speed","description":"Maximum speed during the production run."},"data_quality":{"anyOf":[{"$ref":"#/components/schemas/DataQuality"},{"type":"null"}],"title":"Data Quality","description":"Data Quality metrics of the production run. A `null` value indicates that the metrics are not yet available, e.g. when a production run is still being executed."},"attributes":{"anyOf":[{"$ref":"#/components/schemas/Attributes"},{"type":"null"}],"title":"Attributes","description":"Arbitrary attributes of the production run."}},"type":"object","required":["uuid","machine","production_order","product","start","end","average_throughput","quantity_total","quantity_scrap","quantity_yield","availability","performance","quality","productivity","maximum_run_speed","data_quality","attributes"],"title":"ProductionRun"},"Quantity":{"properties":{"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical unit of quantity"},"value":{"type":"number","title":"The quantity expressed in `unit`"}},"type":"object","required":["unit","value"],"title":"Quantity"},"OEEComponent":{"properties":{"score":{"type":"number","title":"Score","description":"The score is expressed as a ratio between 0 and 1.0, with 1.0 meaning 100 %."},"time_loss":{"type":"integer","title":"Time Loss","description":"Time lost (in seconds) due to non-ideal production."}},"type":"object","required":["score","time_loss"],"title":"OEEComponent"},"MaximumRunSpeed":{"properties":{"value":{"type":"number","title":"Maximum Run Speed","description":"The highest speed observed during the observation period."},"observation_period_start":{"type":"string","format":"date-time","title":"Observation Period Start","description":"The start of the MRS observation period in ISO8601 format with timezone info."},"observation_period_end":{"type":"string","format":"date-time","title":"Observation Period End","description":"The end of the MRS observation period in ISO8601 format with timezone info."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of the maximum run speed."}},"type":"object","required":["value","observation_period_start","observation_period_end","unit"],"title":"MaximumRunSpeed"},"DataQuality":{"properties":{"data_coverage":{"type":"number","maximum":1,"minimum":0,"title":"Data Coverage","description":"The percentage of data coverage of the throughput variable for the production run."},"overlap_percentage":{"type":"number","maximum":1,"minimum":0,"title":"Overlap Percentage","description":"The percentage of overlap with other production runs."},"overlap_time":{"type":"integer","minimum":0,"title":"Overlap Time","description":"The time of overlap with other production runs in seconds."}},"type":"object","required":["data_coverage","overlap_percentage","overlap_time"],"title":"DataQuality"},"Attributes":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Attributes"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/production-runs/{uuid}":{"get":{"tags":["Production Runs"],"summary":"Get Production Run","description":"Returns details for a specific production run.","operationId":"get_production_run_v2_production_runs__uuid__get","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the production run."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
