File Store

This contains APIs related to File Store in Harness

List Files and Folders metadata

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifiers
Array of strings

This is the list of File IDs. Details specific to these IDs would be fetched.

searchTerm
string

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

pageIndex
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

pageSize
integer <int32> <= 100
Default: 50

Results per page(max 100)Default Value: 50

Array of objects (SortOrder)

Sort criteria for the elements.

pageToken
string

Page Token of the next results to fetch.Default Value: ''

Responses
400

Bad Request

500

Internal server error

default

List Files and Folders metadata

get/ng/api/file-store
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Create Folder or File including content

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema: multipart/form-data
tags
string

The File or Folder tags. (See example for expected format)

content
object

The content of the File as InputStream

identifier
string

Identifier of the File or Folder

name
required
string

Name of the File or Folder

fileUsage
string

This specifies the file usage

type
required
string

This specifies the type of the File

Enum: "FILE" "FOLDER"
parentIdentifier
required
string

This specifies parent directory identifier. The value of Root directory identifier is Root.

description
string

Description of the File or Folder

mimeType
string

Mime type of the File

path
string

The path of the File or Folder

object (EmbeddedUserDetailsDTO)

Updated by user details

object (EmbeddedUserDetailsDTO)

Updated by user details

lastModifiedAt
integer <int64>

Last modified time for the File or Folder

Responses
400

Bad Request

500

Internal server error

default

Returns create response

post/ng/api/file-store
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Creates File or Folder metadata via YAML

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema: application/yaml
required

YAML definition of File or Folder

required
object (File)

This is details of the File or Folder entity defined in Harness.

Responses
400

Bad Request

500

Internal server error

default

Returns create response

post/ng/api/file-store/yaml
Request samples
Response samples
No sample

Get the Folder or File metadata

Securityx-api-key
Request
path Parameters
identifier
required
string

The file identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Get the Folder or File metadata

get/ng/api/file-store/{identifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update Folder or File including content

Securityx-api-key
Request
path Parameters
identifier
required
string

The file identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema: multipart/form-data
tags
string

The File or Folder tags. (See example for expected format)

identifier
string

Identifier of the File or Folder

name
required
string

Name of the File or Folder

fileUsage
string

This specifies the file usage

type
required
string

This specifies the type of the File

Enum: "FILE" "FOLDER"
parentIdentifier
required
string

This specifies parent directory identifier. The value of Root directory identifier is Root.

description
string

Description of the File or Folder

mimeType
string

Mime type of the File

path
string

The path of the File or Folder

object (EmbeddedUserDetailsDTO)

Updated by user details

object (EmbeddedUserDetailsDTO)

Updated by user details

lastModifiedAt
integer <int64>

Last modified time for the File or Folder

content
object

The content of the File as InputStream

Responses
400

Bad Request

500

Internal server error

default

Returns update response

put/ng/api/file-store/{identifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete File or Folder by identifier

Securityx-api-key
Request
path Parameters
identifier
required
string

The file identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

forceDelete
boolean
Default: false

If true, the Entity will be forced delete, without checking any references/usages

Responses
400

Bad Request

500

Internal server error

default

Returns true if deletion was successful.

delete/ng/api/file-store/{identifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Download File

Securityx-api-key
Request
path Parameters
identifier
required
string

The file identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Download File content

get/ng/api/file-store/files/{identifier}/download
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get list of created by user details

Securityx-api-key
Request
query Parameters
accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns the list of created by user details

get/ng/api/file-store/files/createdBy
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get file content of scopedFilePathDeprecated

Securityx-api-key
Request
path Parameters
scopedFilePath
required
string

The scoped file path reference

query Parameters
accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns the file content of scopedFilePath

get/ng/api/file-store/files/{scopedFilePath}/content
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get file content of scopedFilePathV2

Securityx-api-key
Request
query Parameters
accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema: application/json

The scoped file path reference

string
Responses
400

Bad Request

500

Internal server error

default

Returns the file content of scopedFilePath

post/ng/api/file-store/files/content
Request samples
application/json
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get list of entities where file is referenced by queried entity type

Securityx-api-key
Request
path Parameters
identifier
required
string

The file identifier

query Parameters
pageIndex
integer <int32>
Default: 0

Page number of navigation. The default value is 0

pageSize
integer <int32> <= 1000
Default: 100

Number of entries per page. The default value is 100

accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

entityType
string

Entity type

Enum: "CreatePR" "MergePR" "Projects" "Pipelines" "PipelineSteps" "Http" "Email" "JiraCreate" "JiraUpdate" "JiraApproval" "HarnessApproval" "CustomApproval" "Barrier" "Queue" "FlagConfiguration" "ShellScript" "K8sCanaryDeploy" "K8sApply" "K8sBlueGreenDeploy" "K8sRollingDeploy" "K8sRollingRollback" "K8sScale" "K8sDelete" "K8sBGSwapServices" "K8sCanaryDelete" "TerraformApply" "TerraformPlan" "TerraformDestroy" "TerraformRollback" "HelmDeploy" "HelmRollback" "Connectors" "Secrets" "Files" "Service" "Environment" "EnvironmentGroup" "InputSets" "CvConfig" "Verify" "Delegates" "DelegateConfigurations" "CvVerificationJob" "IntegrationStage" "IntegrationSteps" "SecurityStage" "SecuritySteps" "CvKubernetesActivitySource" "DeploymentSteps" "DeploymentStage" "ApprovalStage" "PipelineStage" "FeatureFlagStage" "Template" "TemplateStage" "CustomDeployment" "Triggers" "MonitoredService" "GitRepositories" "FeatureFlags" "ServiceNowApproval" "ServiceNowCreate" "ServiceNowUpdate" "ServiceNowImportSet" "GovernancePolicies" "Policy" "Run" "RunTests" "Plugin" "RestoreCacheGCS" "RestoreCacheS3" "SaveCacheGCS" "SaveCacheS3" "Security" "AquaTrivy" "AWSECR" "Bandit" "BlackDuck" "Brakeman" "Burp" "Checkmarx" "Clair" "DataTheorem" "DockerContentTrust" "External" "FortifyOnDemand" "Grype" "JfrogXray" "Mend" "Metasploit" "Nessus" "NexusIQ" "Nikto" "Nmap" "Openvas" "Owasp" "PrismaCloud" "Prowler" "Qualys" "Reapsaw" "ShiftLeft" "Sniper" "Snyk" "Sonarqube" "Sysdig" "Tenable" "Veracode" "Zap" "GitClone" "ArtifactoryUpload" "GCSUpload" "S3Upload" "BuildAndPushGCR" "BuildAndPushGAR" "BuildAndPushECR" "BuildAndPushDockerRegistry" "CreateStack" "DeleteStack" "ServerlessAwsLambdaDeploy" "ServerlessAwsLambdaRollback" "CustomStage" "RollbackStack" "Infrastructure" "Command" "StrategyNode" "AzureSlotDeployment" "AzureTrafficShift" "FetchInstanceScript" "AzureSwapSlot" "AzureWebAppRollback" "JenkinsBuild" "EcsRollingDeploy" "EcsRollingRollback" "EcsCanaryDeploy" "EcsCanaryDelete" "AzureCreateARMResource" "BuildAndPushACR" "AzureCreateBPResource" "AzureARMRollback" "Background" "Wait" "ArtifactSource" "EcsBlueGreenCreateService" "EcsBlueGreenSwapTargetGroups" "EcsBlueGreenRollback" "ShellScriptProvision" "Freeze" "GitOpsUpdateReleaseRepo" "GitOpsFetchLinkedApps" "EcsRunTask" "Chaos" "ElastigroupDeploy" "ElastigroupRollback" "Action" "ElastigroupSetup" "Bitrise" "TerragruntPlan" "TerragruntApply" "TerragruntDestroy" "TerragruntRollback" "IACMStage" "IACMStep" "IACM" "Container" "IACMTerraformPlugin" "IACMApproval" "ElastigroupBGStageSetup" "ElastigroupSwapRoute" "AsgCanaryDeploy" "AsgCanaryDelete" "SwapRoutes" "SwapRollback" "AppResize" "AppRollback" "CanaryAppSetup" "BGAppSetup" "BasicAppSetup" "TanzuCommand" "AsgRollingDeploy" "AsgRollingRollback" "GovernanceRuleAWS" "TasRollingDeploy" "TasRollingRollback" "K8sDryRun" "AsgBlueGreenSwapService" "AsgBlueGreenDeploy" "AsgBlueGreenRollback" "TerraformCloudRun" "TerraformCloudRollback" "DeployCloudFunction" "DeployCloudFunctionWithNoTraffic" "CloudFunctionTrafficShift" "CloudFunctionRollback" "AwsLambdaDeploy" "AwsSamDeploy" "AwsSamRollback" "SscaOrchestration" "AwsLambdaRollback" "GitOpsSync" "BambooBuild" "CdSscaOrchestration" "RouteMapping" "AWSSecurityHub" "CustomIngest" "BackstageEnvironmentVariable" "Fossa" "CodeQL" "Gitleaks" "DeployCloudFunctionGenOne" "RollbackCloudFunctionGenOne" "K8sBlueGreenStageScaleDown" "AwsSamBuild" "Semgrep" "SscaEnforcement" "IdpConnector" "CdSscaEnforcement" "DownloadManifests" "ServerlessAwsLambdaPrepareRollbackV2" "ServerlessAwsLambdaRollbackV2" "Coverity" "ServerlessAwsLambdaDeployV2" "AnalyzeDeploymentImpact" "ServerlessAwsLambdaPackageV2" "RevertPR" "AwsCdkBootstrap" "AwsCdkSynth" "AwsCdkDiff" "AwsCdkDeploy" "AwsCdkDestroy" "IdpScorecard" "IdpCheck" "AwsCdkRollback" "SlsaVerification" "UpdateGitOpsApp" "EcsServiceSetup" "EcsUpgradeContainer" "EcsBasicRollback" "ChaosInfrastructure" "Anchore" "Overrides" "AsgShiftTraffic" "AquaSecurity" "IDPStage" "ChaosHub" "CookieCutter" "CreateRepo" "DownloadAwsS3" "DirectPush" "RegisterCatalog" "K8sTrafficRouting" "DownloadHarnessStore" "CreateCatalog" "SlackNotify" "OsvScaner" "IACMOpenTofuPlugin" "AsgPhasedDeploy" "AsgSetup" "AsgRollback" "Test" "Wiz" "Certificates" "IACMCheckov" "IACMTFCompliance" "IACMTFLint" "IACMTFSec" "NotificationRule" "NotificationChannel" "K8sPatch" "CreateOrganisation" "CreateProject" "DBSchemaApply" "IACMPrepareExecution" "DBSchemaRollback" "K8sRollout" "CreateResource" "Checkov" "ServiceDiscoveryAgent" "ChaosInfrastructureV2" "Traceable" "AzureFunctionDeploy" "AzureFunctionRollback" "GoogleCloudRunDeploy" "GoogleCloudRunPrepareRollbackData" "GoogleCloudRunTrafficShift" "GoogleCloudRunRollback" "GoogleCloudRunJob" "UpdateCatalogProperty"
searchTerm
string
Responses
400

Bad Request

500

Internal server error

default

Returns the list of entities where file is referenced by

get/ng/api/file-store/{identifier}/referenced-by
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get the list of supported entity types for files

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Responses
400

Bad Request

500

Internal server error

default

Returns the list of supported entity types for file

get/ng/api/file-store/supported-entity-types
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get filtered list of Files or Folders

Securityx-api-key
Request
query Parameters
pageIndex
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

pageSize
integer <int32> <= 100
Default: 50

Results per page(max 100)Default Value: 50

Array of objects (SortOrder)

Sort criteria for the elements.

pageToken
string

Page Token of the next results to fetch.Default Value: ''

accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

filterIdentifier
string

Filter identifier

searchTerm
string

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

Request Body schema: application/json

Details of the File filter properties to be applied

fileUsage
string

This specifies the file usage

Enum: "MANIFEST_FILE" "CONFIG" "SCRIPT"
object (EmbeddedUserDetailsDTO)

Updated by user details

object (ReferencedByDTO)

File referenced by other entity

object

Filter tags as a key-value pair.

filterType
required
string

This specifies the corresponding Entity of the filter.

Enum: "Connector" "Secret" "DelegateProfile" "Delegate" "PipelineSetup" "PipelineExecution" "Deployment" "Audit" "Template" "Trigger" "EnvironmentGroup" "FileStore" "CCMRecommendation" "Anomaly" "Environment" "RuleExecution" "Override" "InputSet" "Webhook"
Responses
400

Bad Request

500

Internal server error

default

Returns filtered list of Files or Folder

post/ng/api/file-store/files/filter
Request samples
application/json
{
  • "fileUsage": "MANIFEST_FILE",
  • "createdBy": {
    },
  • "referencedBy": {
    },
  • "tags": {
    },
  • "filterType": "Connector"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get folder nodes at first level, not including sub-nodes

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

fileUsage
string

The file usage

Enum: "MANIFEST_FILE" "CONFIG" "SCRIPT"
Request Body schema: application/json
required

Folder node for which to return the list of nodes

identifier
required
string

Identifier of the File Store Node

parentIdentifier
string

Parent identifier of the File Store Node

name
required
string

Name of the File Store Node

type
required
string

Type of the File Store Node

Enum: "FILE" "FOLDER"
object (EmbeddedUserDetailsDTO)

Updated by user details

Array of objects (FileStoreNode)

Node children

Responses
400

Bad Request

500

Internal server error

default

Returns the folder populated with file store nodes as children

post/ng/api/file-store/folder
Request samples
application/json
{
  • "identifier": "string",
  • "parentIdentifier": "string",
  • "name": "string",
  • "type": "FILE",
  • "lastModifiedBy": {
    },
  • "children": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update File or Folder metadata via YAML

Securityx-api-key
Request
path Parameters
identifier
required
string

The file identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema: application/yaml
required

YAML definition of File or Folder

required
object (File)

This is details of the File or Folder entity defined in Harness.

Responses
400

Bad Request

500

Internal server error

default

Returns update response

put/ng/api/file-store/yaml/{identifier}
Request samples
Response samples
No sample