Skip to content

Retrieve a remote

Request

Plans:ScaleEnterprise

Retrieves a remote of the project. A Git remote includes the credentialId of the credential that Redocly uses to access its repository.

Requires project.remotes.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
remoteIdstring^rem_[0-9abcdefghjkmnpqrstvwxyz]{26}$required
Remote 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/remotes/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

Remote ID. Unique identifier prefixed with rem_.

Example:"rem_01h1s5z6vf2mm1mz3hevnn9va7"
typestringrequired
Discriminator
Value:"GIT"
mountPathstring(MountPath)required

Path to the folder in the local repository where remote content is mounted. Paths outside of the project's contentPath are not allowed.

Example:"apis/test/@v1"
autoSyncboolean(AutoSync)
Whether Redocly syncs changes from the remote automatically.
Default:true
autoSyncDisabledAtstring or null, (date-time)(AutoSyncDisabledAt)read-only

Time when Redocly turned off auto-sync after repeated failed updates. null when auto-sync is on or a user turned it off.

Example:"2021-08-25T10:00:00.000Z"
autoMergeboolean(AutoMerge)
Auto merge changes from remote.
Default:false
createdAtstring, (date-time)read-onlyrequired
Example:"2023-06-07T00:00:00Z"
updatedAtstring, (date-time)read-onlyrequired
Example:"2023-06-07T00:00:00Z"
editedAtstring or null, (date-time)read-onlyrequired
Time when a user last created or updated the remote.
Example:"2023-06-07T00:00:00Z"
createdByIdstring or nullread-onlyrequired
ID of the user who created the remote.
Example:"usr_01hh1t9sa6gwfv5naz04gr7ehm"
editedByIdstring or nullread-onlyrequired
ID of the user who last created or updated the remote.
Example:"usr_01hh1t9sa6gwfv5naz04gr7ehm"
lastSyncedAtstring or null, (date-time)(LastSyncedAt)

Last time remote processed the default branch update. null when the remote has never been synced. For URL remotes it is updated on interval specified for the remote.

Example:"2021-08-25T10:00:00.000Z"
attemptsinteger(SyncAttempts)

Number of failed attempts to sync the remote. If this value exceeds 6, automatic synchronization is disabled.

Example:1
providerTypestring, (enum)(GitProviderType)required
Git provider type.
Enum:"GITHUB_CLOUD""GITHUB_SERVER""GITLAB_CLOUD""GITLAB_SELF_MANAGED""BITBUCKET_CLOUD""BITBUCKET_DATACENTER""AZURE_DEVOPS_SERVICES""AZURE_DEVOPS_SERVER"
namespaceIdstring or null
Git provider namespace of the repository, such as a GitHub organization or an Azure DevOps project.
repositoryIdstringrequired
Git provider identifier of the repository.
mountBranchNamestring(MountBranchName)required
Name of the branch to mount.
Example:"main"
contentPathstringrequired
Path to the connected folder in the remote repository.
credentialIdstring^cred_[0-9abcdefghjkmnpqrstvwxyz]{26}$required
ID of the credential Redocly uses to access the repository. Use it to rotate the access token of the credential.
Example:"cred_01hc2rvwxf7jyj1er504khx8e7"
branchNamestringrequired
Branch name in the remote repository.
Example:"dev"
contentTypestringrequired
Enum:"FOLDER""FILE"
Example:"FILE"
urlnullread-only
intervalnullread-only
objectstringread-onlyrequired
Entity name.
Value:"remote"
uristring, (uri)read-onlyrequired
Canonical URI for the remote resource.
Example:"https://app.cloud.redocly.com/api/orgs/org_01hh1t9sa6gwfv5naz04gr7ehm/projects/prj_01hh1t9sa6gwfv5naz04gr7ehm/remotes/rem_01h1s5z6vf2mm1mz3hevnn9va7"
lastFinishedGitUpdateIdstring or nullread-only
ID of the last finished Git update.
Example:"grupd_01jw8fczg4n4fcwkkg0nac3ddh"
errorsnull or object(GenericRemoteError)read-only
One of:
nullread-only
Response
{ "id": "rem_01h1s5z6vf2mm1mz3hevnn9va7", "type": "GIT", "mountPath": "apis/test/@v1", "autoSync": true, "autoSyncDisabledAt": "2021-08-25T10:00:00.000Z", "autoMerge": false, "createdAt": "2023-06-07T00:00:00Z", "updatedAt": "2023-06-07T00:00:00Z", "editedAt": "2023-06-07T00:00:00Z", "createdById": "usr_01hh1t9sa6gwfv5naz04gr7ehm", "editedById": "usr_01hh1t9sa6gwfv5naz04gr7ehm", "lastSyncedAt": "2021-08-25T10:00:00.000Z", "attempts": 1, "providerType": "GITHUB_CLOUD", "namespaceId": "string", "repositoryId": "string", "mountBranchName": "main", "contentPath": "string", "credentialId": "cred_01hc2rvwxf7jyj1er504khx8e7", "branchName": "dev", "contentType": "FILE", "url": null, "interval": null, "object": "remote", "uri": "https://app.cloud.redocly.com/api/orgs/org_01hh1t9sa6gwfv5naz04gr7ehm/projects/prj_01hh1t9sa6gwfv5naz04gr7ehm/remotes/rem_01h1s5z6vf2mm1mz3hevnn9va7", "lastFinishedGitUpdateId": "grupd_01jw8fczg4n4fcwkkg0nac3ddh", "errors": null }