{"id":13458674,"url":"https://github.com/Azure-Samples/APICenter-Reference","last_synced_at":"2025-03-24T15:31:53.130Z","repository":{"id":240976881,"uuid":"788790766","full_name":"Azure-Samples/APICenter-Reference","owner":"Azure-Samples","description":"This provides some reference use cases while using Azure API Center","archived":false,"fork":false,"pushed_at":"2024-10-28T09:11:59.000Z","size":9391,"stargazers_count":13,"open_issues_count":4,"forks_count":14,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-10-29T03:33:21.142Z","etag":null,"topics":["api-center","api-center-analyzer","api-center-portal","apicenter","apicenter-analyzer","apicenter-portal","azd","azd-templates","azure","azure-api-center"],"latest_commit_sha":null,"homepage":"https://aka.ms/apicenter-sample","language":"Bicep","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure-Samples.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","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-04-19T05:00:40.000Z","updated_at":"2024-10-19T05:31:49.000Z","dependencies_parsed_at":"2024-06-28T03:54:33.407Z","dependency_job_id":"2f8b8155-62a9-4c76-a672-0359b215882c","html_url":"https://github.com/Azure-Samples/APICenter-Reference","commit_stats":null,"previous_names":["azure-samples/apicenter-reference"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure-Samples%2FAPICenter-Reference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure-Samples%2FAPICenter-Reference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure-Samples%2FAPICenter-Reference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure-Samples%2FAPICenter-Reference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure-Samples","download_url":"https://codeload.github.com/Azure-Samples/APICenter-Reference/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245298148,"owners_count":20592550,"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","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":["api-center","api-center-analyzer","api-center-portal","apicenter","apicenter-analyzer","apicenter-portal","azd","azd-templates","azure","azure-api-center"],"created_at":"2024-07-31T09:00:55.065Z","updated_at":"2025-03-24T15:31:48.114Z","avatar_url":"https://github.com/Azure-Samples.png","language":"Bicep","funding_links":[],"categories":["3. Templates"],"sub_categories":["3.1 Microsoft"],"readme":"# API Center Reference\n\nThroughout this reference sample, we'd like to give developer experiences how to use API Center (APIC) and seamless integration with API Management (APIM), as well as inner-loop development velocity increase.\n\n- API Inventory\n  - To Showcase API Management integration to quickly build API inventory from many API Management instances\n  - To register APIs manually or through GitHub Actions workflow\n- API Governance\n  - To perform shift-left API governance functionality in VS Code\n  - To run APIC Analyzer for server-side linting\n  - To manage custom metadata\n  \u003c!-- - To handle events through Azure Event Grid and Logic Apps --\u003e\n- API Discovery and Consumption\n  - To integrate the client SDK in .NET \u0026 JavaScript\n  - To prepare the server app scaffolding in .NET and JavaScript\n  - To manage API Center OSS portal\n\n## Prerequisites\n\n- [Azure Subscription](https://azure.microsoft.com/free/?WT.mc_id=dotnet-134184-juyoo)\n- [Visual Studio Code](https://code.visualstudio.com/) with [API Center extension](https://marketplace.visualstudio.com/items?itemName=apidev.azure-api-center)\n- [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd?WT.mc_id=dotnet-134184-juyoo)\n- [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli?WT.mc_id=dotnet-134184-juyoo) with [API Center extension](https://learn.microsoft.com/cli/azure/azure-cli-extensions-list?WT.mc_id=dotnet-134184-juyoo)\n- [GitHub CLI](https://cli.github.com)\n- [.NET SDK 8.0](https://dotnet.microsoft.com/download/dotnet/8.0?WT.mc_id=dotnet-134184-juyoo) or later\n- [node.js 18.x](https://nodejs.org/en/download/) or later\n\n## Getting Started\n\nProvisioning and deploying all the resources are as easy as running a few commands. Follow the steps below to get started.\n\n1. Fork this repository.\n1. Clone the forked repository to your local machine or [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Azure-Samples/APICenter-Reference)\n1. Log in with the following command. Then, you will be able to use the `azd` cli to quickly provision and deploy the application.\n\n    ```bash\n    # Authenticate with Azure Developer CLI\n    azd auth login\n    \n    # Authenticate with Azure CLI\n    az login\n    ```\n\n1. Run `azd provision` to provision all the resources to Azure and deploy the code to those resources.\n\n    ```bash\n    azd provision\n    ```\n\n1. After the deployment is completed, navigate to Azure Portal and find the API Center instance. Then, you'll see all the APIs registered.\n\n   ![APIs registered on API Center](./docs/images/getting-started-01.png)\n\n1. Navigate to the API Analysis blade and see the analysis results.\n\n   ![API Analysis](./docs/images/getting-started-02.png)\n\n1. Find the Azure Static Web App instance name ending with `-portal` and open the app to see the API Center portal.\n\n   ![API Center Portal](./docs/images/getting-started-03.png)\n\n1. Login to the portal and you'll see all the APIs registered to the API Center.\n\n   ![API Center Portal](./docs/images/getting-started-04.png)\n\n1. If you want to see how APIs registered in API Center are integrated with the existing applications, run the following command to deploy both .NET apps and node.js apps to Azure.\n\n    ```bash\n    azd deploy\n    ```\n\n1. If you want to run both `azd provision` and `azd deploy` in one go, run the following command:\n\n    ```bash\n    azd up\n    ```\n\n## CI/CD Pipeline Integration\n\nIf you want to integrate the CI/CD pipeline with GitHub Actions, you can use the following command to create a GitHub repository and push the code to the repository.\n\n1. First of all, log in to GitHub.\n\n    ```bash\n    # Authenticate with GitHub CLI\n    gh auth login\n    ```\n\n1. Run the following commands to update your GitHub repository variables.\n\n    ```bash\n    # bash/zsh\n    AZURE_CLIENT_ID=$(./infra/scripts/get-azdvariable.sh --key AZURE_CLIENT_ID)\n    azd pipeline config --principal-id $AZURE_CLIENT_ID\n    ```\n\n    ```powershell\n    # PowerShell\n    $AZURE_CLIENT_ID = $(./infra/scripts/Get-AzdVariable.ps1 -Key AZURE_CLIENT_ID)\n    azd pipeline config --principal-id $AZURE_CLIENT_ID\n    ```\n\n1. Now, you're good to go! Push the code to the GitHub repository or manually run the GitHub Actions workflow to get your portal deployed.\n\n## Clean Up Resources\n\nOnce you complete playing around with the resources, you can clean up all the resources provisioned by running the following command to avoid unnecessary cost shock.\n\n```bash\nazd down --purge --force\n```\n\n## Other Integrations\n\nThere are several ways to integrate API Center with your solutions. You can choose the one that fits your needs.\n\n- [API Center Analyzer Integration - .NET](./docs/api-center-analyzer-integration-dotnet.md)\n- [API Center Analyzer Integration - JavaScript](./docs/api-center-analyzer-integration-nodejs.md)\n- [API Registration](./docs/api-registration.md)\n\u003c!-- - [API Center Event Handler](./docs/api-center-event-handler.md) --\u003e\n- [Custom Metadata Management](./docs/custom-metadata-management.md)\n- [API Center Portal Integration](./docs/api-center-portal-integration.md)\n- [API Client SDK Integration - .NET](./docs/api-client-sdk-integration-dotnet.md)\n- [API Client SDK Integration - JavaScript](./docs/api-client-sdk-integration-nodejs.md)\n\n## Resources\n\n- [API Center Documentation](https://aka.ms/apicenter)\n- [API Center Analyzer](https://aka.ms/apicenter-analyzer)\n- [API Center Portal](https://aka.ms/apicenter-portal)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzure-Samples%2FAPICenter-Reference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAzure-Samples%2FAPICenter-Reference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzure-Samples%2FAPICenter-Reference/lists"}