Repositories

Checks whether a repository with the given name exists

Checks whether a repository with the given name exists.

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

agentIdentifier
string

Agent identifier for entity.

url
string
Responses
200

A successful response.

default

An unexpected error response.

get/gitops/api/v1/repositories/exists
Request samples
Response samples
application/json
true

CreateRepository creates a new repository configuration

CreateRepository creates a new repository configuration.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

query Parameters
accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
string
repoCredsId
string
Request Body schema: application/json
object (Repository is a repository holding application configurations)
upsert
boolean (Whether to create in upsert mode)
credsOnly
boolean (Whether to operate on credential set instead of repository)
Responses
200

A successful response.

default

An unexpected error response.

post/gitops/api/v1/agents/{agentIdentifier}/repositories
Request samples
application/json
{
  • "repo": {
    },
  • "upsert": true,
  • "credsOnly": true
}
Response samples
application/json
{
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "agentIdentifier": "string",
  • "identifier": "string",
  • "repository": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "lastModifiedAt": "2019-08-24T14:15:22Z",
  • "stale": true,
  • "repositoryCredentialsId": "string"
}

DeleteRepository deletes a repository from the configuration

DeleteRepository deletes a repository from the configuration.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

identifier
required
string
query Parameters
accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

query.repo
string

Repo URL for query.

query.forceRefresh
boolean

Whether to force a cache refresh on repo's connection state.

query.project
string

The associated project project.

Responses
200

A successful response.

default

An unexpected error response.

delete/gitops/api/v1/agents/{agentIdentifier}/repositories/{identifier}
Request samples
Response samples
application/json
{ }

Get returns a repository or its credentials

Get returns a repository or its credentials.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

query.repo
string

Repo URL for query.

query.forceRefresh
boolean

Whether to force a cache refresh on repo's connection state.

query.project
string

The associated project project.

Responses
200

A successful response.

default

An unexpected error response.

get/gitops/api/v1/agents/{agentIdentifier}/repositories/{identifier}
Request samples
Response samples
application/json
{
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "agentIdentifier": "string",
  • "identifier": "string",
  • "repository": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "lastModifiedAt": "2019-08-24T14:15:22Z",
  • "stale": true,
  • "repositoryCredentialsId": "string"
}

GetAppDetails returns application details by given path

GetAppDetails returns application details by given path.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

query.source.repoURL
string

RepoURL is the URL to the repository (Git or Helm) that contains the application manifests.

query.source.path
string

Path is a directory path within the Git repository, and is only valid for applications sourced from Git.

query.source.targetRevision
string

TargetRevision defines the revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version.

query.source.helm.valueFiles
Array of strings

ValuesFiles is a list of Helm value files to use when generating a template.

query.source.helm.releaseName
string

ReleaseName is the Helm release name to use. If omitted it will use the application name.

query.source.helm.values
string

Values specifies Helm values to be passed to helm template, typically defined as a block.

query.source.helm.version
string

Version is the Helm version to use for templating (either "2" or "3").

query.source.helm.passCredentials
boolean

PassCredentials pass credentials to all domains (Helm's --pass-credentials).

query.source.kustomize.namePrefix
string

NamePrefix is a prefix appended to resources for Kustomize apps.

query.source.kustomize.nameSuffix
string

NameSuffix is a suffix appended to resources for Kustomize apps.

query.source.kustomize.images
Array of strings

Images is a list of Kustomize image override specifications.

query.source.kustomize.version
string

Version controls which version of Kustomize to use for rendering manifests.

query.source.kustomize.forceCommonLabels
boolean

ForceCommonLabels specifies whether to force applying common labels to resources for Kustomize apps.

query.source.kustomize.forceCommonAnnotations
boolean

ForceCommonAnnotations specifies whether to force applying common annotations to resources for Kustomize apps.

query.source.ksonnet.environment
string

Environment is a ksonnet application environment name.

query.source.directory.recurse
boolean

Recurse specifies whether to scan a directory recursively for manifests.

query.source.directory.jsonnet.libs
Array of strings

Additional library search dirs.

query.source.directory.exclude
string

Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation.

query.source.directory.include
string

Include contains a glob pattern to match paths against that should be explicitly included during manifest generation.

query.source.plugin.name
string
query.source.chart
string

Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo.

query.appName
string
query.appProject
string
Responses
200

A successful response.

default

An unexpected error response.

get/gitops/api/v1/agents/{agentIdentifier}/repositories/{identifier}/appdetails
Request samples
Response samples
application/json
{
  • "type": "string",
  • "ksonnet": {
    },
  • "helm": {
    },
  • "kustomize": {
    },
  • "directory": { }
}

GetHelmCharts returns list of helm charts in the specified repository

GetHelmCharts returns list of helm charts in the specified repository.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

query.repo
string

Repo URL for query.

query.forceRefresh
boolean

Whether to force a cache refresh on repo's connection state.

query.project
string

The associated project project.

Responses
200

A successful response.

default

An unexpected error response.

get/gitops/api/v1/agents/{agentIdentifier}/repositories/{identifier}/helmcharts
Request samples
Response samples
application/json
{
  • "items": [
    ]
}

List returns list of Repositories

List returns list of Repositories

SecurityApiKey
Request
Request Body schema: application/json
accountIdentifier
string

Account Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

agentIdentifier
string

Agent identifier for entity.

identifier
string
searchTerm
string
pageSize
integer <int32>
pageIndex
integer <int32>
filter
object

Filters for Repositories. Eg. "identifier": { "$in": ["id1", "id2"]

repoCredsId
string
Responses
200

A successful response.

default

An unexpected error response.

post/gitops/api/v1/repositories
Request samples
application/json
{
  • "accountIdentifier": "string",
  • "projectIdentifier": "string",
  • "orgIdentifier": "string",
  • "agentIdentifier": "string",
  • "identifier": "string",
  • "searchTerm": "string",
  • "pageSize": 0,
  • "pageIndex": 0,
  • "filter": { },
  • "repoCredsId": "string"
}
Response samples
application/json
{
  • "content": [
    ],
  • "totalPages": 0,
  • "totalItems": 0,
  • "pageItemCount": 0,
  • "pageSize": 0,
  • "pageIndex": 0,
  • "empty": true
}

ListApps returns list of apps in the repo

ListApps returns list of apps in the repo.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

query.repo
string
query.revision
string
query.appName
string
query.appProject
string
Responses
200

A successful response.

default

An unexpected error response.

get/gitops/api/v1/agents/{agentIdentifier}/repositories/{identifier}/apps
Request samples
Response samples
application/json
{
  • "items": [
    ]
}

ListRepositories gets a list of all configured repositories

ListRepositories gets a list of all configured repositories.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
string
query.repo
string

Repo URL for query.

query.forceRefresh
boolean

Whether to force a cache refresh on repo's connection state.

query.project
string

The associated project project.

Responses
200

A successful response.

default

An unexpected error response.

get/gitops/api/v1/agents/{agentIdentifier}/repositories
Request samples
Response samples
application/json
{
  • "metadata": {
    },
  • "items": [
    ]
}

Returns a list of refs (e.g. branches and tags) in the repo

Returns a list of refs (e.g. branches and tags) in the repo.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

query.repo
string

Repo URL for query.

query.forceRefresh
boolean

Whether to force a cache refresh on repo's connection state.

query.project
string

The associated project project.

Responses
200

A successful response.

default

An unexpected error response.

get/gitops/api/v1/agents/{agentIdentifier}/repositories/{identifier}/refs
Request samples
Response samples
application/json
{
  • "branches": [
    ],
  • "tags": [
    ]
}

UpdateRepository updates a repository configuration

UpdateRepository updates a repository configuration.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

identifier
required
string
query Parameters
accountIdentifier
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema: application/json
object (Repository is a repository holding application configurations)
object (`FieldMask` represents a set of symbolic field paths, for example:)

paths: "f.a" paths: "f.b.d"

Here f represents a field in some root message, a and b fields in the message found in f, and d a field found in the message in f.b.

Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below).

Field Masks in Projections

When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows:

f {
  a : 22
  b {
    d : 1
    x : 2
  }
  y : 13
}
z: 8

The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output):

f {
  a : 22
  b {
    d : 1
  }
}

A repeated field is not allowed except at the last position of a paths string.

If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified).

Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs.

Field Masks in Update Operations

A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask.

If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a paths string.

If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource.

For example, given the target message:

f {
  b {
    d: 1
    x: 2
  }
  c: [1]
}

And an update message:

f {
  b {
    d: 10
  }
  c: [2]
}

then if the field mask is:

paths: ["f.b", "f.c"]

then the result will be:

f {
  b {
    d: 10
    x: 2
  }
  c: [1, 2]
}

An implementation may provide options to override this default behavior for repeated and message fields.

In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below.

If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not.

As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API.

Considerations for HTTP REST

The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates).

JSON Encoding of Field Masks

In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions.

As an example, consider the following message declarations:

message Profile {
  User user = 1;
  Photo photo = 2;
}
message User {
  string display_name = 1;
  string address = 2;
}

In proto a field mask for Profile may look as such:

mask {
  paths: "user.display_name"
  paths: "photo"
}

In JSON, the same mask is represented as below:

{
  mask: "user.displayName,photo"
}

Field Masks and Oneof Fields

Field masks treat fields in oneofs just as regular fields. Consider the following message:

message SampleMessage {
  oneof test_oneof {
    string name = 4;
    SubMessage sub_message = 9;
  }
}

The field mask can be:

mask {
  paths: "name"
}

Or:

mask {
  paths: "sub_message"
}

Note that oneof type names ("test_oneof" in this case) cannot be used in paths.

Field Mask Verification

The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an INVALID_ARGUMENT error if any path is unmappable.

Responses
200

A successful response.

default

An unexpected error response.

put/gitops/api/v1/agents/{agentIdentifier}/repositories/{identifier}
Request samples
application/json
{
  • "repo": {
    },
  • "updateMask": {
    }
}
Response samples
application/json
{
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "agentIdentifier": "string",
  • "identifier": "string",
  • "repository": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "lastModifiedAt": "2019-08-24T14:15:22Z",
  • "stale": true,
  • "repositoryCredentialsId": "string"
}

ValidateAccess gets connection state for a repository

ValidateAccess gets connection state for a repository.

SecurityApiKey
Request
path Parameters
agentIdentifier
required
string

Agent identifier for entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
string
Request Body schema: application/json
repo
string (The URL to the repo)
username
string (Username for accessing repo)
password
string (Password for accessing repo)
sshPrivateKey
string (Private key data for accessing SSH repository)
insecure
boolean (Whether to skip certificate or host key validation)
tlsClientCertData
string (TLS client cert data for accessing HTTPS repository)
tlsClientCertKey
string (TLS client cert key for accessing HTTPS repository)
type
string (The type of the repo)
name
string (The name of the repo)
enableOci
boolean (Whether helm-oci support should be enabled for this repo)
githubAppPrivateKey
string (Github App Private Key PEM data)
githubAppID
string <int64> (Github App ID of the app used to access the repo)
githubAppInstallationID
string <int64> (Github App Installation ID of the installed GitHub App)
githubAppEnterpriseBaseUrl
string (Github App Enterprise base url if empty will default to https://api.github.com)
proxy
string (HTTP/HTTPS proxy to access the repository)
project
string (Reference between project and repository that allow you automatically to be added as item inside SourceRepos project entity)
Responses
200

A successful response.

default

An unexpected error response.

post/gitops/api/v1/agents/{agentIdentifier}/repositories/validate
Request samples
application/json
{
  • "repo": "string",
  • "username": "string",
  • "password": "string",
  • "sshPrivateKey": "string",
  • "insecure": true,
  • "tlsClientCertData": "string",
  • "tlsClientCertKey": "string",
  • "type": "string",
  • "name": "string",
  • "enableOci": true,
  • "githubAppPrivateKey": "string",
  • "githubAppID": "string",
  • "githubAppInstallationID": "string",
  • "githubAppEnterpriseBaseUrl": "string",
  • "proxy": "string",
  • "project": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "message": "string",
  • "attemptedAt": {
    }
}