Directory

This page details the Directory endpoints and the actions they support. It provides sample URLs and results for quick reference, along with further instructions on how to use each endpoint.

web/json/directory/admin/dept/list

Retrieves all departments.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • orgId - (Optional) organization id
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/dept/list
  • Sample Result: 
{
    "total": 7,
    "data": [{
        "id": "D-001",
        "description": "",
        "name": "CEO Office",
        "organization.name": "Joget.Org",
        "parent.name": ""
    }, {
        "id": "D-002",
        "description": "",
        "name": "Human Resource and Admin",
        "organization.name": "Joget.Org",
        "parent.name": ""
    }, {
        "id": "D-003",
        "description": "",
        "name": "Finance",
        "organization.name": "Joget.Org",
        "parent.name": ""
    }, {
        "id": "D-004",
        "description": "",
        "name": "Marketing",
        "organization.name": "Joget.Org",
        "parent.name": ""
    }, {
        "id": "D-005",
        "description": "",
        "name": "Product Development",
        "organization.name": "Joget.Org",
        "parent.name": ""
    }, {
        "id": "D-006",
        "description": "",
        "name": "Training and Consulting",
        "organization.name": "Joget.Org",
        "parent.name": ""
    }, {
        "id": "D-007",
        "description": "",
        "name": "Support and Services",
        "organization.name": "Joget.Org",
        "parent.name": ""
    }]
}

 

web/json/directory/admin/employment/list

Retrieves all users with employment details.

User Role: Admin

  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • orgId - (Optional) organization id
    • deptId - (Optional) department id
    • gradeId - (Optional) grade id
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/employment/list?name=j
  • Sample Result: 
{
    "total": 2,
    "data": [{
        "grade.name": "Managers",
        "user.firstName": "Jack",
        "user.id": "jack",
        "role": null,
        "user.lastName": "Drake",
        "organization.name": "Joget.Org",
        "employeeCode": null,
        "user.username": "jack",
        "department.name": "Training and Consulting"
    }, {
        "grade.name": "Executives",
        "user.firstName": "Julia",
        "user.id": "julia",
        "role": null,
        "user.lastName": "Kapatelis",
        "organization.name": "Joget.Org",
        "employeeCode": null,
        "user.username": "julia",
        "department.name": "Human Resource and Admin"
    }]
}

 

web/json/directory/admin/employment/noHaveOrganization/list

Retrieves all users that do not belong to any organization.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/employment/noHaveOrganization/list
  • Sample Result: 
{
    "total": 1,
    "data": {
        "user.firstName": "Admin",
        "user.id": "admin",
        "role": "",
        "user.lastName": "",
        "employeeCode": "",
        "user.username": "admin"
    }
}

 

web/json/directory/admin/employment/noInDept/list

Retrieves all users that do not belong to a department.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/employment/noInDept/list?orgId=ORG-001&deptId=D-003&name=j
  • Sample Result: 
{
    "total": 3,
    "data": [{
        "grade.name": "Executives",
        "user.firstName": "Cat",
        "user.id": "cat",
        "role": "",
        "user.lastName": "Grant",
        "employeeCode": "",
        "user.username": "cat",
        "department.name": "Product Development"
    }, {
        "grade.name": "Managers",
        "user.firstName": "Jack",
        "user.id": "jack",
        "role": null,
        "user.lastName": "Drake",
        "employeeCode": null,
        "user.username": "jack",
        "department.name": "Training and Consulting"
    }, {
        "grade.name": "Executives",
        "user.firstName": "Julia",
        "user.id": "julia",
        "role": null,
        "user.lastName": "Kapatelis",
        "employeeCode": null,
        "user.username": "julia",
        "department.name": "Human Resource and Admin"
    }]
}

 

web/json/directory/admin/employment/noInGrade/list

Retrieves all users that do not belong to a grade.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • orgId - Organization id
    • gradeId - Grade id
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/employment/noInGrade/list?orgId=ORG-001&gradeId=G-003&name=c
  • Sample Result: 
{
    "total": 3,
    "data": [{
        "grade.name": "Managers",
        "user.firstName": "Clark",
        "user.id": "clark",
        "role": null,
        "user.lastName": "Kent",
        "employeeCode": null,
        "user.username": "clark",
        "department.name": "Product Development"
    }, {
        "grade.name": "Managers",
        "user.firstName": "Jack",
        "user.id": "jack",
        "role": null,
        "user.lastName": "Drake",
        "employeeCode": null,
        "user.username": "jack",
        "department.name": "Training and Consulting"
    }, {
        "grade.name": "Managers",
        "user.firstName": "David",
        "user.id": "david",
        "role": null,
        "user.lastName": "Cain",
        "employeeCode": null,
        "user.username": "david",
        "department.name": "Support and Services"
    }]
}

 

web/json/directory/admin/group/list

Retrieves all groups.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • orgId - (Optional) organization id for filter 
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/group/list
  • Sample Result: 
{
    "total": 3,
    "data": [{
        "id": "G-001",
        "description": "",
        "name": "Managers",
        "organization.name": ""
    }, {
        "id": "G-002",
        "description": "",
        "name": "CxO",
        "organization.name": ""
    }, {
        "id": "G-003",
        "description": "",
        "name": "hrAdmin",
        "organization.name": ""
    }]
}

 

web/json/directory/admin/grade/list

Retrieves all grades.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • orgId - (Optional) Organization Id for filter
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/grade/list
  • Sample Result: 
{
    "total": 3,
    "data": [{
        "id": "G-001",
        "description": "",
        "name": "Board Members"
    }, {
        "id": "G-002",
        "description": "",
        "name": "Managers"
    }, {
        "id": "G-003",
        "description": "",
        "name": "Executives"
    }]
}

 

web/json/directory/admin/organization/list

Retrieves all organizations.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/organization/list
  • Sample Result: 
{
    "total": 1,
    "data": {
        "id": "ORG-001",
        "description": "",
        "name": "Joget.Org"
    }
}

 

web/json/directory/admin/subdept/list

Retrieves all sub department of a department.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • deptId - department id
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/subdept/list?deptId=D-001
  • Sample Result: 
{
    "total": 1,
    "data": {
        "id": "sub",
        "description": "",
        "name": "Sub Department"
    }
}

 

web/json/directory/admin/user/deptAndGrade/options

Retrieves all departments and grades in an organization.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • orgId - Organization id
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/user/deptAndGrade/options?orgId=ORG-001
  • Sample Result:  
{
    "departments": [{
        "id": "",
        "name": "",
        "prefix": ""
    }, {
        "id": "D-001",
        "prefix": "",
        "name": "CEO Office"
    }, {
        "id": "D-003",
        "prefix": "",
        "name": "Finance"
    }, {
        "id": "D-002",
        "prefix": "",
        "name": "Human Resource and Admin"
    }, {
        "id": "D-004",
        "prefix": "",
        "name": "Marketing"
    }, {
        "id": "D-005",
        "prefix": "",
        "name": "Product Development"
    }, {
        "id": "D-007",
        "prefix": "",
        "name": "Support and Services"
    }, {
        "id": "D-006",
        "prefix": "",
        "name": "Training and Consulting"
    }],
    "grades": [{
        "id": "",
        "name": "",
        "prefix": ""
    }, {
        "id": "G-001",
        "name": "Board Members"
    }, {
        "id": "G-003",
        "name": "Executives"
    }, {
        "id": "G-002",
        "name": "Managers"
    }]
}

 

web/json/directory/admin/user/group/list

Retrieves the groups that a user is in or not in.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • userId - Username that a user is in or not in the group
    • orgId - (Optional) 
    • inGroup - (Optional) true or false. default to true
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/user/group/list?userId=admin
  • Sample Result: 
{
    "total": 1,
    "data": {
        "id": "G-001",
        "description": "",
        "name": "Managers",
        "organization.name": ""
    }
}

 

web/json/directory/admin/user/list

Retrieves a list of users.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • orgId - (Optional) Organization id for filter
    • deptId - (Optional) Department id for filter
    • gradeId - (Optional) Grade id for filter
    • groupId - (Optional) Group id for filter
    • roleId - (Optional) Role id for filter
    • active - (Optional) 1 = active, 0 = not active
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/user/list?groupId=G-002
  • Sample Result: 
{
    "total": 1,
    "data": {
        "id": "terry",
        "lastName": "Berg",
        "username": "terry",
        "email": "",
        "active": "Active",
        "firstName": "Terry"
    }
}

 

web/json/directory/admin/user/notInGroup/list

Retrieves a list of users not in a group.

  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • name - (Optional) name filter
    • groupId - Group id for filter
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/directory/admin/user/notInGroup/list?groupId=G-002
  • Sample Result:
{
    "total": 4,
    "data": [{
        "id": "admin",
        "lastName": "",
        "username": "admin",
        "email": "",
        "firstName": "Admin"
    }, {
        "id": "cat",
        "lastName": "Grant",
        "username": "cat",
        "email": "owen@joget.org",
        "firstName": "Cat"
    }, {
        "id": "clark",
        "lastName": "Kent",
        "username": "clark",
        "email": "",
        "firstName": "Clark"
    }, {
        "id": "david",
        "lastName": "Cain",
        "username": "david",
        "email": "",
        "firstName": "David"
    }]
}

 

web/json/directory/user/sso

To single sign on a user.

  • User Role: Anonymous
  • Method: HTTP POST, support HTTP basic authentication
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • j_username - (Optional) username for login
    • j_password - (Optional) password for login
    • hash - (Optional) Hashed Password
  • Sample URL: http://localhost:8080/jw/web/json/directory/user/sso?j_username=admin&j_password=admin
  • Sample Result:
{"username":"admin","isAdmin":"true", "token": "OWASP_CSRFTOKEN=7BKT-GL1V-Y5LR-T3JJ-41W2-JRBL-CCDB-7C03"}

 

web/json/workflow/currentUsername

  • Retrieves the username of the current logged in user.
  • User Role: Admin
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • Sample URL: http://localhost:8080/jw/web/json/workflow/currentUsername
  • Sample Result: 
{"username":"admin"}

 

Created by Damian Last modified by Aadrian on Dec 13, 2024