Skip to main content
Version: Next

getHarnessFileContentsUrl()

Home > @backstage/integration > getHarnessFileContentsUrl

Given a file path URL, it returns an API URL which returns the contents of the file .

Signature:

function getHarnessFileContentsUrl(config: HarnessIntegrationConfig, url: string): string;

Parameters

ParameterTypeDescription
configHarnessIntegrationConfigThe relevant provider config
urlstringA URL pointing to a file

Returns:

string

Remarks

Converts from: https://app.harness.io/ng/account/accountId/module/code/orgs/orgName/projects/projName/repos/repoName/files/refMain/\~/all-apis.yaml https://qa.harness.io/ng/account/bDCAuAjFSJCLFj\_0ug3lCg/module/code/orgs/HiteshTest/repos/impoorter/files/main/\~/catalog.yaml to: https://app.harness.io/gateway/code/api/v1/repos/accountId/orgName/projName/repoName/+/content/all-apis.yaml?routingId=accountId&include\_commit=false&ref=refMain