File Store
This contains APIs related to File Store in Harness
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
This is the list of File IDs. Details specific to these IDs would be fetched.
This will be used to filter files or folders. Any file or folder having the specified search term in its Name or Identifier will be filtered
Page Index of the results to fetch.Default Value: 0
0Results per page(max 100)Default Value: 50
50Page Token of the next results to fetch.Default Value: ''
Bad Request
This is Failure entity as defied in Harness
Internal server error
List Files and Folders metadata
GET /gateway/ng/api/file-store?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
The File or Folder tags. (See example for expected format)
The content of the File as InputStream
Identifier of the File or Folder
Name of the File or Folder
This specifies the file usage
This specifies the type of the File
This specifies parent directory identifier. The value of Root directory identifier is Root.
Description of the File or Folder
Mime type of the File
The path of the File or Folder
Last modified time for the File or Folder
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns create response
POST /gateway/ng/api/file-store?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: multipart/form-data
Accept: */*
Content-Length: 284
{
"tags": "text",
"content": {},
"identifier": "text",
"name": "text",
"fileUsage": "text",
"type": "FILE",
"parentIdentifier": "text",
"description": "text",
"mimeType": "text",
"path": "text",
"createdBy": {
"name": "text",
"email": "text"
},
"lastModifiedBy": {
"name": "text",
"email": "text"
},
"lastModifiedAt": 1
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Wrapper object for File Store YAML operations containing a file field with File or Folder metadata.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns create response
POST /gateway/ng/api/file-store/yaml?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/yaml
Accept: */*
Content-Length: 349
"file:
accountIdentifier: text
orgIdentifier: text
projectIdentifier: text
identifier: text
name: text
fileUsage: text
type: FILE
parentIdentifier: text
description: text
tags:
- key: text
value: text
mimeType: text
createdBy:
name: text
email: text
lastModifiedBy:
name: text
email: text
"{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}The file identifier
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Get the Folder or File metadata
GET /gateway/ng/api/file-store/{identifier}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}The file identifier
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
The File or Folder tags. (See example for expected format)
Identifier of the File or Folder
Name of the File or Folder
This specifies the file usage
This specifies the type of the File
This specifies parent directory identifier. The value of Root directory identifier is Root.
Description of the File or Folder
Mime type of the File
The path of the File or Folder
Last modified time for the File or Folder
The content of the File as InputStream
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns update response
PUT /gateway/ng/api/file-store/{identifier}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: multipart/form-data
Accept: */*
Content-Length: 284
{
"tags": "text",
"identifier": "text",
"name": "text",
"fileUsage": "text",
"type": "FILE",
"parentIdentifier": "text",
"description": "text",
"mimeType": "text",
"path": "text",
"createdBy": {
"name": "text",
"email": "text"
},
"lastModifiedBy": {
"name": "text",
"email": "text"
},
"lastModifiedAt": 1,
"content": {}
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}The file identifier
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
If true, the Entity will be forced delete, without checking any references/usages
falseBad Request
This is Failure entity as defied in Harness
Internal server error
Returns true if deletion was successful.
DELETE /gateway/ng/api/file-store/{identifier}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}The file identifier
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Download File content
GET /gateway/ng/api/file-store/files/{identifier}/download?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns the list of created by user details
GET /gateway/ng/api/file-store/files/createdBy HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}The scoped file path reference. The path must start with '/' and can be prefixed with a scope: 'account:/my-file' for account scope, 'org:/my-file' for org scope, or 'project:/my-file' (or just '/my-file') for project scope. The request body must be a plain string (not JSON-encoded). Do not wrap the path in quotes.
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns the file content of scopedFilePath
GET /gateway/ng/api/file-store/files/{scopedFilePath}/content HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Returns the content of a file in the Harness file store as a string. The request body must be a plain-text string containing the scoped file path (not JSON-encoded, do not wrap in quotes). For account scope, prefix with 'account:' (e.g., 'account:/my-file'). For org scope, prefix with 'org:' (e.g., 'org:/my-file'). For project scope, optionally prefix with 'project:' or just provide the path (e.g., '/my-file'). The path must start with '/'. Scope query parameters must also match: project scope requires accountIdentifier, orgIdentifier, and projectIdentifier; org scope requires accountIdentifier and orgIdentifier; account scope requires only accountIdentifier.
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns the file content as a string
POST /gateway/ng/api/file-store/files/content HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 6
"text"{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}The file identifier
Page number of navigation. The default value is 0
0Number of entries per page. The default value is 100
100Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Entity type
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns the list of entities where file is referenced by
GET /gateway/ng/api/file-store/{identifier}/referenced-by?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Account Identifier for the Entity.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns the list of supported entity types for file
GET /gateway/ng/api/file-store/supported-entity-types?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Page Index of the results to fetch.Default Value: 0
0Results per page(max 100)Default Value: 50
50Page Token of the next results to fetch.Default Value: ''
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Filter identifier
This will be used to filter files or folders. Any file or folder having the specified search term in its Name or Identifier will be filtered
Properties of the Files Filter defined in Harness
This specifies the file usage
This specifies the corresponding Entity of the filter.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns filtered list of Files or Folder
POST /gateway/ng/api/file-store/files/filter HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 188
{
"fileUsage": "MANIFEST_FILE",
"createdBy": {
"name": "text",
"email": "text"
},
"referencedBy": {
"type": "CreatePR",
"name": "text"
},
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"filterType": "Connector"
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
The file usage
This contains folder details
Identifier of the File Store Node
Parent identifier of the File Store Node
Name of the File Store Node
Type of the File Store Node
Path of the file or folder
Last modified time for the File Store Node
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns the folder populated with file store nodes as children
POST /gateway/ng/api/file-store/folder?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 260
{
"identifier": "text",
"parentIdentifier": "text",
"name": "text",
"type": "FILE",
"lastModifiedBy": {
"name": "text",
"email": "text"
},
"children": [
{
"identifier": "text",
"parentIdentifier": "text",
"name": "text",
"type": "FILE",
"lastModifiedBy": {
"name": "text",
"email": "text"
}
}
]
}{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Updates the metadata of an existing file or folder using a YAML payload. This endpoint updates metadata (name, description, tags, etc.) only.
The file identifier
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
Wrapper object for File Store YAML operations containing a file field with File or Folder metadata.
Bad Request
This is Failure entity as defied in Harness
Internal server error
Returns update response
PUT /gateway/ng/api/file-store/yaml/{identifier}?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/yaml
Accept: */*
Content-Length: 240
"|
file:
identifier: my_config_file
name: My Config File
type: FILE
fileUsage: CONFIG
parentIdentifier: Root
description: Sample configuration file
mimeType: text/plain
tags:
- key: env
value: production
"{
"status": "SUCCESS",
"code": "DEFAULT_ERROR_CODE",
"message": "text",
"correlationId": "text",
"errors": [
{
"fieldId": "text",
"error": "text"
}
]
}Last updated
Was this helpful?