Infraon API Guide
Product DocsSchemaAuthentication
  • Welcome
    • Base URL
    • Authorization
    • Responses
  • Modules
    • Schema
    • Authentication
    • Announcement
    • API Registration
    • Async Tasks
    • BusinessRule
    • BusinessServiceConfiguration
    • Service Catalogue
    • CMDBBlacklistWhitelist
    • CMDBCategory
    • CMDBConsumables
    • Ux
    • CMDBSoftwareLicense
    • Cmdb
    • CMDBRelation
    • CMDBSoftware
    • ContractManagement
    • Department
    • Events
    • Field Configuration
    • IMACD
    • Knowledge Base
    • Leaves
    • Chat
    • Marketplace
    • APIViewSet
    • BeepViewSet
    • SMSviewset
    • Suppressedviewset
    • Organization Location
    • Partner
    • Predicted Events
    • Requester
    • Service Feasibility Requests
    • Role Profile
    • Tag
    • Service_outage
    • Teams
    • Telecom Settings
    • Trap Configurations
    • User Profile
    • Vendor Managemment
    • Association Events
    • Device Template
    • Discovery Configuration
    • Jobs
    • MIB Explorer
    • Seasonal Events
    • IPAM
    • Log Grok Pattern Configuration
    • Log Pipeline Configuration
    • Log Integraion
    • Log Search
    • CLI Download Jobs
    • Configuration Profiles
    • Configuration Policies
    • Configuration Rules
    • Configuration Search
    • Configuration Template
    • Configuration Trigger
    • Jobs Account Audit
    • Manage Vulnerabilities
    • OS Image Download
    • Rule Group
    • Configuration Upload Jobs
    • Work Flow Jobs
    • Change
    • Checklist
    • Incident
    • Problem
    • Release
    • Request Process
    • Task
    • Models
Powered by GitBook
On this page
  1. Modules

Leaves

PreviousKnowledge BaseNextChat

Gets a leave with the given id

get

This endpoint is used to fetch a leave details in the current organization

Authorizations
Path parameters
idstringRequired
Responses
200Success
application/json
get
GET /ux/common/leaves/leaveinfo/{id}/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "username": "text",
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text",
  "email": "text"
}

Deletes the leave with given id

delete

This endpoint is used to delete an existing leave for the current organization

Authorizations
Path parameters
idstringRequired
Responses
204
No response body
delete
DELETE /ux/common/leaves/leaveinfo/{id}/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

No response body

No content

get

API endpoint that allows to view the leaves for system.

Authorizations
Responses
200Success
application/json
get
GET /ux/common/leaves/leaveinfo/get_config/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "username": "text",
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text",
  "email": "text"
}
get

API endpoint that allows to view the leaves for system.

Authorizations
Responses
200Success
application/json
get
GET /ux/common/leaves/leaveinfo/get_options/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "username": "text",
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text",
  "email": "text"
}
get

API endpoint that allows to view the leaves for system.

Authorizations
Responses
200Success
application/json
get
GET /ux/common/leaves/leaveinfo/my_leaves/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "username": "text",
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text",
  "email": "text"
}
  • GETGets a list of leaves
  • POSTCreates a leave for user
  • GETGets a leave with the given id
  • PUTEdits the leave with given id
  • DELETEDeletes the leave with given id
  • PATCH/ux/common/leaves/leaveinfo/{id}/
  • GET/ux/common/leaves/leaveinfo/get_config/
  • GET/ux/common/leaves/leaveinfo/get_options/
  • GET/ux/common/leaves/leaveinfo/my_leaves/
  • POST/ux/common/leaves/leaveinfo/save_config/

Gets a list of leaves

get

This endpoint is used to fetch all the leaves in the current organization

Authorizations
Query parameters
items_per_pageintegerOptional

Number of results to return per page.

offsetintegerOptional

The initial index from which to return the results.

Responses
200Success
application/json
get
GET /ux/common/leaves/leaveinfo/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "count": 123,
  "next": "http://api.example.org/accounts/?offset=400&items_per_page=100",
  "previous": "http://api.example.org/accounts/?offset=200&items_per_page=100",
  "results": [
    {
      "username": "text",
      "start_date": "2025-06-07T19:07:03.334Z",
      "end_date": "2025-06-07T19:07:03.334Z",
      "reason": "text",
      "days": 1,
      "leave_id": "text",
      "leave_type": "text",
      "user": "text",
      "email": "text"
    }
  ]
}

Creates a leave for user

post

This endpoint is used to save a new user for the current organization

Authorizations
Body
Other propertiesanyOptional
Responses
201
No response body
post
POST /ux/common/leaves/leaveinfo/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
201

No response body

No content

Edits the leave with given id

put

This endpoint is used to edit an existing leave for the current organization

Authorizations
Path parameters
idstringRequired
Body

Serializer for Documents.

Recognized primitve fields:

* ``StringField``
* ``URLField``
* ``EmailField``
* ``IntField``
* ``LongField``
* ``FloatField``
* ``DecimalField``
* ``BooleanField``
* ``DateTimeField``
* ``ComplexDateTimeField``
* ``ObjectIdField``
* ``SequenceField`` (assumes it has integer counter)
* ``UUIDField``
* ``GeoPointField``
* ``GeoJsonBaseField`` (all those fields)
* ``DateField``

Compound fields: ListField and DictField are mapped to corresponding DRF fields, with respect to nested field specification.

The ReferenceField is handled like ForeignKey in DRF: there nested serializer autogenerated if serializer depth greater then 0, otherwise it's handled by it's own (results as str(id)).

For EmbeddedDocumentField also nested serializer autogenerated for non-zero depth, otherwise it is skipped. TODO: THIS IS PROBABLY WRONG AND SHOULD BE FIXED.

Generic fields GenericReferenceField and GenericEmbeddedDocumentField are handled by their own with corresponding serializer fields.

Not well supported or untested:

``FileField``
``ImageField``
``BinaryField``

All other fields are mapped to DocumentField and probably will work wrong.

usernamestringRead-onlyRequired
start_datestring · date-timeOptional
end_datestring · date-timeOptional
reasonstringOptional
daysintegerOptional
leave_idstringOptional
leave_typestringOptional
userstringOptional
emailstringRead-onlyRequired
Responses
200Success
application/json
put
PUT /ux/common/leaves/leaveinfo/{id}/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 156

{
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text"
}
200Success
{
  "username": "text",
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text",
  "email": "text"
}
patch

API endpoint that allows to view the leaves for system.

Authorizations
Path parameters
idstringRequired
Body

Serializer for Documents.

Recognized primitve fields:

* ``StringField``
* ``URLField``
* ``EmailField``
* ``IntField``
* ``LongField``
* ``FloatField``
* ``DecimalField``
* ``BooleanField``
* ``DateTimeField``
* ``ComplexDateTimeField``
* ``ObjectIdField``
* ``SequenceField`` (assumes it has integer counter)
* ``UUIDField``
* ``GeoPointField``
* ``GeoJsonBaseField`` (all those fields)
* ``DateField``

Compound fields: ListField and DictField are mapped to corresponding DRF fields, with respect to nested field specification.

The ReferenceField is handled like ForeignKey in DRF: there nested serializer autogenerated if serializer depth greater then 0, otherwise it's handled by it's own (results as str(id)).

For EmbeddedDocumentField also nested serializer autogenerated for non-zero depth, otherwise it is skipped. TODO: THIS IS PROBABLY WRONG AND SHOULD BE FIXED.

Generic fields GenericReferenceField and GenericEmbeddedDocumentField are handled by their own with corresponding serializer fields.

Not well supported or untested:

``FileField``
``ImageField``
``BinaryField``

All other fields are mapped to DocumentField and probably will work wrong.

usernamestringRead-onlyOptional
start_datestring · date-timeOptional
end_datestring · date-timeOptional
reasonstringOptional
daysintegerOptional
leave_idstringOptional
leave_typestringOptional
userstringOptional
emailstringRead-onlyOptional
Responses
200Success
application/json
patch
PATCH /ux/common/leaves/leaveinfo/{id}/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 156

{
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text"
}
200Success
{
  "username": "text",
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text",
  "email": "text"
}
post

API endpoint that allows to view the leaves for system.

Authorizations
Body

Serializer for Documents.

Recognized primitve fields:

* ``StringField``
* ``URLField``
* ``EmailField``
* ``IntField``
* ``LongField``
* ``FloatField``
* ``DecimalField``
* ``BooleanField``
* ``DateTimeField``
* ``ComplexDateTimeField``
* ``ObjectIdField``
* ``SequenceField`` (assumes it has integer counter)
* ``UUIDField``
* ``GeoPointField``
* ``GeoJsonBaseField`` (all those fields)
* ``DateField``

Compound fields: ListField and DictField are mapped to corresponding DRF fields, with respect to nested field specification.

The ReferenceField is handled like ForeignKey in DRF: there nested serializer autogenerated if serializer depth greater then 0, otherwise it's handled by it's own (results as str(id)).

For EmbeddedDocumentField also nested serializer autogenerated for non-zero depth, otherwise it is skipped. TODO: THIS IS PROBABLY WRONG AND SHOULD BE FIXED.

Generic fields GenericReferenceField and GenericEmbeddedDocumentField are handled by their own with corresponding serializer fields.

Not well supported or untested:

``FileField``
``ImageField``
``BinaryField``

All other fields are mapped to DocumentField and probably will work wrong.

usernamestringRead-onlyRequired
start_datestring · date-timeOptional
end_datestring · date-timeOptional
reasonstringOptional
daysintegerOptional
leave_idstringOptional
leave_typestringOptional
userstringOptional
emailstringRead-onlyRequired
Responses
200Success
application/json
post
POST /ux/common/leaves/leaveinfo/save_config/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 156

{
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text"
}
200Success
{
  "username": "text",
  "start_date": "2025-06-07T19:07:03.334Z",
  "end_date": "2025-06-07T19:07:03.334Z",
  "reason": "text",
  "days": 1,
  "leave_id": "text",
  "leave_type": "text",
  "user": "text",
  "email": "text"
}