Dandelion - API Documentation - Categories

Module name: categories

Index

create

Endpoint: /api/categories/create

Method: POST

Parameters: pid, description

Parameter Type Default Required
pid int   true
description string   true

Description: Create a new category whose parent is the category with id pid and whose description/text is description. A pid of 0 indicates a root category.

Example Return Data:

{
	"data": "Success or error message"
}

Returned Values:

  • data (string) - User displayable string if the save was successful or not

Permissions Needed:

  • Create category

⇑ Top


edit

Endpoint: /api/categories/edit

Method: POST

Parameters: cid, description

Parameter Type Default Required
cid int   true
description string   true

Description: Update category cid with the description/text description.

Example Return Data:

{
	"data": "Success or error message"
}

Returned Values:

  • data (string) - User displayable string if the save was successful or not

Permissions Needed:

  • Edit category

⇑ Top


delete

Endpoint: /api/categories/delete

Method: POST

Parameters: cid

Parameter Type Default Required
cid int   true

Description: Delete category cid. This operation will reassign all children categories to the parent of the deleted category. This will not affect the category associated with logs. Logs with the deleted category will remain in that category.

Example Return Data:

{
	"data": "Success or error message"
}

Returned Values:

  • data (string) - User displayable string if the save was successful or not

Permissions Needed:

  • Delete category

⇑ Top


⇐ API Documentation