Skip to main content

updateRoute

plugin.projectStructure.updateRoute(packageId: string, routeId: string, updates: Partial<ApiRoute>, workspacePath?: string): Promise<ProjectStructureUpdateResponse>

Update an API route

Parameters

ParameterTypeRequiredDescription
packageIdstringYes
routeIdstringYes
updatesPartial<ApiRoute>Yes
workspacePathstringNo

Returns

Promise<ProjectStructureUpdateResponse>

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.projectStructure.updateRoute('packageId', 'routeId', /* Partial<ApiRoute> */);
console.log(result);