# Payload Metadata

## List Payload Metadata

> Retrieves a paginated list of payload metadata records. Can be filtered by \`id\`, \`flow\_run\_id\`, \`flow\_step\_id\`, and \`flow\_log\_id\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Payload Metadata"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"PayloadMetadataListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"integer"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"string"}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}}}},"paths":{"/api/v1/payload-metadata":{"get":{"summary":"List Payload Metadata","description":"Retrieves a paginated list of payload metadata records. Can be filtered by `id`, `flow_run_id`, `flow_step_id`, and `flow_log_id`.","parameters":[{"name":"filter[id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by id."},{"name":"filter[flow_run_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by flow_run_id."},{"name":"filter[flow_step_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by flow_step_id."},{"name":"filter[flow_log_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by flow_log_id."},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for descending. Available: created_at, id"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadMetadataListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Payload Metadata"]}}}}
```

## Get Payload Metadata

> Retrieves the details of a specific payload metadata record.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Payload Metadata"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"PayloadMetadataResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayloadMetadata"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"integer"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"string"}}}}},"paths":{"/api/v1/payload-metadata/{payload_metadatum}":{"get":{"summary":"Get Payload Metadata","description":"Retrieves the details of a specific payload metadata record.","parameters":[{"name":"payload_metadatum","in":"path","required":true,"schema":{"type":"string"},"description":"The payload metadatum identifier."},{"name":"filter[id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by id."},{"name":"filter[flow_run_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by flow_run_id."},{"name":"filter[flow_step_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by flow_step_id."},{"name":"filter[flow_log_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by flow_log_id."},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for descending. Available: created_at, id"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadMetadataResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Payload Metadata"]}}}}
```

## Get Meta

> To be confirmed.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Payload Metadata"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}}},"paths":{"/api/v1/payload-metadata/{payloadMetadatum}/meta":{"get":{"summary":"Get Meta","description":"To be confirmed.","tags":["Payload Metadata"],"parameters":[{"name":"payloadMetadatum","in":"path","required":true,"schema":{"type":"string"},"description":"The payloadMetadatum identifier."}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}}}}}}
```

## Download Payload Metadata

> Downloads the payload data for a specific payload metadata record.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Payload Metadata"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}}},"paths":{"/api/v1/payload-metadata/{payloadMetadatum}/download":{"get":{"summary":"Download Payload Metadata","description":"Downloads the payload data for a specific payload metadata record.","parameters":[{"name":"payloadMetadatum","in":"path","required":true,"schema":{"type":"string"},"description":"The payloadMetadatum identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Payload Metadata"]}}}}
```
