Solved

Postman does not work properly after authorization

  • 24 April 2024
  • 2 replies
  • 24 views

Badge

I have begun the module:

 

I followed instructions down to setting the environment variables:

Then, authorization was updated:

 

Get New Access Token is successful.

 

Use Token clicked

 

Then, to test, I went:  Cognite API collection > "Assets" folder > "List assets" > Send

This gives Error:

 

 

So, I deselect “minCreatedTime” parameter. (THERE IS NOTHING in the documentation that talks about this.)

 

 

The, press “Send” again.

But then get this error when testing:

So, deselect  “maxCreatedTime” , and progressively deselect minLastUpdatedTime; maxLastUpdatedTime as indicated by error messages.

Finally, 

 

Gives the error:

 

Therefore, my attempt to list the assets in the CDF project has failed.

 

Next, I try to list the timeseries data: timeseries > list time series > Send

Try deselecting all the query parameters > Send

 

 

 

This time there is a listing of timeseries:

 

 

My questions:

Q1. Why can I not list assets?

Q2. Why can I list timeseries, but not assets?

 

Thank you for your support.

 

Regards,

Doug

 

 

 

 

 

 

 

 

 

 

icon

Best answer by Einar Omang 24 April 2024, 07:48

View original

2 replies

Badge

 

I have begun the module:

 

 

Userlevel 2

The API docs have examples and list the available query parameters: https://api-docs.cognite.com/20230101/tag/Assets/operation/getAssets, as you can see they have restrictions and must be on the correct form. You don’t show in your post what the actual value of each of these query parameters are, but I’m assuming they are empty? The errors you are getting are because of this.

 

I would advise you to start with no query parameters, then add the ones you need.

Reply