-
Notifications
You must be signed in to change notification settings - Fork 1
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
Can't authenticate to prefect cloud #8
Comments
mahiki
added a commit
that referenced
this issue
Nov 27, 2023
Issue #8 prefect api now initializes key; tests pass
Closed by hans gruber pull request: #11 |
I'll copy some of the usage notes here that I added to the pull request: # NOTE: I rotated my api key after accidentally committing it here.
api = PrefectAPI("https://api.prefect.cloud/api/accounts/0e3aff3a-16ab-411f-baed-2982e4c82ebd/workspaces/0cd79ef6-aa52-43f7-8357-0f8dc0ff30ce", "pnu_OOOOOOOOPS");
b = ls(api=api);
b.blocks
13-element Vector{String}:
"credentialpair/trino-creds"
"github/cloud"
"github/ikeloa-tables-cloud"
"local-file-system/datastore"
"local-file-system/idioteque"
"process/idioteque"
"s3-bucket/datastore"
"slack-webhook/team-alerts"
"string/environment"
ab = getblock("credentialpair/trino-creds", api=api)
Dict{String, Any} with 12 entries:
"block_type_id" => "94a978e3-6f80-406b-ab19-54ccd8a6ba54"
"block_type_name" => "CredentialPair"
...etc
fsblock = PrefectBlock("local-file-system/idioteque");
dump(fsblock2)
PrefectBlock
blockname: String "local-file-system/idioteque"
block: LocalFSBlock
blockname: String "local-file-system/idioteque"
blocktype: String "local-file-system"
basepath: String "HOME/prefect-local-deployment/dev"
read_path: #1 (function of type PrefectInterfaces.var"#1#3"{String})
basepath: String "HOME/prefect-local-deployment/dev"
write_path: #2 (function of type PrefectInterfaces.var"#2#4"{String})
basepath: String "HOME/prefect-local-deployment/dev"
Works great! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The HTTP.request call is using the prefect api url but does not present a header bearer token to authenticate so it fails:
The text was updated successfully, but these errors were encountered: