-
Notifications
You must be signed in to change notification settings - Fork 984
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
cloud API POST /accounts/{accountId}/jobs requires all fields in the body (not just the ones that are marked as required in the docs) #451
Comments
@marselasulku Thanks for opening! It sounds like this is either an issue with the dbt Cloud API, or possibly our API documentation. I'm going to transfer this issue to the docs.getdbt.com repo, which is where we'd make that change. If this is causing immediate issues for you, I'd recommend sending a message to dbt Cloud support. |
@jtcohen6 I think this might be an issue with the API. I think the documentation is correct. For example, |
Hello, any updates on this? |
@jtcohen6 Has this been fixed? It appears that either the documentation is wrong or the API is broken. I wonder if the endpoint is repointing to the update job by id endpoint since the |
Hello, I got the solution of this and would like to share here. Here's the problem with the create job API is, its taking the "id" field as an input in body which is required field. We need to give value of job id in "id" field but we would not be able to get it in create API so we need to pass null as a value in "id" field for create API. NOTE: This required field i.e. "id" is not mentioned anywhere in dbt documentation in create job API. For reference -https://docs.getdbt.com/dbt-cloud/api/#operation/createJob Hope this helps ! |
Closing this issue as it looks fixed in the API docs. Thank you for opening it and raising the issue! |
Describe the bug
In order to successfully create a job via the API, I have to specify all of the fields (including the ones that are not marked as 'required' by the docs). In some cases this means supplying unnecessary information. For example, if I'm create a job that I only intend to trigger via the API, I still have to specify a
schedule
even though it won't be used.Steps To Reproduce
Make a
POST /accounts/{accountId}/jobs
request with the following body:these fields are the ones that are marked as 'required' by the docs
Expected behavior
Should create a job and respond with 200. Instead, it responds with:
Screenshots and log output
If applicable, add screenshots or log output to help explain your problem.
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
The output of
python --version
:Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: