You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Definition

Organization API can perform functions to interact or exchange data with Organization.


NameDescription
1

Add organization

Add a new organization.

Name

Description
URL/organization
HTTP MethodPOST
Body Parameters
ParameterDescription
idOrganization ID.
nameOrganization name.
descriptionDescription of organization.
Sample Response
{
  "id": "apiTestOrg",
  "name": "API Test Org",
  "description": "This is an organization created by API."
}
2

Assign user to organization

Assign a Joget user to an organization.

Name

Description
URL/organization/assignUser/{organization}/{username}
HTTP MethodPOST
Path Parameters
ParameterDescription
organizationOrganization ID.
usernameUsername of Joget user.
Sample Response
{
  "userId": "david",
  "startDate": null,
  "endDate": null,
  "employeeCode": null,
  "gradeId": "G-002",
  "departmentId": "D-007",
  "organizationId": "ORG-001"
}
3

Delete organization

Delete an organization via organization ID.

Name

Description
URL/organization/{id}
HTTP MethodDELETE
Path Parameters
ParameterDescription
idOrganization ID.
Sample Response
{
  "date": "Wed Aug 28 15:43:58 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}
4

Find organization

Gets all organizations by default.

Able to filter or sort the returned results via parameters.

Name

Description
URL/organization/find
HTTP MethodGET
Query String Parameters
ParameterDescription
nameFilterFilters 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.

Expects a boolean value.

Must be used in conjunction with "sort" parameter.

startOffsetStarting position of records to start query. Expects an integer.
pageSizeNumber of results to return. Expects an integer.
Sample Response
[
  {
    "id": "ORG-001",
    "name": "Joget.Org",
    "description": ""
  }
]
5

Get organization by ID

Get details of a organization via organization ID.

Name

Description
URL/organization/{id}
HTTP MethodGET
Path Parameters
ParameterDescription
idOrganization ID.
Sample Response
[
  {
    "id": "ORG-001",
    "name": "Joget.Org",
    "description": ""
  }
]
6

Unassign user from organization

Unassign a Joget user from an organization.

Name

Description
URL/organization/unassignUser/{organization}/{username}
HTTP MethodDELETE
Path Parameters
ParameterDescription
organizationOrganization ID.
usernameUsername of Joget user.
Sample Response
{
  "date": "Thu Dec 05 03:29:56 SGT 2019",
  "code": "200",
  "message": "Successful operation"
}
7

Update organization

Update the details of a organization.

Name

Description
URL/organization
HTTP MethodPUT
Body Parameters
ParameterDescription
idOrganization ID.
nameOrganization name.
descriptionDescription of organization.
Sample Response
{
  "id": "apiTestOrg",
  "name": "API Test Org",
  "description": "This organization is updated via API."
}




  • No labels