Complete API reference for the Kubiya Sources service methods and classes
Property | Type | Description |
---|---|---|
inline | _InlineService | Sub-service for managing inline tools |
list(full: bool = False, debug: bool = False, fetch_metadata: bool = False, max_concurrent: int = 10) -> List[Dict[str, Any]]
full
(bool
): Fetch full metadata for each source (default: False)debug
(bool
): Enable debug output during metadata fetching (default: False)fetch_metadata
(bool
): Whether to fetch metadata for sources (default: False)max_concurrent
(int
): Maximum concurrent metadata requests (default: 10)List[Dict[str, Any]]
: List of source objectsscan(source_url: str, dynamic_config: Optional[Dict[str, Any]] = None, runner: Optional[str] = None, local: bool = False, local_only: bool = False) -> Dict[str, Any]
source_url
(str
): URL or path to scan for toolsdynamic_config
(Optional[Dict[str, Any]]
): Dynamic configuration for the sourcerunner
(Optional[str]
): Runner name to use for scanninglocal
(bool
): Whether this is a local directory scan (default: False)local_only
(bool
): Force local-only scanning, bypass Git (default: False)Dict[str, Any]
: Dictionary containing discovered tools and source informationSourceError
: If scanning failsadd(source_url: str = "", name: Optional[str] = None, dynamic_config_file: Optional[str] = None, inline_file: Optional[str] = None, inline_tools: Optional[List[Dict[str, Any]]] = None, runner: Optional[str] = None) -> Dict[str, Any]
source_url
(str
): Source URL (empty for inline sources) (default: "")name
(Optional[str]
): Source namedynamic_config_file
(Optional[str]
): Path to JSON configuration fileinline_file
(Optional[str]
): Path to file containing inline tool definitions (YAML or JSON)inline_tools
(Optional[List[Dict[str, Any]]]
): List of inline tools (alternative to inline_file)runner
(Optional[str]
): Runner name for the sourceDict[str, Any]
: Created source informationSourceError
: If source creation failsdescribe(uuid: str, output: str = "text") -> Union[Dict[str, Any], str]
uuid
(str
): Source UUIDoutput
(str
): Output format (“text” or “json”) (default: “text”)Union[Dict[str, Any], str]
: Source metadata in requested formatSourceNotFoundError
: If source is not founddelete(uuid: str, runner: Optional[str] = None) -> Dict[str, Any]
uuid
(str
): UUID of the source to deleterunner
(Optional[str]
): Optional runner name to use for deletionDict[str, Any]
: Dictionary with result statusSourceError
: If deletion failssync(uuid: str, mode: str = "interactive", branch: str = "", force: bool = False, auto_commit: bool = False, no_diff: bool = False, runner: Optional[str] = None) -> Dict[str, Any]
uuid
(str
): Source UUID to syncmode
(str
): Sync mode (“interactive” or other modes) (default: “interactive”)branch
(str
): Git branch to sync (default: "")force
(bool
): Force sync even with conflicts (default: False)auto_commit
(bool
): Automatically commit changes (default: False)no_diff
(bool
): Skip diff generation (default: False)runner
(Optional[str]
): Runner name to use for syncDict[str, Any]
: Sync operation resultSourceError
: If sync failsupdate(uuid: str, name: str = "", config: Optional[str] = None, inline: Optional[str] = None, inline_stdin: bool = False, runner: Optional[str] = None) -> Dict[str, Any]
uuid
(str
): Source UUID to updatename
(str
): New source name (default: "")config
(Optional[str]
): Path to JSON configuration fileinline
(Optional[str]
): Path to file with inline tool definitionsinline_stdin
(bool
): Read inline tools from stdin (default: False)runner
(Optional[str]
): New runner nameDict[str, Any]
: Updated source informationSourceError
: If update failsSourceNotFoundError
: If source is not founddebug(uuid: str, full: bool = False, output: str = "text", raw: bool = False) -> Union[Dict[str, Any], str]
uuid
(str
): Source UUID to debugfull
(bool
): Enable full debugging with detailed information (default: False)output
(str
): Output format (“text” or “json”) (default: “text”)raw
(bool
): Show raw API response (default: False)Union[Dict[str, Any], str]
: Debug information in requested formatSourceError
: If debug operation failsadd(source_uuid: str, file: Optional[str] = None, url: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, type: str = "docker", image: Optional[str] = None, content: Optional[str] = None, arg: Optional[List[str]] = None, env: Optional[List[str]] = None, editor: bool = False) -> Dict[str, Any]
source_uuid
(str
): UUID of the source to add tool tofile
(Optional[str]
): Path to tool definition fileurl
(Optional[str]
): URL to tool definitionname
(Optional[str]
): Tool namedescription
(Optional[str]
): Tool descriptiontype
(str
): Tool type (default: “docker”)image
(Optional[str]
): Docker image for the toolcontent
(Optional[str]
): Tool script contentarg
(Optional[List[str]]
): Tool arguments in format “name:type:description:required”env
(Optional[List[str]]
): Environment variableseditor
(bool
): Use editor for tool creation (not supported in service context)Dict[str, Any]
: Updated source with new toolSourceError
: If tool addition failsSourceNotFoundError
: If source is not foundSourceValidationError
: If tool validation failsdelete(source_uuid: str, tool_name: str) -> Dict[str, Any]
source_uuid
(str
): UUID of the sourcetool_name
(str
): Name of the tool to deleteDict[str, Any]
: Updated source without the deleted toolSourceError
: If deletion failsSourceNotFoundError
: If source is not foundSourceValidationError
: If tool is not foundupdate(source_uuid: str, tool_name: str, file: Optional[str] = None, url: Optional[str] = None) -> Dict[str, Any]
source_uuid
(str
): UUID of the sourcetool_name
(str
): Name of the tool to updatefile
(Optional[str]
): Path to updated tool definition fileurl
(Optional[str]
): URL to updated tool definitionDict[str, Any]
: Updated source with modified toolSourceError
: If update failsSourceNotFoundError
: If source is not foundSourceValidationError
: If tool is not found or validation failslist(source_uuid: str) -> Union[List[Dict[str, Any]], str]
source_uuid
(str
): UUID of the sourceUnion[List[Dict[str, Any]], str]
: List of inline toolsSourceError
: If listing fails