-
Notifications
You must be signed in to change notification settings - Fork 71
Publishing API hub custom curation samples to github #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hi @rsheikh5 could we look at adding some scripts to deploy the assets plus a tutorial, like the other samples in this repo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check other samples and add scripts to automate this
|
||
To begin, you will prepare your Apigee, Cloud Storage, and Integration Connectors environment. | ||
|
||
1. **Create API Proxies in Apigee**: Register three sample API proxies (`Orders API`, `Products API`, `Users API`) in your Apigee project and ensure they are deployed ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#create_api_proxies_in)). These will be automatically discovered by the API hub plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pointing to devsite URL
To begin, you will prepare your Apigee, Cloud Storage, and Integration Connectors environment. | ||
|
||
1. **Create API Proxies in Apigee**: Register three sample API proxies (`Orders API`, `Products API`, `Users API`) in your Apigee project and ensure they are deployed ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#create_api_proxies_in)). These will be automatically discovered by the API hub plugin. | ||
2. **Set up Cloud Storage**: Create a Cloud Storage bucket (e.g., `test_bucket`) ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#set_up)). Upload the three sample API specification files (`orders-api.yaml`, `products-api.yaml`, `users-api.yaml`) to this bucket ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#upload_api_specification_files)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devsite URL
|
||
1. **Create API Proxies in Apigee**: Register three sample API proxies (`Orders API`, `Products API`, `Users API`) in your Apigee project and ensure they are deployed ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#create_api_proxies_in)). These will be automatically discovered by the API hub plugin. | ||
2. **Set up Cloud Storage**: Create a Cloud Storage bucket (e.g., `test_bucket`) ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#set_up)). Upload the three sample API specification files (`orders-api.yaml`, `products-api.yaml`, `users-api.yaml`) to this bucket ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#upload_api_specification_files)). | ||
3. **Configure Cloud Storage Connection**: In Integration Connectors, create a new Cloud Storage connection named `fetch-specs` ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#configure_connection)). Configure it to use the service account you created earlier. This allows the integration to access the bucket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devsite URL
|
||
This step will create the custom logic in Application Integration that fetches and attaches the specs. | ||
|
||
1. **Create an Integration**: In the Application Integration UI, create a new integration named `test-curation` in the same region as API hub (e.g., `us-central1`) ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#step1)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devsite URL
This step will create the custom logic in Application Integration that fetches and attaches the specs. | ||
|
||
1. **Create an Integration**: In the Application Integration UI, create a new integration named `test-curation` in the same region as API hub (e.g., `us-central1`) ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#step1)). | ||
2. **Upload and Configure**: Upload the `enrich-with-spec-yaml.json` file to create a new version of the integration. Configure the `Fetch spec from GCS` connector task to use the `fetch-specs` connection you created ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#configure_connector_task_in_the_integration)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devsite URL
Now, you will configure API hub to use the integration you just published. | ||
|
||
1. **Set Up Custom Curation**: In the API hub **Settings > Curations** tab, set up a new curation named `enrich-curation` ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#step2)). Associate it with your `test-curation` integration by selecting the correct integration and its API trigger ID. | ||
2. **Edit the Plugin Instance**: Navigate to the **Plugins** tab and edit the default **Apigee X and Hybrid** plugin instance ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#step3)). Change its Curation logic from the default to your newly created `enrich-curation` custom curation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devsite URL
|
||
1. **Set Up Custom Curation**: In the API hub **Settings > Curations** tab, set up a new curation named `enrich-curation` ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#step2)). Associate it with your `test-curation` integration by selecting the correct integration and its API trigger ID. | ||
2. **Edit the Plugin Instance**: Navigate to the **Plugins** tab and edit the default **Apigee X and Hybrid** plugin instance ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#step3)). Change its Curation logic from the default to your newly created `enrich-curation` custom curation. | ||
3. **Verify Enriched Data**: Go to the **APIs** page in API hub. After the plugin runs, you will see that the `DemoAPI` proxies are now enriched with their corresponding specification files from the Cloud Storage bucket ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#step4)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devsite URL
|
||
### Step 4: Clean up resources | ||
|
||
To avoid incurring charges, clean up the resources created during this tutorial. You can either delete the entire Google Cloud project or delete the individual resources you created, such as the Cloud Storage bucket ([source](https://cloud.devsite.corp.google.com/apigee/docs/apihub/tutorials/enrich-api-data?content_ref=enable%20the%20cloud%20storage%20api#clean-up)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devsite URL
@@ -0,0 +1,69 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are the files .txt and not .json?
@@ -0,0 +1,90 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are the files .txt and not .json?
No description provided.