> 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/en/enlyze-api/api-reference/data-sinks.md).

# Data Sinks

⚠️ **Experimental** — this resource is under active development and may change without notice.

## Get Data Sinks

> Returns the data sinks in your organization. A data sink is a target a SPARK publishes its captured values to: an OPC UA server it hosts, an MQTT broker, or the ENLYZE platform.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Data Sinks","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"PaginatedDataSinks":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DataSink"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedDataSinks"},"DataSink":{"properties":{"name":{"type":"string","title":"Name","description":"Human readable name of the data sink, unique per SPARK."},"spark":{"type":"string","format":"uuid","title":"SPARK","description":"The SPARK that publishes to this data sink."},"uuid":{"type":"string","format":"uuid","title":"UUID","description":"Unique identifier of the data sink."},"type":{"$ref":"#/components/schemas/DataSinkType","title":"Type","description":"Kind of data sink; matches `details.type`."},"details":{"oneOf":[{"$ref":"#/components/schemas/MqttSinkDetails"},{"$ref":"#/components/schemas/OpcUaSinkDetails"},{"$ref":"#/components/schemas/EnlyzeSinkDetails"}],"title":"Data Sink Details","description":"Sink type specific connection and publishing properties.","discriminator":{"propertyName":"type","mapping":{"enlyze":"#/components/schemas/EnlyzeSinkDetails","mqtt":"#/components/schemas/MqttSinkDetails","opcua":"#/components/schemas/OpcUaSinkDetails"}}}},"type":"object","required":["name","spark","uuid","type","details"],"title":"DataSink"},"DataSinkType":{"type":"string","enum":["mqtt","opcua","enlyze"],"title":"DataSinkType"},"MqttSinkDetails":{"properties":{"type":{"type":"string","const":"mqtt","title":"Type"},"host":{"type":"string","title":"Host","description":"Host of the MQTT broker."},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port"},"client_id":{"type":"string","title":"Client Id","description":"Client ID of the MQTT client."},"topic":{"type":"string","title":"Topic","description":"Topic to publish data on."},"publish_interval":{"type":"integer","exclusiveMinimum":0,"title":"Publish Interval","description":"Interval in which buffered values are published, in milliseconds."}},"type":"object","required":["type","host","port","client_id","topic","publish_interval"],"title":"MqttSinkDetails"},"OpcUaSinkDetails":{"properties":{"type":{"type":"string","const":"opcua","title":"Type"},"application_name":{"type":"string","title":"Application Name","description":"Application name of the OPC UA server."},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port"},"minimum_transport_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity","title":"Minimum Transport Security","description":"Weakest OPC UA security policy tier the server offers for its endpoints; stronger tiers are always offered as well. `none` also exposes an unencrypted endpoint; `sha1` admits the SHA-1-based policies (Basic128Rsa15, Basic256), which the OPC Foundation has deprecated; `sha256` requires the SHA-256-based policies (Basic256Sha256, Aes128_Sha256_RsaOaep, Aes256_Sha256_RsaPss)."},"minimum_token_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity","title":"Minimum Token Security","description":"Weakest security policy tier accepted for encrypting user password tokens; the same tiers as `minimum_transport_security`."},"require_encryption":{"type":"boolean","title":"Require Encryption","description":"Only accept Sign & Encrypt sessions (reject Sign-only)."},"allow_anonymous_login":{"type":"boolean","title":"Allow Anonymous Login","description":"Whether anonymous login is allowed."},"users":{"items":{"$ref":"#/components/schemas/OpcUaSinkUser"},"type":"array","title":"Users","description":"Users allowed to log in."}},"type":"object","required":["type","application_name","port","minimum_transport_security","minimum_token_security","require_encryption","allow_anonymous_login","users"],"title":"OpcUaSinkDetails"},"OpcUaSinkMinimumSecurity":{"type":"string","enum":["none","sha1","sha256"],"title":"OpcUaSinkMinimumSecurity"},"OpcUaSinkUser":{"properties":{"username":{"type":"string","title":"Username"},"password_hash":{"type":"string","title":"Password Hash","description":"Argon2 hash of the user's password."}},"type":"object","required":["username","password_hash"],"title":"OpcUaSinkUser"},"EnlyzeSinkDetails":{"properties":{"type":{"type":"string","const":"enlyze","title":"Type"}},"type":"object","required":["type"],"title":"EnlyzeSinkDetails"},"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"},"InvalidCursorError":{"properties":{"type":{"type":"string","const":"invalid_cursor","title":"Type","default":"invalid_cursor"}},"type":"object","title":"InvalidCursorError"}}},"paths":{"/v2/data-sinks":{"get":{"tags":["Data Sinks"],"summary":"Get Data Sinks","description":"Returns the data sinks in your organization. A data sink is a target a SPARK publishes its captured values to: an OPC UA server it hosts, an MQTT broker, or the ENLYZE platform.","operationId":"get_data_sinks_v2_data_sinks_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"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 data sink UUIDs."}},{"name":"spark","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 SPARK UUIDs."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataSinks"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidCursorError"}],"discriminator":{"propertyName":"type","mapping":{"invalid_cursor":"#/components/schemas/InvalidCursorError"}},"title":"Response 422 Get Data Sinks V2 Data Sinks Get"}}}}}}}}}
```

## Post Data Sink

> Create a new data sink on a SPARK.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Data Sinks","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"CreateDataSinkRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"Human readable name of the data sink, unique per SPARK."},"spark":{"type":"string","format":"uuid","title":"SPARK","description":"The SPARK that publishes to this data sink."},"details":{"oneOf":[{"$ref":"#/components/schemas/CreateMqttSinkDetails"},{"$ref":"#/components/schemas/CreateOpcUaSinkDetails"},{"$ref":"#/components/schemas/EnlyzeSinkDetails"}],"title":"Data Sink Details","description":"Sink type specific connection and publishing properties.","discriminator":{"propertyName":"type","mapping":{"enlyze":"#/components/schemas/EnlyzeSinkDetails","mqtt":"#/components/schemas/CreateMqttSinkDetails","opcua":"#/components/schemas/CreateOpcUaSinkDetails"}}}},"type":"object","required":["spark","details"],"title":"CreateDataSinkRequest"},"CreateMqttSinkDetails":{"properties":{"type":{"type":"string","const":"mqtt","title":"Type"},"host":{"type":"string","title":"Host","description":"Host of the MQTT broker."},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port","default":1883},"client_id":{"type":"string","title":"Client Id","description":"Client ID of the MQTT client.","default":""},"topic":{"type":"string","title":"Topic","description":"Topic to publish data on."},"publish_interval":{"type":"integer","exclusiveMinimum":0,"title":"Publish Interval","description":"Interval in which buffered values are published, in milliseconds.","default":10000}},"type":"object","required":["type","host","topic"],"title":"CreateMqttSinkDetails"},"CreateOpcUaSinkDetails":{"properties":{"type":{"type":"string","const":"opcua","title":"Type"},"application_name":{"type":"string","title":"Application Name","description":"Application name of the OPC UA server.","default":"ENLYZE OPC UA"},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port","default":4840},"minimum_transport_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity","title":"Minimum Transport Security","description":"Weakest OPC UA security policy tier the server offers for its endpoints; stronger tiers are always offered as well. `none` also exposes an unencrypted endpoint; `sha1` admits the SHA-1-based policies (Basic128Rsa15, Basic256), which the OPC Foundation has deprecated; `sha256` requires the SHA-256-based policies (Basic256Sha256, Aes128_Sha256_RsaOaep, Aes256_Sha256_RsaPss).","default":"sha256"},"minimum_token_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity","title":"Minimum Token Security","description":"Weakest security policy tier accepted for encrypting user password tokens; the same tiers as `minimum_transport_security`.","default":"sha256"},"require_encryption":{"type":"boolean","title":"Require Encryption","description":"Only accept Sign & Encrypt sessions (reject Sign-only).","default":true},"allow_anonymous_login":{"type":"boolean","title":"Allow Anonymous Login","description":"Whether anonymous login is allowed.","default":false},"users":{"items":{"anyOf":[{"$ref":"#/components/schemas/CreateOpcUaSinkUser"},{"$ref":"#/components/schemas/OpcUaSinkUserHash"}]},"type":"array","title":"Users","description":"Users allowed to log in."}},"type":"object","required":["type"],"title":"CreateOpcUaSinkDetails"},"OpcUaSinkMinimumSecurity":{"type":"string","enum":["none","sha1","sha256"],"title":"OpcUaSinkMinimumSecurity"},"CreateOpcUaSinkUser":{"properties":{"username":{"type":"string","maxLength":60,"minLength":1,"title":"Username"},"password":{"type":"string","minLength":6,"title":"Password","description":"Plaintext password; stored as an argon2 hash."}},"type":"object","required":["username","password"],"title":"CreateOpcUaSinkUser"},"OpcUaSinkUserHash":{"properties":{"username":{"type":"string","maxLength":60,"minLength":1,"title":"Username"},"password_hash":{"type":"string","maxLength":128,"title":"Password Hash","description":"argon2id PHC hash, stored as-is. Parameters must meet the server's floor: m>=19456, t>=2, p>=1."}},"type":"object","required":["username","password_hash"],"title":"OpcUaSinkUserHash"},"EnlyzeSinkDetails":{"properties":{"type":{"type":"string","const":"enlyze","title":"Type"}},"type":"object","required":["type"],"title":"EnlyzeSinkDetails"},"DataSink":{"properties":{"name":{"type":"string","title":"Name","description":"Human readable name of the data sink, unique per SPARK."},"spark":{"type":"string","format":"uuid","title":"SPARK","description":"The SPARK that publishes to this data sink."},"uuid":{"type":"string","format":"uuid","title":"UUID","description":"Unique identifier of the data sink."},"type":{"$ref":"#/components/schemas/DataSinkType","title":"Type","description":"Kind of data sink; matches `details.type`."},"details":{"oneOf":[{"$ref":"#/components/schemas/MqttSinkDetails"},{"$ref":"#/components/schemas/OpcUaSinkDetails"},{"$ref":"#/components/schemas/EnlyzeSinkDetails"}],"title":"Data Sink Details","description":"Sink type specific connection and publishing properties.","discriminator":{"propertyName":"type","mapping":{"enlyze":"#/components/schemas/EnlyzeSinkDetails","mqtt":"#/components/schemas/MqttSinkDetails","opcua":"#/components/schemas/OpcUaSinkDetails"}}}},"type":"object","required":["name","spark","uuid","type","details"],"title":"DataSink"},"DataSinkType":{"type":"string","enum":["mqtt","opcua","enlyze"],"title":"DataSinkType"},"MqttSinkDetails":{"properties":{"type":{"type":"string","const":"mqtt","title":"Type"},"host":{"type":"string","title":"Host","description":"Host of the MQTT broker."},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port"},"client_id":{"type":"string","title":"Client Id","description":"Client ID of the MQTT client."},"topic":{"type":"string","title":"Topic","description":"Topic to publish data on."},"publish_interval":{"type":"integer","exclusiveMinimum":0,"title":"Publish Interval","description":"Interval in which buffered values are published, in milliseconds."}},"type":"object","required":["type","host","port","client_id","topic","publish_interval"],"title":"MqttSinkDetails"},"OpcUaSinkDetails":{"properties":{"type":{"type":"string","const":"opcua","title":"Type"},"application_name":{"type":"string","title":"Application Name","description":"Application name of the OPC UA server."},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port"},"minimum_transport_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity","title":"Minimum Transport Security","description":"Weakest OPC UA security policy tier the server offers for its endpoints; stronger tiers are always offered as well. `none` also exposes an unencrypted endpoint; `sha1` admits the SHA-1-based policies (Basic128Rsa15, Basic256), which the OPC Foundation has deprecated; `sha256` requires the SHA-256-based policies (Basic256Sha256, Aes128_Sha256_RsaOaep, Aes256_Sha256_RsaPss)."},"minimum_token_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity","title":"Minimum Token Security","description":"Weakest security policy tier accepted for encrypting user password tokens; the same tiers as `minimum_transport_security`."},"require_encryption":{"type":"boolean","title":"Require Encryption","description":"Only accept Sign & Encrypt sessions (reject Sign-only)."},"allow_anonymous_login":{"type":"boolean","title":"Allow Anonymous Login","description":"Whether anonymous login is allowed."},"users":{"items":{"$ref":"#/components/schemas/OpcUaSinkUser"},"type":"array","title":"Users","description":"Users allowed to log in."}},"type":"object","required":["type","application_name","port","minimum_transport_security","minimum_token_security","require_encryption","allow_anonymous_login","users"],"title":"OpcUaSinkDetails"},"OpcUaSinkUser":{"properties":{"username":{"type":"string","title":"Username"},"password_hash":{"type":"string","title":"Password Hash","description":"Argon2 hash of the user's password."}},"type":"object","required":["username","password_hash"],"title":"OpcUaSinkUser"},"DataSinkNotFoundError":{"properties":{"type":{"type":"string","const":"not_found","title":"Type","default":"not_found"}},"type":"object","title":"DataSinkNotFoundError"},"DataSinkConflictError":{"properties":{"type":{"type":"string","const":"conflict","title":"Type","default":"conflict"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"The conflicting request field, if known."}},"type":"object","required":["field"],"title":"DataSinkConflictError"},"EnlyzeDataSinkAlreadyExists":{"properties":{"type":{"type":"string","const":"enlyze_data_sink_already_exists","title":"Type","default":"enlyze_data_sink_already_exists"}},"type":"object","title":"EnlyzeDataSinkAlreadyExists"},"OpcUaDataSinkAlreadyExists":{"properties":{"type":{"type":"string","const":"opc_ua_data_sink_already_exists","title":"Type","default":"opc_ua_data_sink_already_exists"}},"type":"object","title":"OpcUaDataSinkAlreadyExists"},"DataSinkInvalidError":{"properties":{"type":{"type":"string","const":"invalid_data_sink","title":"Type","default":"invalid_data_sink"}},"type":"object","title":"DataSinkInvalidError"}}},"paths":{"/v2/data-sinks":{"post":{"tags":["Data Sinks"],"summary":"Post Data Sink","description":"Create a new data sink on a SPARK.","operationId":"post_data_sink_v2_data_sinks_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataSinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSink"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DataSinkNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"not_found":"#/components/schemas/DataSinkNotFoundError"}},"title":"Response 404 Post Data Sink V2 Data Sinks Post"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DataSinkConflictError"},{"$ref":"#/components/schemas/EnlyzeDataSinkAlreadyExists"},{"$ref":"#/components/schemas/OpcUaDataSinkAlreadyExists"}],"discriminator":{"propertyName":"type","mapping":{"conflict":"#/components/schemas/DataSinkConflictError","enlyze_data_sink_already_exists":"#/components/schemas/EnlyzeDataSinkAlreadyExists","opc_ua_data_sink_already_exists":"#/components/schemas/OpcUaDataSinkAlreadyExists"}},"title":"Response 409 Post Data Sink V2 Data Sinks Post"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DataSinkInvalidError"}],"discriminator":{"propertyName":"type","mapping":{"invalid_data_sink":"#/components/schemas/DataSinkInvalidError"}},"title":"Response 422 Post Data Sink V2 Data Sinks Post"}}}}}}}}}
```

## Get Data Sink

> Returns details for a specific data sink.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Data Sinks","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"DataSink":{"properties":{"name":{"type":"string","title":"Name","description":"Human readable name of the data sink, unique per SPARK."},"spark":{"type":"string","format":"uuid","title":"SPARK","description":"The SPARK that publishes to this data sink."},"uuid":{"type":"string","format":"uuid","title":"UUID","description":"Unique identifier of the data sink."},"type":{"$ref":"#/components/schemas/DataSinkType","title":"Type","description":"Kind of data sink; matches `details.type`."},"details":{"oneOf":[{"$ref":"#/components/schemas/MqttSinkDetails"},{"$ref":"#/components/schemas/OpcUaSinkDetails"},{"$ref":"#/components/schemas/EnlyzeSinkDetails"}],"title":"Data Sink Details","description":"Sink type specific connection and publishing properties.","discriminator":{"propertyName":"type","mapping":{"enlyze":"#/components/schemas/EnlyzeSinkDetails","mqtt":"#/components/schemas/MqttSinkDetails","opcua":"#/components/schemas/OpcUaSinkDetails"}}}},"type":"object","required":["name","spark","uuid","type","details"],"title":"DataSink"},"DataSinkType":{"type":"string","enum":["mqtt","opcua","enlyze"],"title":"DataSinkType"},"MqttSinkDetails":{"properties":{"type":{"type":"string","const":"mqtt","title":"Type"},"host":{"type":"string","title":"Host","description":"Host of the MQTT broker."},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port"},"client_id":{"type":"string","title":"Client Id","description":"Client ID of the MQTT client."},"topic":{"type":"string","title":"Topic","description":"Topic to publish data on."},"publish_interval":{"type":"integer","exclusiveMinimum":0,"title":"Publish Interval","description":"Interval in which buffered values are published, in milliseconds."}},"type":"object","required":["type","host","port","client_id","topic","publish_interval"],"title":"MqttSinkDetails"},"OpcUaSinkDetails":{"properties":{"type":{"type":"string","const":"opcua","title":"Type"},"application_name":{"type":"string","title":"Application Name","description":"Application name of the OPC UA server."},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port"},"minimum_transport_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity","title":"Minimum Transport Security","description":"Weakest OPC UA security policy tier the server offers for its endpoints; stronger tiers are always offered as well. `none` also exposes an unencrypted endpoint; `sha1` admits the SHA-1-based policies (Basic128Rsa15, Basic256), which the OPC Foundation has deprecated; `sha256` requires the SHA-256-based policies (Basic256Sha256, Aes128_Sha256_RsaOaep, Aes256_Sha256_RsaPss)."},"minimum_token_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity","title":"Minimum Token Security","description":"Weakest security policy tier accepted for encrypting user password tokens; the same tiers as `minimum_transport_security`."},"require_encryption":{"type":"boolean","title":"Require Encryption","description":"Only accept Sign & Encrypt sessions (reject Sign-only)."},"allow_anonymous_login":{"type":"boolean","title":"Allow Anonymous Login","description":"Whether anonymous login is allowed."},"users":{"items":{"$ref":"#/components/schemas/OpcUaSinkUser"},"type":"array","title":"Users","description":"Users allowed to log in."}},"type":"object","required":["type","application_name","port","minimum_transport_security","minimum_token_security","require_encryption","allow_anonymous_login","users"],"title":"OpcUaSinkDetails"},"OpcUaSinkMinimumSecurity":{"type":"string","enum":["none","sha1","sha256"],"title":"OpcUaSinkMinimumSecurity"},"OpcUaSinkUser":{"properties":{"username":{"type":"string","title":"Username"},"password_hash":{"type":"string","title":"Password Hash","description":"Argon2 hash of the user's password."}},"type":"object","required":["username","password_hash"],"title":"OpcUaSinkUser"},"EnlyzeSinkDetails":{"properties":{"type":{"type":"string","const":"enlyze","title":"Type"}},"type":"object","required":["type"],"title":"EnlyzeSinkDetails"},"DataSinkNotFoundError":{"properties":{"type":{"type":"string","const":"not_found","title":"Type","default":"not_found"}},"type":"object","title":"DataSinkNotFoundError"},"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/data-sinks/{uuid}":{"get":{"tags":["Data Sinks"],"summary":"Get Data Sink","description":"Returns details for a specific data sink.","operationId":"get_data_sink_v2_data_sinks__uuid__get","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the data sink."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSink"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DataSinkNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"not_found":"#/components/schemas/DataSinkNotFoundError"}},"title":"Response 404 Get Data Sink V2 Data Sinks  Uuid  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Delete Data Sink

> Delete a data sink. The SPARK stops publishing to it.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Data Sinks","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"DataSinkNotFoundError":{"properties":{"type":{"type":"string","const":"not_found","title":"Type","default":"not_found"}},"type":"object","title":"DataSinkNotFoundError"},"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/data-sinks/{uuid}":{"delete":{"tags":["Data Sinks"],"summary":"Delete Data Sink","description":"Delete a data sink. The SPARK stops publishing to it.","operationId":"delete_data_sink_v2_data_sinks__uuid__delete","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the data sink."}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DataSinkNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"not_found":"#/components/schemas/DataSinkNotFoundError"}},"title":"Response 404 Delete Data Sink V2 Data Sinks  Uuid  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Update Data Sink

> Partially update a data sink. Only fields present in the request change. Neither the sink's \`type\` nor its \`spark\` can be changed; \`details.users\` of an OPC UA sink replaces the full list of users.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Data Sinks","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"UpdateDataSinkRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Human readable name of the data sink, unique per SPARK."},"details":{"oneOf":[{"$ref":"#/components/schemas/PatchMqttSinkDetails"},{"$ref":"#/components/schemas/PatchOpcUaSinkDetails"},{"$ref":"#/components/schemas/PatchEnlyzeSinkDetails"}],"title":"Data Sink Details","description":"Sink type specific connection and publishing properties.","discriminator":{"propertyName":"type","mapping":{"enlyze":"#/components/schemas/PatchEnlyzeSinkDetails","mqtt":"#/components/schemas/PatchMqttSinkDetails","opcua":"#/components/schemas/PatchOpcUaSinkDetails"}}}},"additionalProperties":false,"type":"object","title":"UpdateDataSinkRequest"},"PatchMqttSinkDetails":{"properties":{"type":{"type":"string","const":"mqtt","title":"Type"},"host":{"type":"string","title":"Host"},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port"},"client_id":{"type":"string","title":"Client Id"},"topic":{"type":"string","title":"Topic"},"publish_interval":{"type":"integer","exclusiveMinimum":0,"title":"Publish Interval"}},"additionalProperties":false,"type":"object","required":["type"],"title":"PatchMqttSinkDetails"},"PatchOpcUaSinkDetails":{"properties":{"type":{"type":"string","const":"opcua","title":"Type"},"application_name":{"type":"string","title":"Application Name"},"port":{"type":"integer","maximum":65535,"minimum":0,"title":"Port"},"minimum_transport_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity"},"require_encryption":{"type":"boolean","title":"Require Encryption"},"allow_anonymous_login":{"type":"boolean","title":"Allow Anonymous Login"},"minimum_token_security":{"$ref":"#/components/schemas/OpcUaSinkMinimumSecurity"},"users":{"items":{"anyOf":[{"$ref":"#/components/schemas/CreateOpcUaSinkUser"},{"$ref":"#/components/schemas/OpcUaSinkUserHash"}]},"type":"array","title":"Users","description":"Replaces the full list of users. Pass users you aren't changing back by their `password_hash` from a read; a plaintext `password` sets a new one."}},"additionalProperties":false,"type":"object","required":["type"],"title":"PatchOpcUaSinkDetails"},"OpcUaSinkMinimumSecurity":{"type":"string","enum":["none","sha1","sha256"],"title":"OpcUaSinkMinimumSecurity"},"CreateOpcUaSinkUser":{"properties":{"username":{"type":"string","maxLength":60,"minLength":1,"title":"Username"},"password":{"type":"string","minLength":6,"title":"Password","description":"Plaintext password; stored as an argon2 hash."}},"type":"object","required":["username","password"],"title":"CreateOpcUaSinkUser"},"OpcUaSinkUserHash":{"properties":{"username":{"type":"string","maxLength":60,"minLength":1,"title":"Username"},"password_hash":{"type":"string","maxLength":128,"title":"Password Hash","description":"argon2id PHC hash, stored as-is. Parameters must meet the server's floor: m>=19456, t>=2, p>=1."}},"type":"object","required":["username","password_hash"],"title":"OpcUaSinkUserHash"},"PatchEnlyzeSinkDetails":{"properties":{"type":{"type":"string","const":"enlyze","title":"Type"}},"additionalProperties":false,"type":"object","required":["type"],"title":"PatchEnlyzeSinkDetails"},"DataSinkNotFoundError":{"properties":{"type":{"type":"string","const":"not_found","title":"Type","default":"not_found"}},"type":"object","title":"DataSinkNotFoundError"},"DataSinkConflictError":{"properties":{"type":{"type":"string","const":"conflict","title":"Type","default":"conflict"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"The conflicting request field, if known."}},"type":"object","required":["field"],"title":"DataSinkConflictError"},"DataSinkInvalidError":{"properties":{"type":{"type":"string","const":"invalid_data_sink","title":"Type","default":"invalid_data_sink"}},"type":"object","title":"DataSinkInvalidError"},"SinkTypeImmutableError":{"properties":{"type":{"type":"string","const":"sink_type_immutable","title":"Type","default":"sink_type_immutable"},"current":{"type":"string","title":"Current","description":"The sink's actual type."},"requested":{"type":"string","title":"Requested","description":"The type the request carried."}},"type":"object","required":["current","requested"],"title":"SinkTypeImmutableError"}}},"paths":{"/v2/data-sinks/{uuid}":{"patch":{"tags":["Data Sinks"],"summary":"Update Data Sink","description":"Partially update a data sink. Only fields present in the request change. Neither the sink's `type` nor its `spark` can be changed; `details.users` of an OPC UA sink replaces the full list of users.","operationId":"update_data_sink_v2_data_sinks__uuid__patch","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the data sink."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataSinkRequest"}}}},"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DataSinkNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"not_found":"#/components/schemas/DataSinkNotFoundError"}},"title":"Response 404 Update Data Sink V2 Data Sinks  Uuid  Patch"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DataSinkConflictError"}],"discriminator":{"propertyName":"type","mapping":{"conflict":"#/components/schemas/DataSinkConflictError"}},"title":"Response 409 Update Data Sink V2 Data Sinks  Uuid  Patch"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DataSinkInvalidError"},{"$ref":"#/components/schemas/SinkTypeImmutableError"}],"discriminator":{"propertyName":"type","mapping":{"invalid_data_sink":"#/components/schemas/DataSinkInvalidError","sink_type_immutable":"#/components/schemas/SinkTypeImmutableError"}},"title":"Response 422 Update Data Sink V2 Data Sinks  Uuid  Patch"}}}}}}}}}
```
