What is a category ID?
Category IDs are unique identifiers used to reference specific categories in your knowledge base when making API requests. To work effectively with the NeetoKB API, it’s important to know how to retrieve these IDs. You can do this programmatically by using the API to fetch all categories and their associated information.Using the API Endpoint
The List all categories API endpoint allows you to retrieve a list of all categories in your workspace, including their IDs. This is particularly useful when you need to programmatically access or retrieve the IDs of all available categories.Step-by-Step Instructions
1
Make the API request
Send a
GET
request to the List all categories API endpoint, including your API key in the request header.2
Parse the response
The response will contain an array of categories with detailed information including
id
, name
, count statistics, and nested subcategories.Example:3
Extract the category ID
Here the category ID for the
Getting Started
category is:- ID:
3c90c3cc-0d44-4b50-8888-8dd25736052a
The
categories
array contains all categories in your workspace with rich metadata:- Hierarchy:
subcategories
,ancestors
,children
,parent_id
,depth
show the category structure - Statistics:
articles_count
,categories_count
,total_articles_count
provide count information - Content:
articles
array includes embedded article objects for each category - Identification: UUID
id
is provided for referencing categories