Skip to content

Spindle

Served by spindle at https://<spindle host>/xrpc/<method>.

POST. Approve blocked pipeline.

Input:

  • repo (string, did, required): git repository DID
  • pipeline (string, record-key, required): pipeline id

Errors:

  • PipelineNotFound: Pipeline not found
  • PipelineNotBlocked: Pipeline has no workflow waiting for approval

GET.

Params:

  • repo (string, did, required)
  • workflow (string, required)

Output:

  • workflow (org.tangled.ci.workflow, required)

Errors:

  • InvalidRequest: Invalid request parameters
  • RepoNotFound: Repository not found
  • WorkflowNotFound: Workflow not found

GET.

Params:

  • repo (string, did, required)
  • ref (string, default "HEAD")

Output:

  • workflows (array of org.tangled.ci.workflow, required)

Errors:

  • InvalidRequest: Invalid request parameters
  • RepoNotFound: Repository not found
  • RefNotFound: No branch or tag of the repository has this name

POST. Duplicate existing pipeline for rerun.

Input:

  • repo (string, did, required): git repository DID
  • pipeline (string, record-key, required): pipeline id
  • workflows (array of string): Workflow names to filter. When not provided, entire pipeline will be duplicated.

Output:

  • pipeline (string, record-key, required): Scheduled pipeline id

Errors:

  • PipelineNotFound: Pipeline not found
  • PipelineNotRetryable: Pipeline is still blocked or has no stored spec to rerun

POST. notify an event from external source

Input:

  • repo (string, did, required): Repository DID
  • event (org.tangled.ci.trigger.manual or org.tangled.event.push, required): Tangled event object

Output:

  • pipeline (string): Spindle-local id of the scheduled pipeline
  • message (string): Text returned by the server for this push, like how to follow a started CI.

Errors:

  • InvalidRequest: Invalid request parameters

POST. Add a CI secret

Input:

  • repo (string, did, required)
  • key (string, required)
  • value (string, required)

Errors:

  • InvalidRequest: Invalid request parameters
  • RepoNotFound: Repository not found
  • SecretAlreadyExists: A secret with this key already exists.

GET.

Params:

  • repo (string, did, required)

Output:

  • secrets (array of secret, required)

Errors:

  • InvalidRequest: Invalid request parameters
  • RepoNotFound: Repository not found

POST. Remove a CI secret

Input:

  • repo (string, did, required)
  • key (string, required)

Errors:

  • InvalidRequest: Invalid request parameters
  • RepoNotFound: Repository not found
  • SecretNotFound: The requested secret does not exist.

POST. Create a new webhook for a repository.

Input:

  • repo (string, did, required): DID of the repository as minted by the knot.
  • url (string, uri, required): Endpoint URL that will receive webhook payloads.
  • active (boolean, default true): Whether the webhook should be active immediately.
  • events (array of org.tangled.webhook.defs#eventType, required): Event types to subscribe to.
  • secret (string): Optional HMAC secret used to sign payloads. If omitted, payloads are not signed.

Output:

  • id (string, required): ID of the newly created webhook.

Errors:

  • NoEventsSelected: At least one event type must be specified.

POST. Delete a webhook from a repository.

Input:

  • repo (string, did, required): DID of the repository as minted by the knot.
  • webhook (string, required): Webhook ID to delete.

Errors:

  • WebhookNotFound

GET. List recent delivery attempts for a webhook.

Params:

  • repo (string, did, required): DID of the repository as minted by the knot.
  • webhooks (array of string, required)
  • limit (integer, default 50, 1 to 100)

Output:

  • deliveries (array of org.tangled.webhook.defs#delivery, required)

GET. List webhooks configured for a repository.

Params:

  • repo (string, did, required): DID of the repository as minted by the knot.

Output:

  • webhooks (array of org.tangled.webhook.defs#webhook, required)

POST. Re-send a specific webhook delivery.

Input:

  • repo (string, did, required): DID of the repository as minted by the knot.
  • webhook (string, required): Webhook ID that owns the delivery.
  • delivery (string, required): Delivery ID to retry.

Errors:

  • WebhookNotFound
  • DeliveryNotFound

POST. Update an existing webhook. Only supplied fields are changed.

Input:

  • repo (string, did, required): DID of the repository as minted by the knot.
  • webhook (string, required): Webhook ID to update.
  • url (string, uri)
  • secret (string)
  • active (boolean)
  • events (array of org.tangled.webhook.defs#eventType)

Errors:

  • WebhookNotFound