DevOps API Interview Questions & Answers (Simple Language)
1. What is an API?
API means one system can talk to another system. In DevOps, APIs help us do tasks like starting
pipelines, getting logs, or managing builds without doing it manually.
2. Where do you use APIs in DevOps?
We use APIs in tools like Azure DevOps, GitHub, Jenkins, and Terraform Cloud to start jobs, get
pipeline results, or run infrastructure code.
3. How do you login when calling an API?
We use tokens like PAT (Personal Access Token), API keys, or client ID and secret. For secure
systems, we use Workload Identity so we don't need passwords.
4. How do you test an API?
We can test APIs using Postman, curl (command-line tool), or write scripts in Python or PowerShell
to call APIs and check results.
5. How do you trigger a pipeline using API?
We use a POST request to the pipeline URL with a token. This starts the build automatically without
clicking anything.
6. What are GET, POST, PUT, DELETE?
These are types of API calls:
- GET: to read
- POST: to create
- PUT: to update
- DELETE: to remove something
7. How do you use APIs in pipelines?
We use APIs to trigger other pipelines, get logs, or send messages to Teams or Slack after
deployment.
8. What is Workload Identity Federation?
It is a safe way for tools like Azure DevOps to login to Azure without using passwords. Azure trusts
the DevOps tool using identity tokens.
9. What are API status codes?
Status codes tell if the API call worked:
- 200: OK
- 201: Created
- 401: Not logged in
- 403: Access denied
- 404: Not found
- 500: Server error
10. How do you use APIs in monitoring?
We use monitoring tools like Prometheus or Grafana to pull data using APIs. Also, we send alerts to
Slack or Teams using webhook APIs.
Use Case Example
When pipeline is complete, I use an API to send a message to Slack. I also use APIs to get the build
status before doing Terraform apply.