Skip to content

Remotes

Operations related to remotes.

Upsert remote

Request

Upsert remote. If remote with the same mountPath and type already exists the remote object is returned. If the type doesn't match the existing remote, a 409 error is returned. Otherwise, a new remote is created.

Security
ApiKey or UserCookie
Path
orgIdstringrequired
Organization ID.
Example:acme-inc
projectIdstringrequired
Project ID.
Example:my-project
Bodyapplication/json
mountPathstringrequired
Remote target path.
Example:"apis/test/@v1"
typestringrequired
Remote type. TODO: Add discriminator by type and add other fields for GIT and URL remote types.
Enum:"CICD""GIT""URL"
Example:"CICD"
autoSyncboolean
Auto sync changes to remote.
autoMergeboolean
Auto merge changes from remote.
providerTypestring, (enum)(GitProviderType)
Git provider type.
Enum:"GITHUB_CLOUD""GITHUB_SERVER""GITLAB_CLOUD""GITLAB_SELF_MANAGED""BITBUCKET_CLOUD""BITBUCKET_DATACENTER""AZURE"
curl -i -X POST \
  https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/acme-inc/projects/my-project/remotes \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "mountPath": "apis/test/@v1",
    "type": "CICD",
    "autoSync": true,
    "autoMerge": true,
    "providerType": "GITHUB_CLOUD"
  }'

Responses

Remote created.
Bodyapplication/json
mountPathstringrequired
Remote target path.
Example:"apis/test/@v1"
typestringrequired
Remote type. TODO: Add discriminator by type and add other fields for GIT and URL remote types.
Enum:"CICD""GIT""URL"
Example:"CICD"
autoSyncboolean
Auto sync changes to remote.
autoMergeboolean
Auto merge changes from remote.
createdAtstring, (date-time)read-only
updatedAtstring, (date-time)read-only
providerTypestring, (enum)(GitProviderType)
Git provider type.
Enum:"GITHUB_CLOUD""GITHUB_SERVER""GITLAB_CLOUD""GITLAB_SELF_MANAGED""BITBUCKET_CLOUD""BITBUCKET_DATACENTER""AZURE"
namespaceIdstringread-only
repositoryIdstringread-only
projectIdstring or nullread-only
mountBranchNamestringread-only
contentPathstringread-only
credentialIdstringread-only
branchNamestringread-only
contentTypestringread-only
Enum:"FOLDER""FILE"
Example:"FILE"
idstringread-onlyrequired
Remote ID.
Example:"rem_01h2captefvs9bpg3v6twqqj9n"
Response
{ "mountPath": "apis/test/@v1", "type": "CICD", "autoSync": true, "autoMerge": true, "createdAt": "2023-06-07T00:00:00Z", "updatedAt": "2023-06-07T00:00:00Z", "providerType": "GITHUB_CLOUD", "namespaceId": "string", "repositoryId": "string", "projectId": "string", "mountBranchName": "string", "contentPath": "string", "credentialId": "string", "branchName": "string", "contentType": "FILE", "id": "rem_01h2captefvs9bpg3v6twqqj9n" }