File Store

This contains APIs related to File Store in Harness

Creates file or folder

SecurityApiKey
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 tags

content
object
identifier
string

Identifier of the File

name
required
string

Name of the File

fileUsage
string

This specifies the file usage

Enum: "MANIFEST_FILE" "CONFIG" "SCRIPT"
type
required
string

This specifies the type of the File

Enum: "FILE" "FOLDER"
parentIdentifier
required
string

This specifies parent identifier

description
string

Description of the File

mimeType
string

Mime type of the File

path
string

The path of the File

object (EmbeddedUserDetailsDTO)

File updated by user

object (EmbeddedUserDetailsDTO)

File updated by user

lastModifiedAt
integer <int64>

Last modified time for the File

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 via YAML

SecurityApiKey
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

YAML definition of file or folder

required
object (File)

This is details of the file 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

Delete file or folder by identifier

SecurityApiKey
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

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

SecurityApiKey
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 the file with 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 entity types.

SecurityApiKey
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

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

Get File

SecurityApiKey
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 file

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

Get filtered list of files.

SecurityApiKey
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.

accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

filterIdentifier
string
searchTerm
string
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)

File updated by user

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" "DelegateProfile" "Delegate" "PipelineSetup" "PipelineExecution" "Deployment" "Audit" "Template" "EnvironmentGroup" "FileStore" "CCMRecommendation" "Anomaly" "Environment"
Responses
400

Bad Request

500

Internal server error

default

Returns filtered list of files.

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.

SecurityApiKey
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

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)

File updated by user

Array of objects (FileStoreNode)

Node children

Responses
400

Bad Request

500

Internal server error

default

Returns the list of folder 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": [
    ]
}

Get list of created by usernames.

SecurityApiKey
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 usernames

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

Get Referenced by Entities.

SecurityApiKey
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>
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" "FeatureFlagStage" "Template" "TemplateStage" "CustomDeployment" "Triggers" "MonitoredService" "GitRepositories" "FeatureFlags" "ServiceNowApproval" "ServiceNowCreate" "ServiceNowUpdate" "GovernancePolicies" "Policy" "Run" "RunTests" "Plugin" "RestoreCacheGCS" "RestoreCacheS3" "SaveCacheGCS" "SaveCacheS3" "Security" "GitClone" "ArtifactoryUpload" "GCSUpload" "S3Upload" "BuildAndPushGCR" "BuildAndPushECR" "BuildAndPushDockerRegistry" "CreateStack" "DeleteStack" "ServerlessAwsLambdaDeploy" "ServerlessAwsLambdaRollback" "CustomStage" "RollbackStack" "Infrastructure" "Command" "StrategyNode" "AzureSlotDeployment" "AzureTrafficShift" "AzureSwapSlot" "AzureWebAppRollback" "JenkinsBuild" "EcsRollingDeploy" "EcsRollingRollback" "EcsCanaryDeploy" "EcsCanaryDelete" "AzureCreateARMResource" "BuildAndPushACR" "AzureCreateBPResource" "AzureARMRollback" "Background"
searchTerm
string
Responses
400

Bad Request

500

Internal server error

default

Returns the list of entities 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": [
    ]
}

List files and folders

SecurityApiKey
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 would be used to filter Files. Any Files having the specified string in its Name, ID and Tag would 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.

Responses
400

Bad Request

500

Internal server error

default

List files and folders

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

Updates file or folder

SecurityApiKey
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 tags

identifier
string

Identifier of the File

name
required
string

Name of the File

fileUsage
string

This specifies the file usage

Enum: "MANIFEST_FILE" "CONFIG" "SCRIPT"
type
required
string

This specifies the type of the File

Enum: "FILE" "FOLDER"
parentIdentifier
required
string

This specifies parent identifier

description
string

Description of the File

mimeType
string

Mime type of the File

path
string

The path of the File

object (EmbeddedUserDetailsDTO)

File updated by user

object (EmbeddedUserDetailsDTO)

File updated by user

lastModifiedAt
integer <int64>

Last modified time for the File

content
object
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": [
    ]
}

Updates file or folder via YAML

SecurityApiKey
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

YAML definition of file or folder

required
object (File)

This is details of the file 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