// Metadata created by nebel
// ParentAssemblies: assemblies/getting-started/as_managing-registry-artifacts.adoc

[id="adding-artifacts-using-console_{context}"]
= Adding artifacts using the {registry} web console

[role="_abstract"]
You can use the {registry} web console to upload schema and API artifacts to {registry}. This section shows simple examples of creating {registry} artifacts and adding new artifact versions.

.Prerequisites

* {registry} is installed and running in your environment.
* You are logged in to the {registry} web console:
+
`{registry-url}`

.Procedure

. On the *Explore* tab, click *Create artifact*, and complete the *Create artifact* wizard:
+
[NOTE]
====
You can create a placeholder artifact without content, but you must specify the artifact type, as {registry} cannot automatically detect the content type.
Creating a placeholder allows you create rules first and add content later.
====

.. Specify the *Artifact Coordinates* and click *Next*:
+
*  *Group ID & Artifact ID*: Use the default empty settings to automatically generate an artifact ID and add the artifact to the `default` artifact group. Alternatively, you can enter an optional artifact group or artifact ID.
* *Type*: Use the default *Auto-Detect* setting to automatically detect the artifact type (not allowed if creating an empty artifact), or select the artifact type from the list, for example, *Avro Schema* or *OpenAPI*. You must manually select the *Kafka Connect Schema* artifact type, which cannot be automatically detected.

.. Specify the *Artifact Metadata* and click *Next*:
+
* *Name*: Enter an optional friendly name for the new artifact.
* *Description*: Enter an optional description for the new artifact.
* *Labels*: Optionally add one or more label (name/value pair) for the new artifact.

.. Specify the *Version Content* and click *Next*:
+
* *Version Number*: Optionally add a version string if creating a first version.
* *Content*: Specify the content using either of the following options:
** *From file*: Click *Browse*, and select a file, or drag and drop a file. For example, `my-openapi.json` or `my-schema.proto`. Alternatively, you can enter the file contents in the text box.
** *From URL*: Enter a valid and accessible URL, and click *Fetch*. For example: `\https://petstore3.swagger.io/api/v3/openapi.json`.

.. Specify the *Version Metadata*:
+
** *Name*: Enter an optional friendly name for the first artifact version.
** *Description*: Enter an optional description for the first artifact version.
** *Labels*: Optionally add one or more label (name/value pair) for the first artifact version.

. Click *Create* and view the artifact details:
+
** *Overview*: Displays artifact metadata such as artifact ID, name, description, labels, and so on. Also displays rules for validity and compatibility that you can configure for artifact content.
** *Versions*: Displays a list of all artifact versions.  This will be empty unless you chose to upload a first version when you created the artifact.
** *Branches*: Displays a list of branches for the artifact. This will display at least the `latest` branch, but might display other generated branches depending on your configuration.
+
The following example shows an example Apache Avro artifact:
+
.Artifact details in {registry} web console
image::images/getting-started/registry-web-console-artifact.png[Artifact details in Registry web console]

. On the *Overview* tab, click the *Edit* pencil icon to edit artifact metadata such as name or description. 
+
You can also add zero or more labels (name + value) for categorizing and searching purposes. To add labels, perform the following steps:
+
.. Click *Add label*.
.. Enter the key name and the value (optional).
.. Repeat the first two steps to add multiple properties.
.. Click *Save*.
 
. To save the artifact contents to a local file, for example, `my-protobuf-schema.proto` or `my-openapi.json`, click *Download* at the end of the page. 

. To add a new artifact version, switch to the **Versions** tab and then click *Create version* in the toolbar.  From there, provide the following information:
.. *Version Number*: Optionally add a version string for the new version.
.. *Content*: Specify the content using either of the following options:
... *From file*: Click *Browse*, and select a file, or drag and drop a file. For example, `my-openapi.json` or `my-schema.proto`. Alternatively, you can enter the file contents in the text box.
... *From URL*: Enter a valid and accessible URL, and click *Fetch*. For example: `\https://petstore3.swagger.io/api/v3/openapi.json`.
.. Now you can click the *Create* button to create the new version.
. To delete an artifact, click *Delete* in the page header.
+
WARNING: Deleting an artifact deletes the artifact and all of its versions, and cannot be undone.

[role="_additional-resources"]
.Additional resources
* xref:browsing-artifacts-using-console_{context}[]
* xref:configuring-rules-using-console_{context}[]
* {registry-rule-reference}
