Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Harness Entities API
version: '1.0'
description: The Harness Software Delivery Platform uses OpenAPI Specification v3.0.
contact:
name: API Support
email: contact@harness.io
url: https://harness.io/
x-logo:
url: https://mma.prnewswire.com/media/779232/Harnes_logo_horizontal.jpg?p=facebook
altText: Harness
termsOfService: https://harness.io/terms-of-use/
servers:
- url: https://app.harness.io
description: Harness host URL
- url: https://{vanity}
description: Vanity URL
variables:
vanity:
default: app.harness.io
security:
- x-api-key: []
tags:
- name: Entities
description: APIs for managing catalog Entities which represent the core components of your system. Entities can represent services, APIs, user groups, resources, and more. These endpoints allow you to create, retrieve, update, delete, and query entities across different scopes.
x-displayName: Entities
paths:
/v1/entities:
post:
operationId: create-entity
summary: Create an Entity
description: Creates a new Entity in the specified scope (Account, Organization, or Project). Entities are the core components of the catalog system and can represent various resources such as services, APIs, user groups, and more. Each entity has a specific kind and type that defines its purpose in the system.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/OrgIdentifierQueryParam'
- $ref: '#/components/parameters/ProjectIdentifierQueryParam'
- $ref: '#/components/parameters/AccountHeader5'
- name: convert
in: query
required: false
schema:
type: boolean
default: false
description: When set to true, converts Backstage style YAML to Harness entity YAML format
- name: dry_run
in: query
required: false
schema:
type: boolean
default: false
description: When set to true, validates the entity creation without actually creating it
requestBody:
$ref: '#/components/requestBodies/EntityCreateRequestBody'
responses:
'201':
$ref: '#/components/responses/EntityResponseBody'
description: Entity successfully created
get:
operationId: get-entities
summary: Get Entities
description: 'Retrieves a paginated list of Entities based on the provided filters. This endpoint supports comprehensive filtering options to help you find specific entities across different scopes, kinds, and other properties. The response includes pagination metadata and counts for owned and favorite entities.
When a search returns no matching entities, the API returns a 200 status code with an empty data array. This is the expected behavior for this list API. Note that 400 status codes are only returned when a specific entity is requested and not found (e.g., in the Get Entity Details endpoint).'
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
- $ref: '#/components/parameters/Page1'
- $ref: '#/components/parameters/LimitWithRestriction'
- $ref: '#/components/parameters/Sort6'
- $ref: '#/components/parameters/SearchTerm5'
- name: scopes
description: Filter entities by specific scopes (account.\*, account, account.org, account.org.project, account.orgId, account.orgId.projectId, account.orgId.\*)
in: query
schema:
type: string
default: null
- name: entity_refs
description: Filter entities by their entity references (comma-separated list in the format of kind:scope/identifier)
in: query
schema:
type: string
default: null
- name: owned_by_me
description: When true, returns only entities owned by the current user or their groups
in: query
schema:
type: boolean
default: false
- name: favorites
description: When true, returns only entities marked as favorites by the current user
in: query
schema:
type: boolean
default: false
- $ref: '#/components/parameters/KindQueryParam'
- name: type
description: Filter entities by their type (e.g., Service, Website)
in: query
schema:
type: string
default: null
- name: owner
description: Filter entities by their owner references
in: query
schema:
type: string
default: null
- name: lifecycle
description: Filter entities by their lifecycle stage (e.g., experimental, production)
in: query
schema:
type: string
default: null
- name: tags
description: Filter entities by their associated tags (comma-separated list)
in: query
schema:
type: string
default: null
responses:
'200':
$ref: '#/components/responses/EntityResponseBodyList'
description: Paginated list of entities matching the filter criteria with pagination metadata in headers (X-Total-Elements, X-Page-Number, X-Page-Size) and ownership counts (Total-Owned, Total-Starred)
/v1/entities/bulk-field-update:
post:
summary: Submit a bulk field update on catalog entities
tags:
- Entities
responses:
'202':
$ref: '#/components/responses/BulkFieldUpdateSubmitResponse'
operationId: submit-bulk-update-entity-field
x-internal: false
description: Submit an asynchronous bulk field update. Selects catalog entities by either a filter or a list of entityRefs and updates a single allowlisted field (given as key/value, e.g. key "owner", value "group:account/TeamA") on every entity the caller is permitted to edit. Validation and edit-permission are checked synchronously; the mutation is processed asynchronously. Returns an operationId to poll for status.
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BulkEntityFieldUpdateRequest'
application/yaml:
schema:
$ref: '#/components/schemas/BulkEntityFieldUpdateRequest'
/v1/entities/bulk-field-update/{operation-id}:
get:
summary: Get bulk field update operation status
tags:
- Entities
responses:
'200':
$ref: '#/components/responses/BulkFieldUpdateOperationResponse'
operationId: get-bulk-update-entity-field-operation
x-internal: false
description: Get the status and result of a previously submitted bulk field update operation.
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
- name: operation-id
in: path
required: true
description: The operationId returned when the bulk update was submitted.
schema:
type: string
/v1/entities/by-refs:
post:
summary: Get entities by refs
description: Fetches entities matching the entity references specified in the request body, in conjunction with other provided filters.
tags:
- Entities
responses:
'200':
$ref: '#/components/responses/EntityResponseBodyList'
operationId: get-entities-by-refs
x-stoplight:
id: yztu80rla7s8m
parameters:
- $ref: '#/components/parameters/AccountHeader5'
- $ref: '#/components/parameters/Page1'
- $ref: '#/components/parameters/LimitWithRestriction'
- $ref: '#/components/parameters/Sort6'
- $ref: '#/components/parameters/SearchTerm5'
- name: scopes
description: Filter entities on the scopes
in: query
schema:
type: string
default: null
- name: owned_by_me
description: Filter entities owned by the user and the groups that the user is part of.
in: query
schema:
type: boolean
default: false
- name: favorites
description: Filter entities that are marked as favorites for the user.
in: query
schema:
type: boolean
default: false
- $ref: '#/components/parameters/KindQueryParam'
- name: type
description: Types on which the Entities are filtered.
in: query
schema:
type: string
default: null
- name: owner
description: Owners on which the Entities are filtered.
in: query
schema:
type: string
default: null
- name: lifecycle
description: Lifecycles on which the Entities are filtered.
in: query
schema:
type: string
default: null
- name: tags
description: Tags on which the Entities are filtered.
in: query
schema:
type: string
default: null
security:
- x-api-key: []
requestBody:
$ref: '#/components/requestBodies/EntitesByRefsRequest'
/v1/entities/import:
post:
operationId: import-entity
summary: Import an Entity from Git
description: Imports a new Entity from Git in the specified scope (Account, Organization, or Project).
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/OrgIdentifierQueryParam'
- $ref: '#/components/parameters/ProjectIdentifierQueryParam'
- $ref: '#/components/parameters/AccountHeader5'
requestBody:
$ref: '#/components/requestBodies/GitImportRequestBody'
responses:
'201':
$ref: '#/components/responses/EntityResponseBody'
/v1/entities/groups:
get:
operationId: get-entities-groups
x-internal: true
summary: Get Entities Groups
description: Retrieves entities organized in hierarchical groups based on account, organization, and project. This endpoint is useful for displaying entities in a structured UI view where entities need to be presented in their organizational context. The response contains both grouped and ungrouped entities at each level.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
- name: search_on_entities
in: query
required: false
schema:
type: string
default: null
description: Filter entities by a search term across entity attributes
- name: search_on_groups
in: query
required: false
schema:
type: string
default: null
description: Filter groups by a search term across group attributes
- name: scopes
description: Filter entities by specific scopes (account.\*, account, account.org, account.org.project, account.orgId, account.orgId.projectId, account.orgId.\*)
in: query
schema:
type: string
default: null
- $ref: '#/components/parameters/KindQueryParam'
- name: owned_by_me
description: When true, returns only entities owned by the current user and their groups
in: query
schema:
type: boolean
default: false
- name: favorites
description: When true, returns only entities marked as favorites by the current user
in: query
schema:
type: boolean
default: false
- name: type
description: Filter entities by their type
in: query
schema:
type: string
default: null
- name: owner
description: Filter entities by their owner references
in: query
schema:
type: string
default: null
- name: lifecycle
description: Filter entities by their lifecycle stage
in: query
schema:
type: string
default: null
- name: tags
description: Filter entities by their associated tags
in: query
schema:
type: string
default: null
responses:
'200':
$ref: '#/components/responses/EntitiesGroupsResponseBody'
description: Entities grouped by organization and project
/v1/entities/move/{scope}/{kind}/{identifier}:
post:
operationId: move-entity
summary: Move an Entity
description: Move an existing Inline entity to Remote.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/OrgIdentifierQueryParam'
- $ref: '#/components/parameters/ProjectIdentifierQueryParam'
- $ref: '#/components/parameters/ScopeParam'
- $ref: '#/components/parameters/KindParam'
- $ref: '#/components/parameters/IdentifierParam'
- $ref: '#/components/parameters/AccountHeader5'
requestBody:
$ref: '#/components/requestBodies/EntityMoveRequestBody'
responses:
'201':
$ref: '#/components/responses/DefaultSaveResponse'
/v1/entities/git-metadata/{scope}/{kind}/{identifier}:
put:
summary: Update GitMetadata for Remote Entities
operationId: update-git-metadata
responses:
'200':
$ref: '#/components/responses/DefaultSaveResponse'
requestBody:
$ref: '#/components/requestBodies/GitMetadataUpdateRequestBody1'
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/OrgIdentifierQueryParam'
- $ref: '#/components/parameters/ProjectIdentifierQueryParam'
- $ref: '#/components/parameters/ScopeParam'
- $ref: '#/components/parameters/KindParam'
- $ref: '#/components/parameters/IdentifierParam'
- $ref: '#/components/parameters/AccountHeader5'
tags:
- Entities
x-stoplight:
id: 2uv1mspdrbzvj
/v1/entities/convert/{option}:
post:
operationId: convert-entity
summary: Convert Entity Format
description: Converts entity YAML between Backstage and Harness formats. This is useful when migrating entities between systems or when standardizing entity definitions across different platforms. The conversion preserves all semantic information while adapting to the target format conventions.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
- name: option
in: path
required: true
schema:
type: string
enum:
- backstage-to-harness
- harness-to-backstage
description: Conversion direction - either convert from Backstage to Harness format or vice versa
requestBody:
$ref: '#/components/requestBodies/EntityRequestBody'
responses:
'200':
$ref: '#/components/responses/EntityConvertResponseBody'
description: Entity YAML successfully converted to the target format
/v1/entities/{scope}/{kind}/{identifier}:
parameters:
- $ref: '#/components/parameters/OrgIdentifierQueryParam'
- $ref: '#/components/parameters/ProjectIdentifierQueryParam'
- $ref: '#/components/parameters/ScopeParam'
- $ref: '#/components/parameters/KindParam'
- $ref: '#/components/parameters/IdentifierParam'
put:
operationId: update-entity
summary: Update an Entity
description: Updates an existing Entity identified by its scope, kind, and identifier. All fields in the entity definition will be replaced with the new values provided in the request. This operation is idempotent and will create the entity if it doesn't already exist.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
requestBody:
$ref: '#/components/requestBodies/EntityUpdateRequestBody'
responses:
'200':
$ref: '#/components/responses/EntityResponseBody'
description: Entity successfully updated
delete:
operationId: delete-entity
summary: Delete an Entity
description: Permanently removes an Entity identified by its scope, kind, and identifier from the system. This operation cannot be undone, so use it with caution. Any references to the deleted entity from other entities will become invalid.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
responses:
'204':
description: Entity successfully deleted with no content returned
get:
operationId: get-entity
summary: Get Entity Details
description: Retrieves the complete details of an Entity identified by its scope, kind, and identifier, including its YAML definition, metadata, and relationships with other entities. This endpoint provides the most comprehensive view of a specific entity.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
- schema:
type: string
default: null
in: query
name: branch_name
description: Name of the branch (for Git Experience).
- schema:
type: string
default: null
in: query
name: connector_ref
description: Identifier of the Harness Connector used for CRUD operations on the Entity (for Git Experience).
- schema:
type: string
default: null
in: query
name: repo_name
description: Name of the repository (for Git Experience).
- schema:
type: string
default: 'false'
in: header
name: Load-From-Cache
description: Flag to enable loading the remote entity from git or git cache
- schema:
type: boolean
default: false
in: query
name: load_from_fallback_branch
description: Flag to load the entity from the created non default branch
responses:
'200':
$ref: '#/components/responses/EntityResponseBody'
description: Complete entity details successfully retrieved
/v1/entities/kinds:
parameters:
- $ref: '#/components/parameters/AccountIdentifierQueryParam'
- $ref: '#/components/parameters/OrgIdentifierQueryParam'
- $ref: '#/components/parameters/ProjectIdentifierQueryParam'
get:
operationId: get-entities-kinds
summary: Get Entity Kinds
description: Returns a list of all supported Entity Kinds along with their display names, descriptions, and counts. This is useful for populating filter dropdowns in UIs and for understanding what kinds of entities are available in the system.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
responses:
'200':
$ref: '#/components/responses/EntityKindsResponseBody'
description: List of available entity kinds with their metadata and counts
/v1/entities/filters:
parameters:
- $ref: '#/components/parameters/AccountIdentifierQueryParam'
- $ref: '#/components/parameters/KindQueryParam'
- name: scopes
description: Filter entities by specific scopes (account.\*, account, account.org, account.org.project, account.orgId, account.orgId.projectId, account.orgId.\*)
in: query
schema:
type: string
default: null
get:
operationId: get-entities-filters
summary: Get Entity Filter Options
description: Returns the available filter options that can be used when querying entities. This helps in building dynamic filter UIs for entity exploration and discovery. The response includes filter names and their possible values based on the current entities in the system.
tags:
- Entities
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/AccountHeader5'
responses:
'200':
$ref: '#/components/responses/EntityFiltersResponseBodyList'
description: List of available filter options and their possible values
post:
summary: Get Entities Filters By Query
description: Returns the available filter options that can be used when querying entities based on the provided query.This helps in building dynamic filter UIs for entity exploration and discovery.The response includes filter names and their possible values based on the current entities in the system.
tags:
- Entities
security:
- x-api-key: []
responses:
'200':
$ref: '#/components/responses/EntityFiltersResponseBodyList'
operationId: get-entities-filters-by-query
x-stoplight:
id: 34d8rd6couqo6
parameters:
- $ref: '#/components/parameters/AccountHeader5'
requestBody:
$ref: '#/components/requestBodies/EntityFilterQueryRequest'
/v1/entities/json-schema:
parameters:
- $ref: '#/components/parameters/KindQueryParam'
get:
operationId: get-json-schema
summary: Get Entity JSON Schema
description: Returns the JSON Schema for validating Entity definitions. This is useful for client-side validation before submitting entity creation or update requests. The schema can be filtered by entity kind to get specific validation rules.
tags:
- Entities
security:
- x-api-key: []
responses:
'200':
$ref: '#/components/responses/EntityJsonSchemaResponseBody'
description: JSON Schema for entity validation successfully retrieved
components:
schemas:
BulkFieldUpdateProperty:
title: BulkFieldUpdateProperty
type: object
description: A single field to update, as a key/value pair with an optional write mode.
required:
- key
- value
properties:
key:
type: string
description: The field to update. Currently only "owner" is supported.
value:
type: string
description: The new value for the field, e.g. "group:account/TeamA".
mode:
type: string
description: Write mode. Defaults to REPLACE. APPEND is reserved for future scope.
enum:
- REPLACE
- APPEND
BulkFieldUpdateOperationResponse:
title: BulkFieldUpdateOperationResponse
type: object
description: Current status and result of an async bulk field update operation.
properties:
operationId:
type: string
status:
type: string
description: One of QUEUED, PROCESSING, SUCCESS, PARTIAL_SUCCESS, FAILED, DEAD_LETTER.
matched:
type: integer
permitted:
type: integer
updated:
type: integer
description: Number of entities actually updated.
skipped:
type: array
description: Entities that matched but were not updated, with a reason.
items:
$ref: '#/components/schemas/BulkEntityFieldUpdateSkipped'
errors:
type: array
description: Per-entity failures encountered during processing.
items:
$ref: '#/components/schemas/BulkEntityFieldUpdateError'
errorMessage:
type: string
description: Top-level error message when the whole operation failed.
EntityKindsResponse:
title: Entity Kinds Response
description: Information about an Entity Kind, including its display name, description, and the count of entities of this kind in the system.
type: object
properties:
kind:
type: string
description: Kind identifier (e.g., component, api)
display_name:
type: string
description: Human-readable display name for the kind
description:
type: string
description: Description of the entity kind and its purpose
total:
type: integer
description: Total number of entities of this kind in the system
EntityMoveOperationType:
type: string
enum:
- INLINE_TO_REMOTE
- REMOTE_TO_INLINE
description: Operation type to move the entity
x-stoplight:
id: 2x10v7rnqfd1z
BulkEntityFieldUpdateSkipped:
title: BulkEntityFieldUpdateSkipped
type: object
properties:
entityRef:
type: string
reason:
type: string
description: One of NO_PERMISSION, GIT_NON_DEFAULT_BRANCH, VALIDATION_FAILED.
EntityUpdateRequest:
title: Entity Update Request Body
description: Entity Update Request Body
type: object
properties:
yaml:
type: string
description: Entity YAML (to be passed as a String).
git_details:
$ref: '#/components/schemas/GitUpdateDetails2'
required:
- yaml
BulkFieldUpdateSubmitResponse:
title: BulkFieldUpdateSubmitResponse
type: object
description: Returned on submit; carries the operationId to poll for status.
properties:
operationId:
type: string
description: Identifier of the async bulk update operation. Poll GET .../bulk-field-update/{operationId}.
status:
type: string
description: Initial status of the operation, e.g. QUEUED.
matched:
type: integer
description: Number of entities matched (computed synchronously at submit).
permitted:
type: integer
description: Number of matched entities the caller had edit permission on (computed synchronously at submit).
GitCreateDetails2:
title: Create Git Details
x-stoplight:
id: p1h9vvkuks7kq
type: object
description: Contains parameters related to creating an Entity for Git Experience.
x-examples:
example-create-git:
branch_name: branch
file_path: /folder/file.json
commit_message: Added Harness Git Experience
base_branch: old_branch
connector_ref: git_connector
store_type: REMOTE
repo_name: example_repository
is_harness_code_repo: false
properties:
branch_name:
type: string
description: Name of the branch.
file_path:
type: string
description: File path of the Entity in the repository.
commit_message:
type: string
description: Commit message used for the merge commit.
base_branch:
type: string
description: Name of the default branch (this checks out a new branch titled by branch_name).
connector_ref:
type: string
description: Identifier of the Harness Connector used for CRUD operations on the Entity.
store_type:
type: string
description: Specifies whether the Entity is to be stored in Git or not.
enum:
- INLINE
- REMOTE
repo_name:
type: string
description: Name of the repository.
is_harness_code_repo:
type: boolean
description: Is Git Experience repo harness code.
EntityConvertResponse:
title: Entity Convert Response
description: Result of converting an Entity between formats (Backstage to Harness or vice versa), containing the converted YAML definition.
type: object
properties:
yaml:
type: string
description: Converted entity YAML definition in the target format
required:
- yaml
EntitiesGroups:
title: Entities Groups
description: Represents a group of entities organized by organization and project, providing a hierarchical view of entities within the system.
type: object
properties:
org_identifier:
type: string
description: Unique identifier of the organization
org_name:
type: string
description: Display name of the organization
project_identifier:
type: string
description: Unique identifier of the project
project_name:
type: string
description: Display name of the project
group_identifier:
type: string
description: Unique identifier of the group
group_name:
type: string
description: Display name of the group
group_description:
type: string
description: Description of the group
group_icon:
type: string
description: Icon URL representing the group
order:
type: integer
description: Display order for the group
workflows:
type: array
items:
type: string
description: Workflows associated with the group
total:
type: integer
description: Total number of entities in the group
entities:
type: array
items:
$ref: '#/components/schemas/EntityResponse'
description: Entities belonging to the group
GitDetails1:
title: Git Details
x-stoplight:
id: p1h9vvkuks7kq
type: object
description: Git Experience related details of the Entity.
x-examples:
example-create-git:
branch_name: branch
file_path: /folder/file.json
commit_message: Added Harness Git Experience
object_id: abcdXYZ
base_branch: old_branch
commit_id: abcdXYZ
connector_ref: git_connector
store_type: REMOTE
repo_name: example_repository
is_harness_code_repo: false
properties:
branch_name:
type: string
description: Name of the branch.
file_path:
type: string
description: File path of the Entity in the repository.
file_url:
type: string
description: File URL of the Entity.
commit_message:
type: string
description: Commit message used for the merge commit.
object_id:
type: string
description: Object identifier (for Github only).
base_branch:
type: string
description: Name of the default branch (this checks out a new branch titled by branch_name).
commit_id:
type: string
description: Commit identifier.
connector_ref:
type: string
description: Identifier of the Harness Connector used for CRUD operations on the Entity.
store_type:
type: string
description: Specifies whether the Entity is to be stored in Git or not.
enum:
- INLINE
- REMOTE
repo_name:
type: string
description: Name of the repository.
repo_url:
type: string
description: Repository URL of the Entity.
is_harness_code_repo:
type: boolean
description: Is Git Experience repo harness code.
EntityCreateRequest:
title: Entity Create Request Body
description: Entity Create Request Body
type: object
properties:
yaml:
type: string
description: Entity YAML (to be passed as a String).
git_details:
$ref: '#/components/schemas/GitCreateDetails2'
required:
- yaml
EntityFilterQueryRequest:
title: EntityFilterQueryRequest
x-stoplight:
id: kygda92tf0cz1
type: object
properties:
entity_refs:
type: array
x-stoplight:
id: v224elukw745g
items:
x-stoplight:
id: 17xzqu8gnc2vm
type: string
EntityJsonSchemaResponse:
title: Entity JSON Schema Response
description: JSON Schema for validating Entity definitions, which can be used for client-side validation before submitting entity operations.
type: object
BulkEntityFieldUpdateRequest:
title: BulkEntityFieldUpdateRequest
type: object
description: Selects catalog entities by EITHER a filter OR a list of entityRefs (exactly one must be provided) and updates one or more allowlisted fields (each given as key/value) on all permitted matching entities.
required:
- properties
properties:
filter:
# --- truncated at 32 KB (70 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/harness/refs/heads/main/openapi/harness-entities-api-openapi.yml