Organization API

Introduction

The Organization API enables interaction with the organization and user management within the Joget built-in directory manager. You can add, update, assign users, and retrieve organization data through this API.

Plugin information

  • Plugin Name: Organization API
  • Category: User Management
  • Version: BETA

Get started

How to use it

  1. Drag and drop the Organization API from the Palette to the Canvas.
  2. Select the endpoints

List of API Endpoints

Add organization

Add a new organization.

URL: /organization

HTTP Method: POST

Body Parameters
Parameter Description
id Organization ID.
name Organization name.
description Description of organization.
Sample Response
{
  "id": "apiTestOrg",
  "name": "API Test Org",
  "description": "This is an organization created by API."
}

 

Assign user to organization

Assign a Joget user to an organization.

URL: /organization/assignUser/{organization}/{username}

HTTP Method: POST

Path Parameters
Parameter Description
organization Organization ID.
username Username of Joget user.
Sample Response
{
  "userId": "david",
  "startDate": null,
  "endDate": null,
  "employeeCode": null,
  "gradeId": "G-002",
  "departmentId": "D-007",
  "organizationId": "ORG-001"
}

 

Delete organization

Delete an organization via organization ID.

URL: /organization/{id}

HTTP Method: DELETE

Path Parameters
Parameter Description
id Organization ID.
Sample Response
{
  "date": "Wed Aug 28 15:43:58 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}

 

Find organization

Gets all organizations by default.

Able to filter or sort the returned results via parameters.

URL: /organization/find

HTTP Method: GET

Query String Parameters
Parameter Description
nameFilter Filters the response via organization ID.
sort Organization data column to sort. Must be used in conjunction with sortDescending parameter.
sortDescending Sort the specified sort parameter value in ascending or descending order. Expect a boolean value. Must be used in conjunction with sort parameter. 
startOffset Starting position of records to start query. Expect an integer.
pageSize Number of results to return. Expect an integer.
Sample Response
[
  {
    "id": "ORG-001",
    "name": "Joget.Org",
    "description": ""
  }
]

 

Get organization by ID

Get details of a organization via organization ID.

URL: /organization/{id}

HTTP Method: GET

Path Parameters
Parameter Description
id Organization ID.
Sample Response
[
  {
    "id": "ORG-001",
    "name": "Joget.Org",
    "description": ""
  }
]

 

Unassign user from organization

Unassign a Joget user from an organization.

URL: /organization/unassignUser/{organization}/{username}

HTTP Method: DELETE

Path Parameters
Parameter Description
organization Organization ID.
username Username of Joget user.
Sample Response
{
  "date": "Thu Dec 05 03:29:56 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}

 

Update organization

Update the details of an organization.

URL: /organization

HTTP Method: PUT

Body Parameters
Parameter Description
id Organization ID.
name Organization name.
description Description of organization.
Sample Response
{
  "id": "apiTestOrg",
  "name": "API Test Org",
  "description": "This organization is updated via API."
}
Created by Julieth Last modified by Aadrian on Dec 03, 2024