pipeworks_mud_mapper.services.api_db_service

SQLite storage for remote API services and commands.

This module manages a separate SQLite database used to store remote API service definitions and reusable commands that can be executed from the UI.

Functions

list_services([db_path, include_disabled])

Return API services.

get_service(service_id[, db_path])

Return a single API service.

create_service(name, base_url, *[, auth_type, ...])

Create a new API service and return its ID.

update_service(service_id, *, name, base_url[, ...])

Update an existing API service.

delete_service(service_id[, db_path])

Delete an API service and cascade its commands.

list_commands([service_id, db_path])

Return commands for a service (or all commands when service_id is None).

get_command(command_id[, db_path])

Return a single command.

create_command(service_id, name, method, path, *[, ...])

Create a new API command and return its ID.

update_command(command_id, *, service_id, name, ...[, ...])

Update an existing API command.

delete_command(command_id[, db_path])

Delete a command.

Module Contents

pipeworks_mud_mapper.services.api_db_service.list_services(db_path=None, *, include_disabled=True)[source]

Return API services.

pipeworks_mud_mapper.services.api_db_service.get_service(service_id, db_path=None)[source]

Return a single API service.

pipeworks_mud_mapper.services.api_db_service.create_service(name, base_url, *, auth_type='none', auth_secret=None, default_headers=None, enabled=True, notes=None, db_path=None)[source]

Create a new API service and return its ID.

pipeworks_mud_mapper.services.api_db_service.update_service(service_id, *, name, base_url, auth_type='none', auth_secret=None, default_headers=None, enabled=True, notes=None, db_path=None)[source]

Update an existing API service.

pipeworks_mud_mapper.services.api_db_service.delete_service(service_id, db_path=None)[source]

Delete an API service and cascade its commands.

pipeworks_mud_mapper.services.api_db_service.list_commands(service_id=None, db_path=None)[source]

Return commands for a service (or all commands when service_id is None).

pipeworks_mud_mapper.services.api_db_service.get_command(command_id, db_path=None)[source]

Return a single command.

pipeworks_mud_mapper.services.api_db_service.create_command(service_id, name, method, path, *, query=None, headers=None, body=None, timeout_seconds=None, db_path=None)[source]

Create a new API command and return its ID.

pipeworks_mud_mapper.services.api_db_service.update_command(command_id, *, service_id, name, method, path, query=None, headers=None, body=None, timeout_seconds=None, db_path=None)[source]

Update an existing API command.

pipeworks_mud_mapper.services.api_db_service.delete_command(command_id, db_path=None)[source]

Delete a command.