// Metadata created by nebel
// ParentAssemblies: assemblies/getting-started/as_installing-the-registry.adoc

[id="writing-registry-client"]
= Writing {registry} client applications

[role="_abstract"]
This section explains how to manage artifacts stored in {registry} using a Java client application. 

.Prerequisites
* See {registry-overview}
* {registry} must be installed and running in your environment

.Procedure
. Add the following dependency to your Maven project:
+
[source,xml,subs="+quotes,attributes"]
----
<dependency>
    <groupId>io.apicurio</groupId>
    <artifactId>apicurio-registry-client</artifactId>
    <version>${apicurio-registry.version}</version>
</dependency>
----

. Create a registry client as follows:
+
[source,java,subs="+quotes,attributes"]
----
public class ClientExample {

    private static final RegistryRestClient client;

     public static void main(String[] args) throws Exception {
        // Create a registry client
        String registryUrl = "https://my-registry.my-domain.com/apis/registry/v2"; <1>
        RegistryClient client = RegistryClientFactory.create(registryUrl); <2>
    }
}
----
<1> If you specify an example registry URL of `https://my-registry.my-domain.com`, the client will automatically append `/apis/registry/v2`.
<2> For more options when creating a {registry} client, see the Java client configuration in the next section.

. When the client is created, you can use all the operations from the {registry} REST API through the client. For more details, see the link:{attachmentsdir}/registry-rest-api.htm[Apicurio Registry REST API documentation].

[role="_additional-resources"]
.Additional resources
* For an open source example of how to use and customize the {registry} client, see the https://github.com/Apicurio/apicurio-registry-examples[Registry REST client demonstration example]

* For details on how to use the {registry} Kafka client serializers/deserializers (SerDes) in producer and consumer applications, see {kafka-client-serdes}
