Code Repository API v0.3.1
License: Apache License 2.0
# Authentication
- HTTP Authentication, scheme: Bearer
CodeRepo
# ListCodeRepos
GET /api/v1/products/{product_name}/coderepos
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
product_name | path | string | true | To list the product name of the repository. |
field_selector | query | string | false | Filter the list by field. eg: field_selector=project=project1,pipeline_runtime=true,deployment_runtime=false Field Support: project: fuzzy match pipeline_runtime: exact match deployment_runtime: exact match |
Example responses
200 Response
{
"items": [
{
"product": "string",
"name": "string",
"project": "string",
"webhook": {
"events": [
"string"
]
},
"deployment_runtime": true,
"pipeline_runtime": true,
"git": {
"gitlab": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
},
"github": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
}
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens new window) | OK | api.coderepo.v1.ListsReply |
# GetCodeRepo
GET /api/v1/products/{product_name}/coderepos/{coderepo_name}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
product_name | path | string | true | none |
coderepo_name | path | string | true | none |
Example responses
200 Response
{
"product": "string",
"name": "string",
"project": "string",
"webhook": {
"events": [
"string"
]
},
"deployment_runtime": true,
"pipeline_runtime": true,
"git": {
"gitlab": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
},
"github": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens new window) | OK | api.coderepo.v1.GetReply |
# SaveCodeRepo
POST /api/v1/products/{product_name}/coderepos/{coderepo_name}
Body parameter
{
"project": "string",
"webhook": {
"events": [
"string"
]
},
"deployment_runtime": true,
"pipeline_runtime": true,
"git": {
"gitlab": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string"
},
"github": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string"
}
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
product_name | path | string | true | none |
coderepo_name | path | string | true | none |
insecure_skip_check | query | boolean | false | none |
body | body | api.coderepo.v1.SaveRequest_Body | true | none |
Example responses
200 Response
{
"message": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens new window) | OK | api.coderepo.v1.SaveReply |
# DeleteCodeRepo
DELETE /api/v1/products/{product_name}/coderepos/{coderepo_name}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
product_name | path | string | true | none |
coderepo_name | path | string | true | none |
insecure_skip_check | query | boolean | false | none |
Example responses
200 Response
{
"message": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens new window) | OK | api.coderepo.v1.DeleteReply |
# Schemas
api.coderepo.v1.DeleteReply
{
"message": "string"
}
Represents a response to a DeleteRequest message.
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | none |
api.coderepo.v1.GetReply
{
"product": "string",
"name": "string",
"project": "string",
"webhook": {
"events": [
"string"
]
},
"deployment_runtime": true,
"pipeline_runtime": true,
"git": {
"gitlab": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
},
"github": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
}
}
}
Define the GetReply message, which includes the product, name, project, webhook, DeploymentRuntime, PipelineRuntime, and GitProject fields.
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
product | string | false | none | none |
name | string | false | none | none |
project | string | false | none | none |
webhook | api.coderepo.v1.Webhook | false | none | Message representing a webhook |
deployment_runtime | boolean | false | none | none |
pipeline_runtime | boolean | false | none | none |
git | api.coderepo.v1.GitProject | false | none | Define the GitProject message, which includes the GitlabProject and GithubProject fields. |
api.coderepo.v1.Git
{
"gitlab": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string"
},
"github": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string"
}
}
Define the Git message, which includes the Gitlab and Github fields.
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
gitlab | api.coderepo.v1.Gitlab | false | none | Message representing a GitLab repository |
github | api.coderepo.v1.Github | false | none | Message representing a GitHub repository |
api.coderepo.v1.GitProject
{
"gitlab": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
},
"github": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
}
}
Define the GitProject message, which includes the GitlabProject and GithubProject fields.
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
gitlab | api.coderepo.v1.GitlabProject | false | none | Message representing a GitLab project |
github | api.coderepo.v1.GithubProject | false | none | Message representing a GitHub project |
api.coderepo.v1.Github
{
"name": "string",
"path": "string",
"visibility": "string",
"description": "string"
}
Message representing a GitHub repository
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the repository |
path | string | false | none | The path of the repository |
visibility | string | false | none | The visibility of the repository |
description | string | false | none | The description of the repository |
api.coderepo.v1.GithubProject
{
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
}
Message representing a GitHub project
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the project |
path | string | false | none | The path of the project |
visibility | string | false | none | The visibility of the project |
description | string | false | none | The description of the project |
ssh_url_to_repo | string | false | none | The SSH URL of the repository |
http_url_to_repo | string | false | none | The HTTP URL of the repository |
api.coderepo.v1.Gitlab
{
"name": "string",
"path": "string",
"visibility": "string",
"description": "string"
}
Message representing a GitLab repository
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the repository |
path | string | false | none | The path of the repository |
visibility | string | false | none | The visibility of the repository |
description | string | false | none | The description of the repository |
api.coderepo.v1.GitlabProject
{
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
}
Message representing a GitLab project
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the project |
path | string | false | none | The path of the project |
visibility | string | false | none | The visibility of the project |
description | string | false | none | The description of the project |
ssh_url_to_repo | string | false | none | The SSH URL of the repository |
http_url_to_repo | string | false | none | The HTTP URL of the repository |
api.coderepo.v1.ListsReply
{
"items": [
{
"product": "string",
"name": "string",
"project": "string",
"webhook": {
"events": [
"string"
]
},
"deployment_runtime": true,
"pipeline_runtime": true,
"git": {
"gitlab": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
},
"github": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string",
"ssh_url_to_repo": "string",
"http_url_to_repo": "string"
}
}
}
]
}
Define the ListsReply message, which includes the repeated items field.
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
items | [api.coderepo.v1.GetReply] | false | none | [Define the GetReply message, which includes the product, name, project, webhook, DeploymentRuntime, PipelineRuntime, and GitProject fields.] |
api.coderepo.v1.SaveReply
{
"message": "string"
}
Define the SaveReply message, which includes the msg field.
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | Msg is a message confirming the save. |
api.coderepo.v1.SaveRequest_Body
{
"project": "string",
"webhook": {
"events": [
"string"
]
},
"deployment_runtime": true,
"pipeline_runtime": true,
"git": {
"gitlab": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string"
},
"github": {
"name": "string",
"path": "string",
"visibility": "string",
"description": "string"
}
}
}
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
project | string | false | none | none |
webhook | api.coderepo.v1.Webhook | false | none | Message representing a webhook |
deployment_runtime | boolean | false | none | none |
pipeline_runtime | boolean | false | none | none |
git | api.coderepo.v1.Git | false | none | Define the Git message, which includes the Gitlab and Github fields. |
api.coderepo.v1.Webhook
{
"events": [
"string"
]
}
Message representing a webhook
# Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
events | [string] | false | none | The events that the webhook should trigger on |