DevArmor Metrics API
The metrics API from DevArmor — 1 operation(s) for metrics.
The metrics API from DevArmor — 1 operation(s) for metrics.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/devarmor:devarmor-metrics-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: DevArmor Security Reviews Metrics API
version: 1.14.0
tags:
- name: Metrics
paths:
/metrics/{metric_name}:
get:
tags:
- Metrics
summary: Get values of a metric
operationId: get_metric
security:
- APIGatewayAuth: []
parameters:
- name: metric_name
in: path
required: true
schema:
$ref: '#/components/schemas/MetricRef'
- name: duration
in: query
required: false
schema:
type: integer
description: 'How long period will be.
So if you want to get metric from whole 2 months you set this to `2` and unit to `m`.
Keep in mind that `duration` need to be passed with `unit` alternative way is to set `all_time` to `true`
then you may skip `duration` and `unit`.'
title: Duration
description: 'How long period will be.
So if you want to get metric from whole 2 months you set this to `2` and unit to `m`.
Keep in mind that `duration` need to be passed with `unit` alternative way is to set `all_time` to `true`
then you may skip `duration` and `unit`.'
- name: unit
in: query
required: false
schema:
$ref: '#/components/schemas/CalendarUnit'
description: 'Literal reference to period that you want to get metric for:
- **d**: days
- **w**: weeks
- **m**: months
- **y**: years
Keep in mind that selected period is referencing to previous completed period.
So for example `1d` would refer to metrics from yesterday.
Keep in mind that `duration` need to be passed with `unit` alternative way is to set `all_time` to `true`
then you may skip `duration` and `unit`.'
examples:
- m
description: 'Literal reference to period that you want to get metric for:
- **d**: days
- **w**: weeks
- **m**: months
- **y**: years
Keep in mind that selected period is referencing to previous completed period.
So for example `1d` would refer to metrics from yesterday.
Keep in mind that `duration` need to be passed with `unit` alternative way is to set `all_time` to `true`
then you may skip `duration` and `unit`.'
- name: periods
in: query
required: false
schema:
type: integer
description: 'How many periods of metric you want to get.
So for example period `2` would result in returning 2 elements with the same duration.
If you would set `1d` as period then you will get metric from yesterday and day before.'
examples:
- 1
default: 1
title: Periods
description: 'How many periods of metric you want to get.
So for example period `2` would result in returning 2 elements with the same duration.
If you would set `1d` as period then you will get metric from yesterday and day before.'
- name: end
in: query
required: false
schema:
type: string
format: date-time
description: 'Datetime from when you want to start getting metric.
By default it is set to _now_.'
title: End
description: 'Datetime from when you want to start getting metric.
By default it is set to _now_.'
- name: all_time
in: query
required: false
schema:
type: boolean
description: 'Switch to gather metrics from all time for organization.
If you set this to `true` you may skip `duration` and `unit`.'
default: false
title: All Time
description: 'Switch to gather metrics from all time for organization.
If you set this to `true` you may skip `duration` and `unit`.'
- name: project_id
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: 'Limit the metric to events of this project.
By default the metric covers all projects of the organization.'
title: Project Id
description: 'Limit the metric to events of this project.
By default the metric covers all projects of the organization.'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Metric'
title: Response Get Metric
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
Metric:
properties:
start:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Start
end:
type: string
format: date-time
title: End
value:
anyOf:
- type: integer
- type: number
title: Value
group:
anyOf:
- type: string
- type: 'null'
title: Group
type: object
required:
- start
- end
- value
title: Metric
description: 'API metric response model.
Please also make note about dates ranges.
*start* is inclusive
*end* is exclusive'
CalendarUnit:
type: string
enum:
- d
- w
- m
- y
title: CalendarUnit
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
MetricRef:
type: string
enum:
- asset_created_count
- component_created_count
- component_associated_with_threat_model_count
- control_created_count
- control_mitigation_count
- control_enforce_policy_count
- design_review_created_count
- design_review_completed_count
- design_review_manual_work_saved_count
- design_review_duration_avg
- design_review_count_by_duration
- requirement_created_count
- requirement_criticality_count
- risk_level_count
- task_sdr_created_count
- task_tmv_created_count
- task_tmv_pushed_count
- task_tmv_pushed_manual_work_saved_count
- task_sdr_pushed_count
- task_sdr_pushed_manual_work_saved_count
- threat_created_count
- threat_model_created_count
- threat_model_completed_count
- threat_model_manual_work_saved_count
- threat_model_duration_avg
- code_review_run_count
- pull_request_reviewed_count
- control_violation_merged_count
- control_violation_raised_before_merge_count
- control_violation_unmerged_count
- control_violation_outcome_count
- control_violation_priority_count
- policy_active_count
- control_active_policy_count
- repository_active_policy_count
title: MetricRef
securitySchemes:
APIGatewayAuth:
type: http
scheme: bearer