Skip to content

Retrieve a project source

Request

Retrieves the source of the project. A source in an external Git repository includes the credentialId of the credential that Redocly uses to access the repository.

Requires org.project.read permission.

Security
ApiKey
Path
orgIdstring^org_[0-9abcdefghjkmnpqrstvwxyz]{26}$required
Organization ID.
Example:org_01h1s5z6vf2mm1mz3hevnn9va7
projectIdstring^prj_[0-9abcdefghjkmnpqrstvwxyz]{26}$required
Project ID.
Example:prj_01hh1t9sa6gwfv5naz04gr7ehm
sourceIdstring^rem_[0-9abcdefghjkmnpqrstvwxyz]{26}$required
Project source ID.
Example:rem_01h1s5z6vf2mm1mz3hevnn9va7
Headers
x-redocly-clientstring^[a-z0-9-]{1,64}/[\w.+-]{1,32}$

Identifies the calling client as <name>/<version>, for example reunite-ui/0.92.1. Used for API consumer observability. Requests without it are attributed as unknown.

Example:reunite-ui/0.92.1
curl -i -X GET \
  https://redocly.com/_mock/docs/platform/customization/reunite-api/openapi/orgs/org_01h1s5z6vf2mm1mz3hevnn9va7/projects/prj_01hh1t9sa6gwfv5naz04gr7ehm/sources/rem_01h1s5z6vf2mm1mz3hevnn9va7 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'x-redocly-client: reunite-ui/0.92.1'

Responses

OK.
Bodyapplication/json
idstring^rem_[0-9abcdefghjkmnpqrstvwxyz]{26}$read-onlyrequired

Project source ID. Unique identifier prefixed with rem_.

Example:"rem_01hc2rvwxf7jyj1er504khx8e7"
uristring, (uri)read-onlyrequired
Canonical URI for the project source resource.
Example:"https://app.cloud.redocly.com/api/orgs/org_01hh1t9sa6gwfv5naz04gr7ehm/projects/prj_01hh1t9sa6gwfv5naz04gr7ehm/sources/rem_01hc2rvwxf7jyj1er504khx8e7"
branchNamestringrequired
Main branch of the project.
Example:"main"
contentPathstringrequired
Path to the project content in the repository.
Example:"/"
repoNamestring
Name of the repository. Present when Redocly can access the repository.
Example:"Repo Name"
repoUrlstring
URL of the repository. Present when Redocly can access the repository.
Example:"https://github.com/example/example"
isInternalbooleanrequired
Whether the project content is stored in the Redocly-hosted repository instead of an external Git repository. Internal sources have no Git provider fields and no credential.
Example:true
isMonorepobooleanrequired
Whether the project content is in a folder of the repository rather than at its root.
Example:true
providerTypestring, (enum)(GitProviderType)
Git provider type.
Enum:"GITHUB_CLOUD""GITHUB_SERVER""GITLAB_CLOUD""GITLAB_SELF_MANAGED""BITBUCKET_CLOUD""BITBUCKET_DATACENTER""AZURE_DEVOPS_SERVICES""AZURE_DEVOPS_SERVER"
providerConfigobject(GitProvider)
Git provider of the repository.
canAccessRepoboolean

Whether Redocly can access the repository with the source credential. false usually means that the access token is expired or revoked.

Example:true
credentialIdstring^cred_[0-9abcdefghjkmnpqrstvwxyz]{26}$
ID of the credential Redocly uses to access the repository. Use it to rotate the access token of the credential. Absent for internal sources.
Example:"cred_01hc2rvwxf7jyj1er504khx8e7"
namespaceIdstring or null
Git provider namespace of the repository, such as a GitHub organization or an Azure DevOps project.
Example:"azure-test-org"
repositoryIdstring
Git provider identifier of the repository.
Example:"redocly-testing"
branchDeployStrategystringrequired
Which branches other than the main branch start builds.
Enum:"NONE""SELECTED""ALL"
selectedDeployBranchesArray of stringsrequired
Branches that start a build when they're updated or a pull request targets them.
prDeploysEnabledbooleanrequired

Whether pull requests start builds when they target the main branch or, with the SELECTED strategy, a branch in selectedDeployBranches. Has no effect with the ALL strategy, which builds every branch.

forksPrDeploysEnabledbooleanrequired
Whether build starts for PRs from forks.
visualReviewCheckDisabledbooleanrequired
Whether the Visual review check is disabled. A disabled check is reported as skipped instead of pending.
Default:false
createdAtstring, (date-time)read-onlyrequired
Time when Redocly created the project source.
updatedAtstring, (date-time)read-onlyrequired
Time of the last change to the project source.
objectstringread-onlyrequired
Entity name.
Value:"projectSource"
sourceIdstringdeprecated

Use id instead.

Example:"rem_01hc2rvwxf7jyj1er504khx8e7"
Response
{ "id": "rem_01hc2rvwxf7jyj1er504khx8e7", "uri": "https://app.cloud.redocly.com/api/orgs/org_01hh1t9sa6gwfv5naz04gr7ehm/projects/prj_01hh1t9sa6gwfv5naz04gr7ehm/sources/rem_01hc2rvwxf7jyj1er504khx8e7", "branchName": "main", "contentPath": "/", "repoName": "Repo Name", "repoUrl": "https://github.com/example/example", "isInternal": true, "isMonorepo": true, "providerType": "GITHUB_CLOUD", "providerConfig": { "id": "string", "type": "GITHUB_CLOUD", "name": "Redocly GitLab", "publicConfig": { … }, "isCustom": true }, "canAccessRepo": true, "credentialId": "cred_01hc2rvwxf7jyj1er504khx8e7", "sourceId": "rem_01hc2rvwxf7jyj1er504khx8e7", "namespaceId": "azure-test-org", "repositoryId": "redocly-testing", "branchDeployStrategy": "NONE", "selectedDeployBranches": [ "string" ], "prDeploysEnabled": true, "forksPrDeploysEnabled": true, "visualReviewCheckDisabled": false, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "object": "projectSource" }