Git Product home page Git Product logo

apihub-example's Introduction

apihub example

This repository contains a small example setup for using Apigee API hub.

Setup instructions

Identify your project.

PROJECT=registry-eval

Configure the registry tool for your project. This creates a ~/.config/registry directory containing files that configure the registry tool to point to your server and project.

registry config configurations create hosted \
  --registry.address apigeeregistry.googleapis.com:443 \
  --registry.project $PROJECT

You can view your current configuration with registry config list and you can make changes with registry config set.

Export the current contents of the registry. This creates a directory named to match your $PROJECT that contains the current contents of your registry.

registry export yaml projects/$PROJECT

Before adding APIs, temporarily disable background activity by removing your manifest file. The manifest is essentially a Makefile that tells the registry controller what generated artifacts you want in your registry and how to generate them. Generated artifacts include API complexity metrics, meta-properties like vocabularies, results of running linters, and API scores.

registry rpc delete-artifact \
  --name projects/$PROJECT/locations/global/artifacts/apihub-manifest

Now add the APIs from the openapi-directory.

registry upload openapi ./openapi-directory/APIs

Re-export the registry with registry export yaml:

registry export yaml projects/$PROJECT

Now you have a directory of YAML files describing your registry in detail. You can re-run this at any time and it will overwrite your current export (but watch out: things that you delete from your registry won't be removed from your local files).

Make some changes to your registry and re-export to see what has changed. You can make changes to your local files and push them to your registry with registry apply like this:

registry apply -f $PROJECT -R

Here $PROJECT is the name of the top-level directory containing your exported registry.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.