Fetching category and its attributes metadata

Options

I need to fetch all categories and their attributes for further processing. I have problems with fetching category metainfo for understanding which attributes are in it. The most convenient way for fetching all categories and their attributes that I've discovered is to search through "api/v2/search" endpoint with OTSubType=131, and then, when receiving categories content as a stream, - try to parse it in convenient format(list of attributes metadata).

Question: is there any way to get the categories metadata(attribute types, names, etc.) as a JSON or some other simple structure instead of content stream?

Tagged:

Comments

  • Since there is no API to get Category Definition, you can try this

    Create a WebReport as below with destination mime type set to application/json

    [LL_WEBREPORT_EXCLUDEHTML /]
    [LL_REPTAG_&category_id CATINFO:DEFINITION TOJSON /]
    

    Then you can call this WebReport using AJAX, or use the Rest API for WebReport /api/v1/nodes/{id}/output