Please rate how useful you found this document: 
Average: 2.3 (3 votes)

Categories

The following REST endpoints are used to manage process categories in ProcessMaker.

Permissions:

These endpoints need the following permission:

Permission Needed
PM_SETUP_PROCESS_CATEGORIES

Category:

Name Description Type Value
cat_uid Category UID String "9541049475298f190420f51086854718" String of 32 characters
cat_name Category name String "Other categories"
cat_total_processes Total number of processes that belong to the Category Integer 10
Other Parameters
filter Search filter String "a,b,c..."
start Indicates the initial position of the records returned String 0,...
limit Restricts the size of records returned String 25,...


Available methods:

Get Categories List: GET /project/categories

Get a list of the categories in the workspace.

Permission:

Users must have the PM_SETUP_PROCESS_CATEGORIES permission assigned to their role to be able to perform this action.

Structure:

GET /api/1.0/{workspace}/project/categories?filter={filter}&start={start}&limit={limit}

URL Parameters:

Name Type Description
workspace String Workspace name

Optional Parameters:

Name Type Description
filter String Search filter
start Integer Indicates the initial position of the records returned
limit Integer Restricts the size of records returned

Result:

Type Description
array Returns an array of objects with categories

Example:
Response

 200 (OK)
 [
    {
      "cat_uid": "348271339502d0a79d8dc86059093146",
      "cat_name": "Accounting",
      "cat_total_processes": 5
    },
    {
      "cat_uid": "497378380530f6bd54acc20036329683",
      "cat_name": "Human Resources",
      "cat_total_processes": 10
    },
    {
      "cat_uid": "272586185508e8644a06768068487362",
      "cat_name": "Factory Production",
      "cat_total_processes": 0
    }
 ]

Get Category Information: GET /project/category/{cat_uid}

Get the information about a category.

Permission:

Users must have the PM_SETUP_PROCESS_CATEGORIES permission assigned to their role to be able to perform this action.

Structure:

GET /api/1.0/{workspace}/project/category/{cat_uid}

URL Parameters:

Name Type Description
workspace String Workspace name
cat_uid String Category UID

Result:

Returns an object with information about the specified category.

Example:
Response

 200 (OK)
 {
      "cat_uid": "348271339502d0a79d8dc86059093146",
      "cat_name": "Human Resources",
      "cat_total_processes": 5
 }

Create Category: POST /project/category

Create a new process category.

Permission:

Users must have the PM_SETUP_PROCESS_CATEGORIES permission assigned to their role to be able to perform this action.

Structure:

POST /api/1.0/{workspace}/project/category

URL Parameters:

Name Type Description
workspace String Workspace name

POST Fields:

Name Type Description
cat_name String Category name

Optional POST Fields:

Name Type Description
cat_total_processes Integer Total number of processes that belong to the category

Result:

Returns an object with data about the new category.

Example:
Request

 Content-Type: application/json
 {
      "cat_name": "Human Resources"
 }

Response

 200 (OK)
 {
      "cat_uid": "348271339502d0a79d8dc86059093146",
      "cat_name": "Human Resources",
      "cat_total_processes": 0
 }

Update Category: PUT /project/category/{cat_uid}

Update an existing category.

Permission:

Users must have the PM_SETUP_PROCESS_CATEGORIES permission assigned to their role to be able to perform this action.

Structure:

PUT /api/1.0/{workspace}/project/category/{cat_uid}

URL Parameters:

Name Type Description
workspace String Workspace name
cat_uid String Category UID

Optional Fields:

Name Type Description
cat_name String Category name
cat_total_processes Total number of processes that belong to the category Integer

Result:

Type Description
empty No return

Example:
Request

 Content-Type: application/json
 {
   "cat_name": "Bugs"
 }

Response

 200 (OK)

Delete Category: DELETE /project/category/{cat_uid}

Delete a category.

Permission:

Users must have the PM_SETUP_PROCESS_CATEGORIES permission assigned to their role to be able to perform this action.

Structure:

DELETE /api/1.0/{workspace}/project/category/{cat_uid}

URL Parameters:

Name Type Description
workspace String Workspace name
cat_uid String Category UID

Result:

Type Description
empty No return

Example:
Response

 200 (OK)