DeleteServiceBinding
Delete an ABAP service binding using the ADT Business Services endpoint. Specify the service binding name and an optional transport request.
Instructions
Delete ABAP service binding via ADT Business Services endpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service_binding_name | Yes | Service binding name to delete. | |
| transport_request | No | Optional transport request for deletion transport flow. | |
| response_format | No | xml |
Implementation Reference
- The main handler function that deletes an ABAP service binding via ADT Business Services endpoint. Accepts service_binding_name (required), transport_request (optional), and response_format (optional). Calls ADT client to perform the deletion and returns the formatted response.
export async function handleDeleteServiceBinding( context: HandlerContext, args: DeleteServiceBindingArgs, ) { const { connection, logger } = context; try { if (!args?.service_binding_name) { throw new Error('service_binding_name is required'); } const serviceBindingName = args.service_binding_name.trim().toUpperCase(); const responseFormat = args.response_format ?? 'xml'; const client = createAdtClient(connection, logger); const state = await client.getServiceBinding().delete({ bindingName: serviceBindingName, transportRequest: args.transport_request, }); const response = state?.deleteResult; if (!response) { throw new Error( `Delete did not return a response for service binding ${serviceBindingName}`, ); } return return_response({ data: JSON.stringify( { success: true, service_binding_name: serviceBindingName, response_format: responseFormat, status: response.status, payload: parseServiceBindingPayload(response.data, responseFormat), }, null, 2, ), status: response.status, statusText: response.statusText, headers: response.headers, config: response.config, }); } catch (error: any) { logger?.error('Error deleting service binding:', error); return return_error(error); } } - The TOOL_DEFINITION constant defining the 'DeleteServiceBinding' tool schema including name, description, inputSchema with properties (service_binding_name, transport_request, response_format), and availability for onprem and cloud.
export const TOOL_DEFINITION = { name: 'DeleteServiceBinding', available_in: ['onprem', 'cloud'] as const, description: 'Delete ABAP service binding via ADT Business Services endpoint.', inputSchema: { type: 'object', properties: { service_binding_name: { type: 'string', description: 'Service binding name to delete.', }, transport_request: { type: 'string', description: 'Optional transport request for deletion transport flow.', }, response_format: { type: 'string', enum: ['xml', 'json', 'plain'], default: 'xml', }, }, required: ['service_binding_name'], }, } as const; - src/lib/handlers/groups/HighLevelHandlersGroup.ts:757-760 (registration)Registration of the DeleteServiceBinding tool in the HighLevelHandlersGroup, mapping its toolDefinition (DeleteServiceBinding_Tool) to the handler (withContext(handleDeleteServiceBinding)).
{ toolDefinition: DeleteServiceBinding_Tool, handler: withContext(handleDeleteServiceBinding), }, - The DeleteServiceBindingArgs TypeScript interface defining the argument types for the handler.
interface DeleteServiceBindingArgs { service_binding_name: string; transport_request?: string; response_format?: ServiceBindingResponseFormat; } - src/handlers/compact/high/compactRouter.ts:146-151 (registration)Registration of handleDeleteServiceBinding as a compact router handler under SERVICE_BINDING.delete.
SERVICE_BINDING: { create: handleCreateServiceBinding as unknown as CompactHandler, get: handleGetServiceBinding as unknown as CompactHandler, update: handleUpdateServiceBinding as unknown as CompactHandler, delete: handleDeleteServiceBinding as unknown as CompactHandler, },