Skip to content

LegalOn API (1.0.0)

API documentation for LegalOn services

Languages
Servers
The server URL is `{api_base_url}/rest/v1`. You can construct the server URL using the value of `api_base_url` provided in the response when obtaining an access token.
https://{api_base_url_without_scheme}/rest/v1

Users

Operations about user

Operations

User Groups

Operations about user group

Operations

Workspaces

Operations about workspace/folder

Operations

Departments

Operations about department

Operations

List departments

Request

Retrieve a list of departments

Security
OAuth2ClientCredentials
Query
search_querystringnon-empty

Department name search query (partial match)

page_sizeinteger>= 1required

The number of results to retrieve per page

page_tokenstring

Token for getting the previous/next page

curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/departments?search_query=string&page_size=1&page_token=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
departmentsArray of objects(department)required
departments[].​department_idstring(uuid)required

Department Id

departments[].​display_namestring[ 1 .. 100 ] charactersrequired

Department name

next_page_tokenstring

Token to get the next page (omitted if page does not exist)

prev_page_tokenstring

Token to get the prev page (omitted if page does not exist)

total_sizeinteger>= 0required

Total number of matches for the search criteria

Response
application/json
{ "departments": [ { … } ], "total_size": 150, "next_page_token": "eyJvZmZz...", "prev_page_token": "eyJvZmZz..." }

Create department

Request

Create a new department

Security
OAuth2ClientCredentials
Bodyapplication/jsonrequired

Department creation request

display_namestring[ 1 .. 100 ] charactersrequired

Department name

curl -i -X POST \
  'https://{api_base_url_without_scheme}/rest/v1/departments' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "display_name": "string"
  }'

Responses

Created

Bodyapplication/json
department_idstring(uuid)required

Department Id

display_namestring[ 1 .. 100 ] charactersrequired

Department name

Response
application/json
{ "department_id": "76088fa5-1ce5-3ca9-303a-8466c48581ba", "display_name": "Legal Department" }

Update department

Request

Update the department

Security
OAuth2ClientCredentials
Path
department_idstring(uuid)required

Department ID

Bodyapplication/jsonrequired

Department update request

display_namestring[ 1 .. 100 ] charactersrequired

Department name

curl -i -X PATCH \
  'https://{api_base_url_without_scheme}/rest/v1/departments/{department_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "display_name": "string"
  }'

Responses

OK

Bodyapplication/json
department_idstring(uuid)required

Department Id

display_namestring[ 1 .. 100 ] charactersrequired

Department name

Response
application/json
{ "department_id": "76088fa5-1ce5-3ca9-303a-8466c48581ba", "display_name": "Legal Department" }