Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
I'M Evaluating Using Clearml From A Language Other Than Python, So I Am Playing With The Rest Api. I Managed To Call Auth.Login To Get An Auth Token. Now I'M Trying To Call Projects.Get_By_Id. Here'S What I'Ve Got.

I'm evaluating using ClearML from a language other than Python, so I am playing with the REST API.
I managed to call auth.login to get an auth token.
Now I'm trying to call projects.get_by_id.

Here's what I've got.
https://gist.github.com/garymm/99aa012f2d77e8f33a4a81682767f550

When I run these commands to execute projects.get_by_id, the server responds with:
"result_msg": "Missing required fields: missing=(project)",

  
  
Posted one year ago
Votes Newest

Answers 17


They're usually issued for 30 days, but you can simply check the embedded jet exp claim

  
  
Posted one year ago

You're absolutely correct - I guess we just don't use projects.get_by_id 😞

  
  
Posted one year ago

MammothGoat53 just realized I simply omitted the https part 😆

  
  
Posted one year ago

You can use projects.get_all with the ids parameter (a list of IDs) and just pass a single ID - it works for me

  
  
Posted one year ago

The two things I fixed:
The token had quotes around it. I changed from jq to jq --raw-output

  
  
Posted one year ago

Hi MammothGoat53
Basically what you are missing are the headers with the Token you have:
https://blog.logrocket.com/secure-rest-api-jwt-authentication/

  
  
Posted one year ago

OK, ctually get_by_id works

  
  
Posted one year ago

And I'm a bit confused b/c I thought the official python client was doing these same REST calls

  
  
Posted one year ago

Hi MammothGoat53 , I believe your code is correct, and that this is some regression bug related to the projects.get_by_id endpoint (I just tried that myself) - I'll make sure we check that out as soon as possible.

  
  
Posted one year ago

Oh, cool, now I'm wondering why it didn't work for me 😄

  
  
Posted one year ago

Now I'm getting Invalid token (invalid jwt token): reason=Invalid crypto padding

  
  
Posted one year ago

Ah figured it out

  
  
Posted one year ago

Can you please elaborate how to change what I have? I'm setting this: -H "Authorization: Bearer $CLEARML_TOKEN" \

  
  
Posted one year ago

well if you copy pasted my command maybe the -data vs --data

  
  
Posted one year ago

When do the tokens expire?

  
  
Posted one year ago

  1. The curl data option needed 2 dashes, --data
  
  
Posted one year ago

Ah interesting. So I should try another API method?

  
  
Posted one year ago
987 Views
17 Answers
one year ago
one year ago
Tags