:PROPERTIES:
:ID:       56fabaf6-e8aa-45d0-a1c1-89f247f0a93f
:END:
#+title: APIM
#+filetags: :docs:api:notes:career:

*Z notes on API management so I don’t forget*

1. API stands for application programming interface. It allows systems to communicate with each other. 
2. API management (or APIM) is the workstream that aims to provide a new technology platform for Microlise. It introduces a separate layer between customers and Microlise’s existing API products.

The core pillars:

[[./assets/career/Screenshot 2026-01-14 154800.png]]

The workflow of publishing API’s:

[[./assets/career/APIOps.png]]

This is summarised below:

1. When someone wants to create an API, they do so by creating a repo and a C# project. Ideally we should use the beautiful templates (https://azdo.microlise.com/MicroliseCollection/Microlise/_git/Microlise.Templates).

2. When the engineer wants to deploy this API, it goes through a gated and main pipeline. Phase 2 of the main build will build the image using quay registry so it’s available there (quay.mms.local). The release will consume the artifact produced by the main pipeline and will push these endpoints into the Openshift server. Essentially it will pull the image from the quay registry, containerise it 

Then publishing Api's into APIM (API management) using APIOps

1. The engineer will need to setup swagger build (docs explains how to do this)
2. The engineer will create a PR for an API that has setup the APIOps pipeline (ie added the yaml pipeline and configured the variables - again, docs explain this in detail)
3. There are two pipelines associated with this:
   - The gated build: [[https://azdo.microlise.com/MicroliseCollection/Microlise/_taskgroup/c85996c9-d9ae-40ff-bd60-94b60db541a9][Link (Gated)]]
   - The main build: [[https://azdo.microlise.com/MicroliseCollection/Microlise/_taskgroup/7bd21d7f-499b-487d-a0f7-2206ffdff841][Link (Main)]]
   - You will see that the term ~spec~ is used a lot. This is simply a json/yaml representation of your API interface (what you expose to the customer).
   - One of the gated tasks is linting, it uses the scripts in this directory to test the OpenAPI specification linting, see: [[https://azdo.microlise.com/MicroliseCollection/Microlise/_git/ApiManagement.Pipeline.AgentScripts][Link]].
4. Another task adds API Governance Council as reviewers if there are OpenAPI Specification changes. All this can be viewed in the task group (see point a).
5. Once the main build passes, it triggers an ApiOps pipeline (defined in step 2), which creates a PR in the APIOps repository ([[https://azdo.microlise.com/MicroliseCollection/Microlise/_git/Microlise.APIOps][Link]])
6. Once this PR is reviewed and approved by the Api GC, the Publish pipeline is triggered ([[https://azdo.microlise.com/MicroliseCollection/Microlise/_build?definitionId=1686&_a=summary][Link]]) which does a 2 way sync so that the APIM environments are in line with the OpenAPI specs. The publisher pipeline runs upto the CERT environment only, the PROD requires approval.
   
There are two openshift clusters, one is gen and one is prod. Anything not prod goes into gen, and no one can access the prod cluster besides Openshift itself so test well.

The link to the sharepoint site: 
- [[https://microliseuk.sharepoint.com/sites/SoftwareEngineering/SitePages/API-Management.aspx?source=https%3A%2F%2Fmicroliseuk.sharepoint.com%2Fsites%2FSoftwareEngineering%2FSitePages%2FForms%2FByAuthor.aspx][Api management sharepoint]]

Link to the onboarding doc:
- [[https://microliseuk.sharepoint.com/:w:/r/sites/SoftwareEngineering/_layouts/15/Doc.aspx?sourcedoc=%7BCF78DE96-7CC0-482A-9A66-647771CB8A04%7D&file=APIOpsOnboardingDocumentation.docx&action=default&mobileredirect=true][Onboarding Doc]] 

The link to the API management API gateway release:
- [[https://azdo.microlise.com/MicroliseCollection/Microlise/_release?_a=releases&view=mine&definitionId=71][Link]]

Reverse proxy:
- [[https://azdo.microlise.com/MicroliseCollection/Microlise/_build?definitionId=2439&_a=summary][Pipeline]] 
- [[https://microliseuk.sharepoint.com/sites/SoftwareEngineering/SitePages/Support-Guide---APIM-Reverse-Proxy.aspx][Sharepoint]] 

Read up on:
- Quick Start Kubernetes (nigel Poulton)
- How is openshift different from k8? ([[https://microliseuk.sharepoint.com/sites/StorageCompute/ContainerPlatformUsers/SitePages/How-is-OpenShift-different-from-Kubernetes.aspx][Link]]) 
