Kubiya LogoKubiya Developer Docs

Sources API

API endpoints for managing tool sources in the Kubiya platform

Sources API

Sources in Kubiya are collections of tools that can be attached to teammates. Sources can be Git repositories, directories, or other tool collections. The Sources API allows you to create, discover, synchronize, and manage sources.

This playground makes API calls to Kubiya API through a secure server-side proxy. Your requests never expose your API token directly to the browser.

Endpoints

MethodPathDescription
GET/api/v1/sourcesList all sources
GET/api/v1/sources/{sourceId}Get source by ID
GET/api/v1/sources/{sourceId}/metadataGet source metadata
GET/api/v1/sources/loadDiscover/load a source (GET)
POST/api/v1/sourcesCreate a new source
PUT/api/v1/sources/{sourceId}Sync a source
DELETE/api/v1/sources/{sourceId}Delete a source
GET/api/v1/sources/agent_sources/{sourceId}Get agent sources
PUT/api/v1/sources/zip/loadLoad a zipped source
PUT/api/v1/sources/zipCreate a zipped source
PUT/api/v1/sources/zip/sync/{sourceId}Sync a zipped source

List All Sources

GET /api/v1/sources

Headers

NameRequiredDescription
AuthorizationYesUserKey YOUR_API_KEY

Response

[
  {
    "uuid": "source-id-456",
    "name": "AWS Tools",
    "url": "https://github.com/org/aws-tools"
  }
]

Get Source by ID

GET /api/v1/sources/{sourceId}

Path Parameters

NameTypeRequiredDescription
sourceIdstringYesID of the source to retrieve

Headers

NameRequiredDescription
AuthorizationYesUserKey YOUR_API_KEY

Response

{
  "uuid": "source-id-456",
  "name": "AWS Tools",
  "url": "https://github.com/org/aws-tools"
}

Get Source Metadata

GET /api/v1/sources/{sourceId}/metadata

Response

{
  "uuid": "source-id-456",
  "metadata": { "key": "value" }
}

Discover/Load a Source

GET /api/v1/sources/load?url={source_url}
POST /api/v1/sources/load?url={source_url}

Response

{
  "uuid": "source-id-456",
  "name": "AWS Tools",
  "url": "https://github.com/org/aws-tools"
}

Create a Source

POST /api/v1/sources

Headers

NameRequiredDescription
AuthorizationYesUserKey YOUR_API_KEY
Content-TypeYesapplication/json

Request Body

{
  "name": "AWS Tools",
  "url": "https://github.com/org/aws-tools",
  "branch": "main",
  "runner": "docker"
}

Response

{
  "uuid": "source-id-456",
  "name": "AWS Tools",
  "url": "https://github.com/org/aws-tools"
}

Sync a Source

PUT /api/v1/sources/{sourceId}

Request Body

{
  "mode": "pull",
  "branch": "main",
  "force": false
}

Response

{
  "uuid": "source-id-456",
  "name": "AWS Tools",
  "url": "https://github.com/org/aws-tools"
}

Delete a Source

DELETE /api/v1/sources/{sourceId}

Response

A successful delete operation returns HTTP 200 with no body.

Get Agent Sources

GET /api/v1/sources/agent_sources/{sourceId}

Response

[
  {
    "uuid": "source-id-456",
    "name": "AWS Tools"
  }
]

Zip Endpoints

Load a Zipped Source

PUT /api/v1/sources/zip/load

Create a Zipped Source

PUT /api/v1/sources/zip

Sync a Zipped Source

PUT /api/v1/sources/zip/sync/{sourceId}

Deprecated/Legacy Endpoints: The following endpoints were present in previous documentation but are not in the current Go implementation. They may be deprecated or handled elsewhere:

  • GET /v1/sources/{source_id}/tools