Concord projects have one or multiple associated repositories. The repository
API supports
a number of operations on the project specific repositories:
A new repository can be created with a POST request and the required parameters.
/api/v1/org/{orgName}/project/{projectName}/repository
POST
Authorization
, Content-Type: application/json
{
"name": "...",
"url": "...",
"branch": "...",
"commitId": "...",
"path": "...",
"secretId": "..."
}
Content-Type: application/json
{
"result": "CREATED",
"ok": true
}
An existing repository can be updated with a POST request and the changed parameters.
/api/v1/org/{orgName}/project/{projectName}/repository
POST
Authorization
, Content-Type: application/json
{
"id": "...",
"name": "...",
"url": "...",
"branch": "...",
"commitId": "...",
"path": "...",
"secretId": "..."
}
Content-Type: application/json
{
"result" : "UPDATED",
"ok" : true
}
A DELETE request can be used to removes a repository.
/api/v1/org/{orgName}/project/{projectName}/repository/{repositoryName}
DELETE
Authorization
Content-Type: application/json
{
"result": "DELETED",
"ok": true
}
A HTTP POST request can be used to validate a Concord repository. Specifically this action causes the Concord YML file to be parsed and validated with regards to syntax and any defined policies.
/api/v1/org/{orgName}/project/{projectName}/repository/{repositoryName}/validate
POST
Authorization
Content-Type: application/json
{
"result": "VALIDATED",
"ok": true
}
An existing repository can be refreshed with a POST request. This causes the clone of the git repository stored within Concord to be updated. As a consequence the Concord YML file is parsed again and any changes to triggers and other configurations are updated.
/api/v1/org/{orgName}/project/{projectName}/repository/{repositoryName}/refresh
POST
Authorization
Content-Type: application/json
{
"result": "UPDATED",
"ok": true
}