From 41928f9a70a44197df8417f1d15966a5ca16d4b6 Mon Sep 17 00:00:00 2001 From: Helen Lin Date: Wed, 18 Dec 2024 11:35:07 -0800 Subject: [PATCH] docs: add validate example in User Guide --- docs/source/UserGuide.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/UserGuide.rst b/docs/source/UserGuide.rst index be4bc7b..7cd6b0c 100644 --- a/docs/source/UserGuide.rst +++ b/docs/source/UserGuide.rst @@ -151,6 +151,10 @@ endpoint: ) post_request_content = json.loads(submit_request.model_dump_json(exclude_none=True)) + # Optionally validate the submit_request before submitting + validate_job_response = requests.post(url="http://aind-data-transfer-service/api/v1/models/SubmitJobRequest/validate", json=post_request_content) + print(submit_job_response.status_code) + print(submit_job_response.json()) # Uncomment the following to submit the request # submit_job_response = requests.post(url="http://aind-data-transfer-service/api/v1/submit_jobs", json=post_request_content) # print(submit_job_response.status_code)