Using python SDK with Looker API.
Want to create new project in looker where I have an admin and developer role.
When I tried creating folder, it worked but I have SDK error when creating project.
it says:
Looker Not Found (404)
and bunch of html which says:
Looker is unavailable. If you typed in a URL, double-check the spelling. This may also be due to a temporary condition such as an outage, scheduled maintenance or upgrade.
I have an looker.ini:
api_version=4.0
base_url=https://<hostname>.looker.com
client_id=client_id
client_secret=client_secret
verify_ssl=True
also tried base URL with 443, but getting the same error. as I checked in documentation 404 error in looker might be because of a permission.
python code:
sdk = looker_sdk.init40()
sdk.create_project(body=mdls.WriteProject(name="test_project"))
Anyone has an idea what is the problem and how to fix it?
the same error on create_connection method
@nino I’m having a similar issue. How did you import “mdls”?
I'm having the same problem, the documentation doesn't really help, the 404 error message does not help, and I have not been able to find an example anywhere on the web of someone creating a project.
Note: creating a project also fails using the API Explorer and specifying a project name with the same 404 error, is there a missing required field? who knows
edit - so I was able to create the project by calling update_session first:
sdk_target.update_session(models40.WriteApiSession(workspace_id = 'dev'))
sdk_target.create_project(models40.WriteProject(name='test_name_here'))
but now I'm trying to update the project after creating it and I hit another brick wall with a 404 error.
What update to the project are you making?
I was trying to duplicate a project from one instance in another one and simply writing the project object and updating, it was failing with a 404 error, eventually I was able to update it by going step by step in a specific order of operations and not everything in one go.
It was very clunky navigating the documentation to figure out what was going on behind the scenes.
Are there any examples of duplicating one project in a different instance that goes step by step for all possible configuration options?
One setting I can't find in the API is "
@ogarza wrote:
eventually I was able to update it by going step by step in a specific order of operations and not everything in one go.
Did you look at the docs here https://developers.looker.com/api/explorer/4.0/methods/Project/create_project and here https://developers.looker.com/api/explorer/4.0/methods/Project/update_project?
In particular, the git config has to work at the time it is set. So in most cases you need to do the following steps:
I'm looking into the "Require data tests to pass" question.
Thanks a lot, I was able to re-create the projects using the order you specify and I think the require data tests to pass is the only setting that is pending
@nino2 Can you create the project using API explore? While trying just provide the name
Regards,
Prabha Arivalagan