Leaves
This endpoint is used to fetch all the leaves in the current organization
Number of results to return per page.
The initial index from which to return the results.
GET /ux/common/leaves/leaveinfo/ HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
{
"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-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text",
"email": "text"
}
]
}
This endpoint is used to save a new user for the current organization
POST /ux/common/leaves/leaveinfo/ HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
No response body
No content
This endpoint is used to fetch a leave details in the current organization
GET /ux/common/leaves/leaveinfo/{id}/ HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
{
"username": "text",
"start_date": "2025-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text",
"email": "text"
}
This endpoint is used to edit an existing leave for the current organization
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.
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-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text"
}
{
"username": "text",
"start_date": "2025-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text",
"email": "text"
}
This endpoint is used to delete an existing leave for the current organization
DELETE /ux/common/leaves/leaveinfo/{id}/ HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
No response body
No content
API endpoint that allows to view the leaves for system.
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.
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-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text"
}
{
"username": "text",
"start_date": "2025-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text",
"email": "text"
}
API endpoint that allows to view the leaves for system.
GET /ux/common/leaves/leaveinfo/get_config/ HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
{
"username": "text",
"start_date": "2025-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text",
"email": "text"
}
API endpoint that allows to view the leaves for system.
GET /ux/common/leaves/leaveinfo/get_options/ HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
{
"username": "text",
"start_date": "2025-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text",
"email": "text"
}
API endpoint that allows to view the leaves for system.
GET /ux/common/leaves/leaveinfo/my_leaves/ HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
{
"username": "text",
"start_date": "2025-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text",
"email": "text"
}
API endpoint that allows to view the leaves for system.
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.
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-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text"
}
{
"username": "text",
"start_date": "2025-07-06T05:38:21.454Z",
"end_date": "2025-07-06T05:38:21.454Z",
"reason": "text",
"days": 1,
"leave_id": "text",
"leave_type": "text",
"user": "text",
"email": "text"
}