Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: endpoint to validate json #187

Merged
merged 11 commits into from
Dec 18, 2024
Prev Previous commit
Next Next commit
docs: add validate example in User Guide
helen-m-lin committed Dec 18, 2024
commit 41928f9a70a44197df8417f1d15966a5ca16d4b6
4 changes: 4 additions & 0 deletions docs/source/UserGuide.rst
Original file line number Diff line number Diff line change
@@ -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)