Expand my Community achievements bar.

I want to use the API, where can I find the item id?

Avatar

Level 1

Hi, I am trying to get data using the API.

I want to use metricFilters to create a json file for data request, but I need an itemid.

I don't know the definition of the itemid used.

I found json using debug in workspace, but I want to get data by coding directly.

I'd appreciate it if you could tell me how to find the item id.

2 Replies

Avatar

Community Advisor

Sadly, I am far more familiar with the old API 1.4, than with 2.0... 

 

However, I do know that you can "cheat" a bit....

 

There is a debug mode in Workspace, that when enabled will show you all the API calls used to return the data.. you can grab these and use them yourself (rather than building from scratch).. this might give you an idea of what to use, as I think some of the fields may be optional?

 

 Anyway, to turn on debug mode, on your workspace, go to Help > Enable debugger (this will force the workspace to reload.. but you will get a new icon that looks like a bug:

 

Jennifer_Dungan_0-1663969144099.png

 

If you click on this, it will open a page that give you the XML Request and Response, the CURL request, and a JSON Request and Response.

 

You can copy these and use them to help you build future API requests.

 

If your table is complex, there may be multiple API calls that are used to build it, so you would need to grab them all and run them sequentially like Workspace does.

 

I hope this helps.