Skip to main content

getAzureFileFetchUrl()

Home > @backstage/integration > getAzureFileFetchUrl

Given a URL pointing to a file on a provider, returns a URL that is suitable for fetching the contents of the data.

Signature:

function getAzureFileFetchUrl(url: string): string;

Parameters

ParameterTypeDescription
urlstringA URL pointing to a file

Returns:

string

Remarks

Converts - from: https://dev.azure.com/{organization}/{project}/_git/reponame?path={path}&version=GB{commitOrBranch}&_a=contents - to: https://dev.azure.com/{organization}/{project}/_apis/git/repositories/reponame/items?path={path}&version={commitOrBranch}