Skip to main content

kobana kadu sources

Commands of kobana kadu sources. Every global option (Global options) applies here.

CommandHTTPDescription
sources listGET /v1/sourcesList source repositories
sources createPOST /v1/sourcesRegister a source repository
sources getGET /v1/sources/{id}Get a source repository
sources updatePATCH /v1/sources/{id}Update a source repository
sources deleteDELETE /v1/sources/{id}Delete a source repository (soft delete)
sources checkPOST /v1/sources/{id}/checkCheck access to the repository

sources list​

List source repositories

kobana kadu sources list [OPTIONS]

GET /v1/sources

Query parameters

NameTypeRequiredDescription
cursorstringno
limitnumberno
sort_bystringnoField in snake_case: created_at (default), updated_at or a filterable field.
sort_orderstringnoDefault: desc. Values: asc, desc.

Responses

HTTPDescription
200OK
503AS_UNAVAILABLE — token verification is unavailable (Authorization Server down or configuration missing). Try again (Retry-After).

sources create​

Register a source repository

kobana kadu sources create [OPTIONS]

POST /v1/sources

If the organization's GitHub App installation covers the repository, access is checked right away. Otherwise the response carries the deploy key to add on GitHub before checking access.

Request body

NameTypeRequiredDescription
namestringyes
repositorystringyesowner/repo or the repository URL on GitHub.
refstringnoBranch or tag; null = the default branch.
labelstringno
workspace_idstring (uuid)no
custom_metadataobjectno

More fields and nested objects: kobana schema kadu.sources.create.

Responses

HTTPDescription
201created
400VALIDATION_ERROR
409CONFLICT — a live repository with this name already exists / IDEMPOTENCY_KEY_REUSED
422VALIDATION_ERROR — invalid repository, ref or workspace
503GITHUB_UNAVAILABLE — GitHub did not respond

sources get​

Get a source repository

kobana kadu sources get [ID] [OPTIONS]

GET /v1/sources/{id}

Path arguments: id

Responses

HTTPDescription
200OK
404not found
503AS_UNAVAILABLE — token verification is unavailable (Authorization Server down or configuration missing). Try again (Retry-After).

sources update​

Update a source repository

kobana kadu sources update [ID] [OPTIONS]

PATCH /v1/sources/{id}

Name and repository do not change: skills reference the name and the deploy key belongs to the repository. Changing the ref resets the access check.

Path arguments: id

Request body

NameTypeRequiredDescription
refstringnoBranch or tag; null = the default branch.
labelstringno
workspace_idstring (uuid)no
custom_metadataobjectno

More fields and nested objects: kobana schema kadu.sources.update.

Responses

HTTPDescription
200OK
404NOT_FOUND
409IDEMPOTENCY_KEY_REUSED
422VALIDATION_ERROR — invalid ref or workspace
503AS_UNAVAILABLE — token verification is unavailable (Authorization Server down or configuration missing). Try again (Retry-After).

sources delete​

Delete a source repository (soft delete)

kobana kadu sources delete [ID] [OPTIONS]

DELETE /v1/sources/{id}

Tasks that declare it fail on their next run. Refused while the kadu.yaml declares the repository.

Path arguments: id

Responses

HTTPDescription
200OK
404NOT_FOUND
409REPO_MANAGED — declared in the kadu.yaml
503AS_UNAVAILABLE — token verification is unavailable (Authorization Server down or configuration missing). Try again (Retry-After).

sources check​

Check access to the repository

kobana kadu sources check [ID] [OPTIONS]

POST /v1/sources/{id}/check

Lists the ref on GitHub with the repository's credential, without cloning, and records the result. Missing access is not an HTTP error: it comes in access_status and last_check_error.

Path arguments: id

Responses

HTTPDescription
200OK
404NOT_FOUND
503AS_UNAVAILABLE — token verification is unavailable (Authorization Server down or configuration missing). Try again (Retry-After).