File Store

This contains APIs related to File Store in Harness

Creates file or folder

Request
Security:
ApiKey (readwrite)
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: multipart/form-data
tags
string
content
object
identifier
string

Identifier of the File

name
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
string

This specifies parent identifier

description
string

Description of the File

mimeType
string

Mime type of the File

Responses
400

Bad Request

500

Internal server error

default

Returns create response

post/ng/api/file-store
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/file-store?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'Content-Type: multipart/form-data' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -F tags=string \
  -F 'content=[object Object]' \
  -F identifier=string \
  -F name=string \
  -F fileUsage=MANIFEST_FILE \
  -F type=FILE \
  -F parentIdentifier=string \
  -F description=string \
  -F mimeType=string
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete file or folder by identifier

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

The file identifier

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 true if deletion was successful.

delete/ng/api/file-store/{identifier}
Request samples
curl -i -X DELETE \
  'https://app.harness.io/gateway/ng/api/file-store/{identifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Download File

Request
Security:
ApiKey (readwrite)
path Parameters
fileIdentifier
required
string

The file identifier

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

Download the file with content

get/ng/api/file-store/file/{fileIdentifier}/download
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/file-store/file/{fileIdentifier}/download?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get Folder nodes.

Request
Security:
ApiKey (readwrite)
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

Folder node for which to return the list of nodes

identifier
required
string

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"
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",
  • "name": "string",
  • "type": "FILE",
  • "children": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Updates file or folder

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

The file identifier

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: multipart/form-data
tags
string
identifier
string

Identifier of the File

name
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
string

This specifies parent identifier

description
string

Description of the File

mimeType
string

Mime type of the File

content
object
Responses
400

Bad Request

500

Internal server error

default

Returns update response

put/ng/api/file-store/{identifier}
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/ng/api/file-store/{identifier}?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'Content-Type: multipart/form-data' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -F tags=string \
  -F identifier=string \
  -F name=string \
  -F fileUsage=MANIFEST_FILE \
  -F type=FILE \
  -F parentIdentifier=string \
  -F description=string \
  -F mimeType=string \
  -F 'content=[object Object]'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}