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

[START A JOB USING API] - Improve the traceability of a Bad-request response #214

Open
adriaolomi opened this issue Oct 30, 2024 · 6 comments

Comments

@adriaolomi
Copy link

Feature Description:
Improve the traceability of a Bad-request response, by typing a more detailed error message, for example, retrieving the location of the error in the JSON body.

Use Case / Problem Description
When trying to fill the JSON, that will be the 'data' section of the Post request, I'm probably making a mistake. Even though, in the Swagger UI there is an accurate description of the fields and the datatypes that should be used in the request, when I'm testing it with my own values I get a 400 - Bad request response. Being the data 'section' so large, it becomes difficult to identify where is the problem.

Benefits
It would become easier to make an API request.

Related Issues
No.

Additional Information
Not needed.

@MartinHoffmannJena
Copy link
Collaborator

Hi,

Are you using the Python or R SDKs to submit your API call? These SDKs provide objects for starting a job, which would be the intended way to do this

@adriaolomi
Copy link
Author

adriaolomi commented Oct 31, 2024 via email

@MartinHoffmannJena
Copy link
Collaborator

Hi, Thanks for your fast reply. I'm using Python to make a request to the REST API. Attached, you’ll find the JSON I'm using as the request body, as well as an image of the response body that I receive. Best, Adrià

________________________________ De: Martin Hoffmann @.> Enviado: miércoles, 30 de octubre de 2024 18:53 Para: sirius-ms/sirius @.> Cc: Adrià Olomí Farré @.>; Author @.> Asunto: Re: [sirius-ms/sirius] [START A JOB USING API] - Improve the traceability of a Bad-request response (Issue #214) Hi, Are you using the Python or R SDKs to submit your API call? These SDKs provide objects for starting a job, which would be the intended way to do this — Reply to this email directly, view it on GitHub<#214 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP6FXIO4TRSSYNAFJGSRHS3Z6ETKBAVCNFSM6AAAAABQ4TTW4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBYGA4DOMZUGY. You are receiving this because you authored the thread.Message ID: @.***>

Hi, there are no attachments in your message

@adriaolomi
Copy link
Author

adriaolomi commented Oct 31, 2024 via email

@adriaolomi
Copy link
Author

body_section.json
Screenshot from 2024-10-31 08-46-15

@MartinHoffmannJena
Copy link
Collaborator

MartinHoffmannJena commented Oct 31, 2024

Hi,

My initial point was that there shouldnt be a need to manually create a JSON to submit a job. You can download the SIRIUS Python SDK from https://github.com/sirius-ms/sirius-client-openAPI/tree/master/client-api_python (or via conda) and then simply submit the Job using a JobSubmission Object (see https://github.com/sirius-ms/sirius-client-openAPI/blob/master/client-api_python/generated/docs/JobSubmission.md).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants