diff --git a/covalent/_dispatcher_plugins/local.py b/covalent/_dispatcher_plugins/local.py index a6d7a030b..ba1bdc557 100644 --- a/covalent/_dispatcher_plugins/local.py +++ b/covalent/_dispatcher_plugins/local.py @@ -583,7 +583,7 @@ def register_manifest( endpoint = API_ENTRYPOINT if parent_dispatch_id: - endpoint = f"{API_ENTRYPOINT}/{parent_dispatch_id}/subdispatches" + endpoint = f"{API_ENTRYPOINT}/{parent_dispatch_id}/sublattices" r = APIClient(dispatcher_addr).post(endpoint, data=stripped.model_dump_json()) r.raise_for_status() diff --git a/covalent_dispatcher/_service/app.py b/covalent_dispatcher/_service/app.py index 9a9c7d460..03e71186d 100644 --- a/covalent_dispatcher/_service/app.py +++ b/covalent_dispatcher/_service/app.py @@ -191,7 +191,7 @@ async def register(manifest: ResultSchema) -> ResultSchema: ) from e -@router.post("/dispatches/{dispatch_id}/subdispatches", status_code=201) +@router.post("/dispatches/{dispatch_id}/sublattices", status_code=201) async def register_subdispatch( manifest: ResultSchema, dispatch_id: str, diff --git a/tests/covalent_dispatcher_tests/_service/app_test.py b/tests/covalent_dispatcher_tests/_service/app_test.py index 7877fe673..4615e35c5 100644 --- a/tests/covalent_dispatcher_tests/_service/app_test.py +++ b/tests/covalent_dispatcher_tests/_service/app_test.py @@ -206,7 +206,7 @@ def test_register_sublattice(mocker, app, client, mock_manifest): ) mocker.patch("covalent_dispatcher._service.app.cancel_all_with_status") resp = client.post( - "/api/v2/dispatches/parent_dispatch/subdispatches", + "/api/v2/dispatches/parent_dispatch/sublattices", data=mock_manifest.json(), )