Skip to content

Create project-scoped indicator

POST
/api/v2/projects/{projectId}/indicators
curl --request POST \
--url https://localhost:10001/api/v2/projects/example/indicators \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "criteria": [ {} ], "declarationProfile": { "emitOn": "pass", "statementTemplate": "example", "titleTemplate": "example" }, "description": "example", "extractionRules": {}, "name": "example", "parameters": {}, "provider": "example", "slug": "example", "tags": [ "example" ], "triggerType": "event", "type": "custom" }'

Creates an immutable indicator template owned by a project and returns the created template

projectId
required
string

Project ID, UUID (urn:uuid optional), or slug:my-project

Project indicator creation request

Media type application/json
object
criteria
Array<object>
object
declarationProfile
required
object
emitOn
required

When to emit a declaration

string
Allowed values: pass fail both none
statementTemplate
string
titleTemplate
string
description
string
extractionRules
object
name
required
string
parameters
object
provider
string
slug

Slugified; derived from name

string
tags
Array<string>
triggerType

Defaults to event

string
Allowed values: event
type

Defaults to custom, the only accepted value

string
Allowed values: custom

Created project indicator template

Media type application/json

A project-scoped indicator template, with a count of the controls it is applied to

object
createdAt
string format: date-time
criteria
Array<object>
object
declarationProfile
object
emitOn
required

When to emit a declaration

string
Allowed values: pass fail both none
statementTemplate
string
titleTemplate
string
description
string
extractionRules
object
id

Urn:uuid form

string
name
string
parameters
object
projectId
integer
provider
string
slug
string
tags
Array<string>
triggerType
string
Allowed values: event
type
string
Allowed values: custom
updatedAt
string format: date-time
usageCount
integer
Example
{
"declarationProfile": {
"emitOn": "pass"
},
"triggerType": "event",
"type": "custom"
}

Bad request - Invalid request body or indicator fields

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Unauthorized - Authentication required

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Forbidden - No project access or insufficient permissions

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Project not found

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Indicator with the same slug already exists

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Internal server error

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}