Open adriaolomi opened 2 weeks ago
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
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 GitHubhttps://github.com/sirius-ms/sirius/issues/214#issuecomment-2448087346, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP6FXIO4TRSSYNAFJGSRHS3Z6ETKBAVCNFSM6AAAAABQ4TTW4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBYGA4DOMZUGY. You are receiving this because you authored the thread.Message ID: @.***>
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
Hi,
I'm sorry, I replied by mail and seems the files are not well attached . I will do it again now by using GitHub.
Thanks! Adrià
De: Martin Hoffmann @.> Enviado: jueves, 31 de octubre de 2024 8:50 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, 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 #214https://github.com/sirius-ms/sirius/issues/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)https://github.com/sirius-ms/sirius/issues/214#issuecomment-2448087346>, 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
— Reply to this email directly, view it on GitHubhttps://github.com/sirius-ms/sirius/issues/214#issuecomment-2449342347, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP6FXIICKMD5YCAU4B5W4VDZ6HVMVAVCNFSM6AAAAABQ4TTW4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBZGM2DEMZUG4. You are receiving this because you authored the thread.Message ID: @.***>
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).
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.