# Schema Registry # Config ## Retrieve `client.databases.schemaRegistry.config.retrieve(stringdatabaseClusterUuid, RequestOptionsoptions?): ConfigRetrieveResponse` **get** `/v2/databases/{database_cluster_uuid}/schema-registry/config` To retrieve the Schema Registry configuration for a Kafka cluster, send a GET request to `/v2/databases/$DATABASE_ID/schema-registry/config`. The response is a JSON object with a `compatibility_level` key, which is set to an object containing any database configuration parameters. ### Parameters - `databaseClusterUuid: string` ### Returns - `ConfigRetrieveResponse` - `compatibility_level: "NONE" | "BACKWARD" | "BACKWARD_TRANSITIVE" | 4 more` The compatibility level of the schema registry. - `"NONE"` - `"BACKWARD"` - `"BACKWARD_TRANSITIVE"` - `"FORWARD"` - `"FORWARD_TRANSITIVE"` - `"FULL"` - `"FULL_TRANSITIVE"` ### Example ```typescript import Gradient from '@digitalocean/gradient'; const client = new Gradient(); const config = await client.databases.schemaRegistry.config.retrieve('9cc10173-e9ea-4176-9dbc-a4cee4c4ff30'); console.log(config.compatibility_level); ``` ## Update `client.databases.schemaRegistry.config.update(stringdatabaseClusterUuid, ConfigUpdateParamsbody, RequestOptionsoptions?): ConfigUpdateResponse` **put** `/v2/databases/{database_cluster_uuid}/schema-registry/config` To update the Schema Registry configuration for a Kafka cluster, send a PUT request to `/v2/databases/$DATABASE_ID/schema-registry/config`. The response is a JSON object with a `compatibility_level` key, which is set to an object containing any database configuration parameters. ### Parameters - `databaseClusterUuid: string` - `body: ConfigUpdateParams` - `compatibility_level: "NONE" | "BACKWARD" | "BACKWARD_TRANSITIVE" | 4 more` The compatibility level of the schema registry. - `"NONE"` - `"BACKWARD"` - `"BACKWARD_TRANSITIVE"` - `"FORWARD"` - `"FORWARD_TRANSITIVE"` - `"FULL"` - `"FULL_TRANSITIVE"` ### Returns - `ConfigUpdateResponse` - `compatibility_level: "NONE" | "BACKWARD" | "BACKWARD_TRANSITIVE" | 4 more` The compatibility level of the schema registry. - `"NONE"` - `"BACKWARD"` - `"BACKWARD_TRANSITIVE"` - `"FORWARD"` - `"FORWARD_TRANSITIVE"` - `"FULL"` - `"FULL_TRANSITIVE"` ### Example ```typescript import Gradient from '@digitalocean/gradient'; const client = new Gradient(); const config = await client.databases.schemaRegistry.config.update('9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', { compatibility_level: 'BACKWARD', }); console.log(config.compatibility_level); ``` ## Retrieve Subject `client.databases.schemaRegistry.config.retrieveSubject(stringsubjectName, ConfigRetrieveSubjectParamsparams, RequestOptionsoptions?): ConfigRetrieveSubjectResponse` **get** `/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}` To retrieve the Schema Registry configuration for a Subject of a Kafka cluster, send a GET request to `/v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME`. The response is a JSON object with a `compatibility_level` key, which is set to an object containing any database configuration parameters. ### Parameters - `subjectName: string` - `params: ConfigRetrieveSubjectParams` - `database_cluster_uuid: string` A unique identifier for a database cluster. ### Returns - `ConfigRetrieveSubjectResponse` - `compatibility_level: "NONE" | "BACKWARD" | "BACKWARD_TRANSITIVE" | 4 more` The compatibility level of the schema registry. - `"NONE"` - `"BACKWARD"` - `"BACKWARD_TRANSITIVE"` - `"FORWARD"` - `"FORWARD_TRANSITIVE"` - `"FULL"` - `"FULL_TRANSITIVE"` - `subject_name: string` The name of the schema subject. ### Example ```typescript import Gradient from '@digitalocean/gradient'; const client = new Gradient(); const response = await client.databases.schemaRegistry.config.retrieveSubject('customer-schema', { database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', }); console.log(response.compatibility_level); ``` ## Update Subject `client.databases.schemaRegistry.config.updateSubject(stringsubjectName, ConfigUpdateSubjectParamsparams, RequestOptionsoptions?): ConfigUpdateSubjectResponse` **put** `/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}` To update the Schema Registry configuration for a Subject of a Kafka cluster, send a PUT request to `/v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME`. The response is a JSON object with a `compatibility_level` key, which is set to an object containing any database configuration parameters. ### Parameters - `subjectName: string` - `params: ConfigUpdateSubjectParams` - `database_cluster_uuid: string` Path param: A unique identifier for a database cluster. - `compatibility_level: "NONE" | "BACKWARD" | "BACKWARD_TRANSITIVE" | 4 more` Body param: The compatibility level of the schema registry. - `"NONE"` - `"BACKWARD"` - `"BACKWARD_TRANSITIVE"` - `"FORWARD"` - `"FORWARD_TRANSITIVE"` - `"FULL"` - `"FULL_TRANSITIVE"` ### Returns - `ConfigUpdateSubjectResponse` - `compatibility_level: "NONE" | "BACKWARD" | "BACKWARD_TRANSITIVE" | 4 more` The compatibility level of the schema registry. - `"NONE"` - `"BACKWARD"` - `"BACKWARD_TRANSITIVE"` - `"FORWARD"` - `"FORWARD_TRANSITIVE"` - `"FULL"` - `"FULL_TRANSITIVE"` - `subject_name: string` The name of the schema subject. ### Example ```typescript import Gradient from '@digitalocean/gradient'; const client = new Gradient(); const response = await client.databases.schemaRegistry.config.updateSubject('customer-schema', { database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', compatibility_level: 'BACKWARD', }); console.log(response.compatibility_level); ```