Scorecards

Use these operations to interact with Scorecards in Cortex.

Required permissions

  • Create, read, update, or delete Scorecards: Your API key must have the Edit Scorecards permission.

  • View Scorecards: Your API key must have the View Scorecards permission.

  • Approve or revoke Scorecard exemptions: Your API key must have the Configure Scorecard exemptions permission.

Operations

List Scorecards

get

Returns scorecards matching optional search criteria. If search criteria is specified we will use search logic, which will not find Scorecards that have yet to be evaluated

Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Query parameters
showDraftsbooleanOptional
groupsstring[]Optional

Filter based on groups, which correspond to the x-cortex-groups field in the Catalog Descriptor. Accepts a comma-delimited list of groups

pageinteger · int32Required

Page number to return, 0-indexed. Default 0.

Default: 0
pageSizeinteger · int32Required

Number of results to return per page, between 1 and 1000. Default 250.

Default: 250
Responses
200

OK

application/json
get
/api/v1/scorecards

Retrieve Scorecard scores

get

Returns latest scores for all entities in the Scorecard

Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
Query parameters
entityTagstringOptional

Entity tag (x-cortex-tag)

pageSizeinteger · int32Required

Number of results to return per page, between 1 and 1000. Default 250.

Default: 250
pageinteger · int32Required

Page number to return, 0-indexed. Default 0.

Default: 0
Responses
200

Scorecard scores

application/json
get
/api/v1/scorecards/{tag}/scores

Retrieve entity Scorecard scores

get
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagOrIdstringRequired

The tag (x-cortex-tag) or unique, auto-generated identifier for the entity.

Responses
200

All entity Scorecard scores

application/json
get
/api/v1/catalog/{tagOrId}/scorecards

Retrieve Scorecard

get
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
Responses
200

Successfully retrieved Scorecard

application/json
get
/api/v1/scorecards/{tag}

Retrieve Scorecard descriptor

get
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
Responses
200

Successfully retrieved Scorecard descriptor

application/json
Responsestring
get
/api/v1/scorecards/{tag}/descriptor

Retrieve Scorecard shields.io badge

get
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
scorecardTagstringRequired

Unique tag for the Scorecard.

tagOrIdstringRequired

The tag (x-cortex-tag) or unique, auto-generated identifier for the entity.

Responses
200

Shields.io badge

application/json
get
/api/v1/scorecards/{scorecardTag}/entity/{tagOrId}/badge

Retrieve next steps for entity in Scorecard

get
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
Query parameters
entityTagstringRequired

The entity tag (x-cortex-tag) that identifies the entity.

Responses
200

Any rules remaining for the entity to reach the next level in the Scorecard.

application/json
get
/api/v1/scorecards/{tag}/next-steps

Create or update Scorecard

post

Create or update a Scorecard using the descriptor YAML. The operation is determined by the existence of a Scorecard with the same tag as passed in the descriptor.

Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Query parameters
dryRunbooleanOptional

When true, this endpoint only validates the descriptor contents and returns any errors or warnings.

Body
anyOptional
Responses
200

Created Scorecard

application/json
post
/api/v1/scorecards/descriptor

Request Scorecard rule exemption

post

Request Scorecard rule exemption

Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
entityTagstringRequired

The entity tag (x-cortex-tag) that identifies the entity.

Body
daysinteger · int64 | nullableOptional

Number of days how long rule should be exempt. If not set, rule will be exempt until exempt until revoked.

reasonstringRequired

Reason for creating exemption

ruleIdentifierstringRequired

Identifier of the Scorecard rule to request exemption for

Responses
200

Successfully requested Scorecard rule exemption

application/json
post
/api/v1/scorecards/{tag}/entity/{entityTag}/exemption

Evaluate entity scorecard score

post

Triggers score evaluation for entity scorecard

Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
entityTagstringRequired

The entity tag (x-cortex-tag) that identifies the entity.

Responses
200

Scorecard score evaluation triggered successfully

No content

post
/api/v1/scorecards/{tag}/entity/{entityTag}/scores

No content

Revoke Scorecard rule exemption

put

Revoke Scorecard rule exemption

Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
entityTagstringRequired

The entity tag (x-cortex-tag) that identifies the entity.

Body
reasonstringRequired
ruleIdentifierstringRequired

Identifier of the Scorecard rule

Responses
200

Revoked Scorecard rule exemptions

application/json
put
/api/v1/scorecards/{tag}/entity/{entityTag}/exemption/revoke

Approve Scorecard rule exemption

put

Approve Scorecard rule exemption

Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
entityTagstringRequired

The entity tag (x-cortex-tag) that identifies the entity.

Body
ruleIdentifierstringRequired

Identifier of the Scorecard rule

Responses
200

Successfully approved Scorecard rule exemptions

application/json
put
/api/v1/scorecards/{tag}/entity/{entityTag}/exemption/approve

Deny Scorecard rule exemption

put

Deny Scorecard rule exemption

Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
entityTagstringRequired

The entity tag (x-cortex-tag) that identifies the entity.

Body
reasonstringRequired
ruleIdentifierstringRequired

Identifier of the Scorecard rule

Responses
200

Denied Scorecard rule exemptions

application/json
put
/api/v1/scorecards/{tag}/entity/{entityTag}/exemption/deny

Delete Scorecard

delete
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
tagstringRequired

Unique tag for the Scorecard

Example: my-production-readiness-checklist
Responses
200

Successfully deleted Scorecard

No content

delete
/api/v1/scorecards/{tag}

No content

Last updated

Was this helpful?