How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Harness Rules API

The rules API from Harness — 4 operation(s) for rules.

Harness Rules API is one of 488 APIs that Harness publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Rules. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, a getting-started guide, authentication docs, and rate-limit docs.

This API exposes 10 operations across 4 paths, and defines 29 schemas. It is described by OpenAPI 3.2.0, at version 1.0.

Requests are made against 2 base URLs: https://app.harness.io, https://{vanity}.

10 operations 4 paths 29 schemas 2 DELETE4 GET2 PATCH2 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.0
Base URL
https://app.harness.io
Authentication
API Key
Terms of Service
Resource Areas
1

Authentication & Security 1

Harness Rules API declares 1 security scheme for authenticating requests. An API key is passed in the header as x-api-key (x-api-key). By default, every request must be authenticated.

  • x-api-key — API key is a token provided while making the API calls. This is used to authenticate the client at the exposed endpoint.

Paths & Operations 10

Across 4 paths, the API surfaces 10 operations — 2 DELETE, 4 GET, 2 PATCH, 2 POST. Each is listed below with its method, path, parameters, and response codes.

Rules 10
GET
/code/api/v1/repos/{repo_identifier}/rules
List repo protection rules
repoRuleList 11 params → 200401403404500
POST
/code/api/v1/repos/{repo_identifier}/rules
Add repo protection rule
repoRuleAdd 4 params body → 201401403404500
DELETE
/code/api/v1/repos/{repo_identifier}/rules/{rule_identifier}
Delete repo protection rule
repoRuleDelete 5 params → 204401403404500
GET
/code/api/v1/repos/{repo_identifier}/rules/{rule_identifier}
Get repo protection rule
repoRuleGet 5 params → 200401403404500
PATCH
/code/api/v1/repos/{repo_identifier}/rules/{rule_identifier}
Update repo protection rule
repoRuleUpdate 5 params body → 200401403404500
GET
/code/api/v1/rules
List acc/org/proj protection rules
spaceRuleList 10 params → 200401403404500
POST
/code/api/v1/rules
Add acc/org/proj protection rule
spaceRuleAdd 3 params body → 201401403404500
DELETE
/code/api/v1/rules/{rule_identifier}
Delete acc/org/proj protection rule
spaceRuleDelete 4 params → 204401403404500
GET
/code/api/v1/rules/{rule_identifier}
Get acc/org/proj protection rule
spaceRuleGet 4 params → 200401403404500
PATCH
/code/api/v1/rules/{rule_identifier}
Update acc/org/proj protection rule
spaceRuleUpdate 4 params body → 200401403404500

Schemas 29

The contract defines 29 schemas that model the data the API accepts and returns. The most detailed are OpenapiRule (14 properties), TypesPrincipalInfo (7 properties), TypesRepositoryCore (7 properties), ProtectionDefPullReq (7 properties). Each schema is shown below with its type and property counts.

ProtectionDefStatusChecks
object
1 property
ProtectionDefMerge
object
4 properties
ProtectionDefCommits
object
1 property
ProtectionDefApprovals
object
5 properties
ProtectionRepoTargetFilter
object
2 properties
UsererrorError
object
2 properties
ProtectionDefPush
object
3 properties
TypesUserGroupInfo
object
5 properties
ProtectionTag
object
2 properties
ProtectionDefPullReq
object
7 properties
EnumRepoType
string
ProtectionPattern
objectnull
3 properties
OpenapiRuleDefinition
object
TypesPrincipalInfo
objectnull
7 properties
ProtectionDefReviewers
object
3 properties
ProtectionRepoTarget
objectnull
2 properties
EnumRuleState
stringnull
ProtectionDefBypass
object
3 properties
EnumPrincipalType
string
OpenapiRuleType
string
ProtectionDefBranchLifecycle
object
4 properties
ProtectionPush
object
2 properties
ProtectionDefComments
object
1 property
ProtectionDefMergeQueue
object
4 properties
EnumMergeMethod
string
OpenapiRule
object
14 properties
ProtectionBranch
object
3 properties
TypesRepositoryCore
object
7 properties
ProtectionDefTagLifecycle
object
3 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

harness-rules-api-openapi.yml Raw ↑

Other APIs Harness publishes across the network.

Harness Continuous Integration API
Harness Continuous Delivery and GitOps API
Harness Feature Management and Experimentation API
Harness Cloud Cost Management API
Harness Chaos Engineering API
Harness Security Testing Orchestration API
Harness Internal Developer Portal API
Harness Code Repository API
Harness Service Reliability Management API
Harness Infrastructure as Code Management API
Harness Supply Chain Security API
Harness Software Engineering Insights API
Where this information came from

This is an independent, third-party profile of Harness Rules API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.