{"id":19969029,"url":"https://github.com/pwright/apicurio-api-hello-world","last_synced_at":"2025-09-02T03:36:31.532Z","repository":{"id":261636640,"uuid":"870250248","full_name":"pwright/apicurio-api-hello-world","owner":"pwright","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-11T10:14:07.000Z","size":230,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T17:48:35.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-09T17:46:13.000Z","updated_at":"2024-10-23T11:16:25.000Z","dependencies_parsed_at":"2024-11-07T16:40:10.817Z","dependency_job_id":"516f2c26-4b1f-4094-8f12-da4bef3be933","html_url":"https://github.com/pwright/apicurio-api-hello-world","commit_stats":null,"previous_names":["pwright/apicurio-api-hello-world"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pwright/apicurio-api-hello-world","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwright%2Fapicurio-api-hello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwright%2Fapicurio-api-hello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwright%2Fapicurio-api-hello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwright%2Fapicurio-api-hello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pwright","download_url":"https://codeload.github.com/pwright/apicurio-api-hello-world/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwright%2Fapicurio-api-hello-world/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273225804,"owners_count":25067389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T02:48:31.729Z","updated_at":"2025-09-02T03:36:31.500Z","avatar_url":"https://github.com/pwright.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- NOTE: This file is generated from skewer.yaml.  Do not edit it directly. --\u003e\n\n# Apicurio Registry Hello World\n\n[![main](https://github.com/pwright/apicurio-api-hello-world/actions/workflows/main.yaml/badge.svg)](https://github.com/pwright/apicurio-api-hello-world/actions/workflows/main.yaml)\n\n#### A minimal registry\n\nThis example is part of a [suite of examples][examples] showing the\ndifferent ways you can use [Apicurio Registry][website] a high performance, \nruntime registry for API designs and schemas .\n\n[website]: https://www.apicur.io/\n[examples]: https://www.apicur.io/examples/index.html\n\n#### Contents\n\n* [Overview](#overview)\n* [Prerequisites](#prerequisites)\n* [Step 1: Set up your cluster](#step-1-set-up-your-cluster)\n* [Step 2: Deploy Apicurio Registry](#step-2-deploy-apicurio-registry)\n* [Step 3: Expose the Registry](#step-3-expose-the-registry)\n* [Step 4: Populate the Registry](#step-4-populate-the-registry)\n* [Step 5: Query the Registry](#step-5-query-the-registry)\n* [Step 6: Get the artifact content using ID](#step-6-get-the-artifact-content-using-id)\n* [Step 7: Get the artifact metadata using ID](#step-7-get-the-artifact-metadata-using-id)\n* [Step 8: Get the artifact content using global ID](#step-8-get-the-artifact-content-using-global-id)\n* [Summary](#summary)\n* [Next steps](#next-steps)\n* [About this example](#about-this-example)\n\n## Overview\n\nIn this example, we'll run Apicurio Registry and populate it with a few \nschemas using the API.\nThen, we use the API to query the\n\n## Prerequisites\n\nAccess to a Kubernetes cluster. If you don't have access, skip the setup\nsteps and use Docker to set up Apicurio Registry as described in \n([Using Docker][getting-started])\n[getting-started]: https://www.apicur.io/registry/docs/apicurio-registry/2.6.x/getting-started/assembly-installing-registry-docker.html\n\n## Step 1: Set up your cluster\n\nSet up the `kubectl` command to use your\n[kubeconfig][kubeconfig] and current context to select the cluster\nand namespace where they operate.\n\n[kubeconfig]: https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/\n\nYour kubeconfig is stored in a file in your home directory.  The\n`skupper` and `kubectl` commands use the `KUBECONFIG` environment\nvariable to locate it.\n\nA single kubeconfig supports only one active context per user.\nSince you will be using multiple contexts at once in this\nexercise, you need to create distinct kubeconfigs.\n\n**Note:** The login procedure varies by provider.  See the\ndocumentation for yours:\n\n* [Minikube](https://skupper.io/start/minikube.html#cluster-access)\n* [Amazon Elastic Kubernetes Service (EKS)](https://skupper.io/start/eks.html#cluster-access)\n* [Azure Kubernetes Service (AKS)](https://skupper.io/start/aks.html#cluster-access)\n* [Google Kubernetes Engine (GKE)](https://skupper.io/start/gke.html#cluster-access)\n* [IBM Kubernetes Service](https://skupper.io/start/ibmks.html#cluster-access)\n* [OpenShift](https://skupper.io/start/openshift.html#cluster-access)\n\n_**Registry:**_\n\n~~~ shell\nexport KUBECONFIG=~/.kube/config-apicurio\n# Enter your provider-specific login command\nkubectl create namespace apicurio\nkubectl config set-context --current --namespace apicurio\n~~~\n\n## Step 2: Deploy Apicurio Registry\n\nThe `apicurio-deployment.yaml` file defines a Kubernetes deployment\nfor Apicurio registry and exposes the console and API through 8080.\n\n_**Registry:**_\n\n~~~ shell\nkubectl apply -f apicurio-deployment.yaml\n~~~\n\n## Step 3: Expose the Registry\n\nTo make the console and API available to external traffic\nyou need to port forward 8080.\n\n_**Registry:**_\n\n~~~ shell\nkubectl port-forward deployment/apicurio-registry 8080:8080\n~~~\n\n## Step 4: Populate the Registry\n\nThe `data1.json` file defines an AVRO schema.\nPosting this file to the API creates an artifact.\nYou can define a group `my-group` as you submit it to the API.\nAlternatively, replace `my-group` with `default` to not associate the\nartifact with a group.\n\n_**Registry:**_\n\n~~~ shell\ncurl -X POST -H \"Content-type: application/json; artifactType=AVRO\" -H \"X-Registry-ArtifactId: share-price\" --data @data1.json http://localhost:8080/apis/registry/v2/groups/my-group/artifacts\n~~~\n\n_Sample output:_\n\n~~~ console\n$ curl -X POST -H \"Content-type: application/json; artifactType=AVRO\" -H \"X-Registry-ArtifactId: share-price\" --data @data1.json http://localhost:8080/apis/registry/v2/groups/my-group/artifacts\n{\"contentId\":1,\"createdBy\":\"\",\"createdOn\":\"2024-10-10T14:15:05+0000\",\n\"globalId\":1,\"groupId\":\"my-group\",\"id\":\"share-price\",\"modifiedBy\":\"\",\n\"modifiedOn\":\"2024-10-10T14:15:05+0000\",\"name\":\"price\",\"references\":[],\n\"state\":\"ENABLED\",\"type\":\"AVRO\",\"version\":\"1\"}\n~~~\n\n## Step 5: Query the Registry\n\nYou can search on an artifact name using a GET query,\nhowever the results might not contain the metadata you require.\n\n_**Registry:**_\n\n~~~ shell\ncurl -X GET \"http://localhost:8080/apis/registry/v2/search/artifacts?name=share-price\"   -H \"Accept: application/json\"\n~~~\n\n_Sample output:_\n\n~~~ console\n$ curl -X GET \"http://localhost:8080/apis/registry/v2/search/artifacts?name=share-price\"   -H \"Accept: application/json\"\n{\"artifacts\":[{\"createdBy\":\"\",\"createdOn\":\"2024-10-10T14:15:05+0000\",\n\"groupId\":\"my-group\",\"id\":\"share-price\",\"modifiedBy\":\"\",\n\"modifiedOn\":\"2024-10-10T14:15:05+0000\",\"name\":\"price\",\"state\":\"ENABLED\",\n\"type\":\"AVRO\"}],\"count\":1}\n~~~\n\nThe response includes the artifact's `id` but not the content or global ID.\n\n## Step 6: Get the artifact content using ID\n\nYou can now retrieve the content of the artifact using the group and id\nusing the following pattern `http://\u003cregistry-url\u003e/apis/registry/v2/groups/\u003cgroupId\u003e/artifacts/\u003cartifactId\u003e`\n\n_**Registry:**_\n\n~~~ shell\ncurl -X GET \"http://localhost:8080/apis/registry/v2/groups/my-group/artifacts/share-price\" -H \"Accept: application/json\"\n~~~\n\n_Sample output:_\n\n~~~ console\n$ curl -X GET \"http://localhost:8080/apis/registry/v2/groups/my-group/artifacts/share-price\" -H \"Accept: application/json\"\n{ \"type\": \"record\", \"name\": \"price\", \"namespace\": \"com.example\", \n\"fields\": [ {\"name\": \"symbol\", \"type\": \"string\"}, \n{\"name\": \"price\", \"type\": \"string\"}]}\n~~~\n\nThe response does not include any metadata.\n\n## Step 7: Get the artifact metadata using ID\n\nYou can now retrieve the metadata of the artifact using the group and id\nusing the following pattern `http://\u003cregistry-url\u003e/apis/registry/v2/groups/\u003cgroupId\u003e/artifacts/\u003cartifactId\u003e/meta`\n\n_**Registry:**_\n\n~~~ shell\ncurl -X GET \"http://localhost:8080/apis/registry/v2/groups/my-group/artifacts/share-price/meta\" -H \"Accept: application/json\"\n~~~\n\n_Sample output:_\n\n~~~ console\n$ curl -X GET \"http://localhost:8080/apis/registry/v2/groups/my-group/artifacts/share-price/meta\" -H \"Accept: application/json\"\n{\"contentId\":1,\"createdBy\":\"\",\"createdOn\":\"2024-10-13T14:24:41+0000\",\n\"globalId\":1,\"groupId\":\"my-group\",\"id\":\"share-price\",\"modifiedBy\":\"\",\n\"modifiedOn\":\"2024-10-13T14:24:41+0000\",\"name\":\"price\",\"references\":[],\n\"state\":\"ENABLED\",\"type\":\"AVRO\",\"version\":\"1\"}\n~~~\n\n## Step 8: Get the artifact content using global ID\n\nYou can now retrieve the content of the artifact using the global id\nusing the following pattern `http://\u003cregistry-url\u003e/apis/registry/v2/ids/globalIds/\u003cglobalId\u003e`\n\n_**Registry:**_\n\n~~~ shell\ncurl -X GET \"http://localhost:8080/apis/registry/v2/ids/globalIds/1\" -H \"Accept: application/json\"\n~~~\n\n_Sample output:_\n\n~~~ console\n$ curl -X GET \"http://localhost:8080/apis/registry/v2/ids/globalIds/1\" -H \"Accept: application/json\"\n{ \"type\": \"record\", \"name\": \"price\", \"namespace\": \"com.example\", \n\"fields\": [ {\"name\": \"symbol\", \"type\": \"string\"}, \n{\"name\": \"price\", \"type\": \"string\"}]}\n~~~\n\n## Summary\n\nIn this example, after searching the registry you could get:\n* Content: GET /groups/{groupId}/artifacts/{artifactId}\n* Metadata: GET /groups/{groupId}/artifacts/{artifactId}/meta\n* Global ID (if known): GET /ids/globalIds/{globalId}\n\n## Next steps\n\nExplore more API calls using [Apicurio Registry v2 API UI](http://localhost:8080/apis/registry/v2).\n\n## About this example\n\nThis example was produced using [Skewer][skewer], a library for\ndocumenting and testing examples.\n\n[skewer]: https://github.com/skupperproject/skewer\n\nSkewer provides utility functions for generating the README and\nrunning the example steps.  Use the `./plano` command in the project\nroot to see what is available.\n\nTo quickly stand up the example using Minikube, try the `./plano demo`\ncommand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwright%2Fapicurio-api-hello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpwright%2Fapicurio-api-hello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwright%2Fapicurio-api-hello-world/lists"}