Leaves

Gets a list of leaves

get

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

Authorizations
AuthorizationstringRequired
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
/ux/common/leaves/leaveinfo/
200Success

Creates a leave for user

post

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

Authorizations
AuthorizationstringRequired
Body
Other propertiesanyOptional
Responses
post
/ux/common/leaves/leaveinfo/
201

No response body

No content

Gets a leave with the given id

get

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

Authorizations
AuthorizationstringRequired
Path parameters
idstringRequired
Responses
200Success
application/json
get
/ux/common/leaves/leaveinfo/{id}/
200Success

Edits the leave with given id

put

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

Authorizations
AuthorizationstringRequired
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
/ux/common/leaves/leaveinfo/{id}/
200Success

Deletes the leave with given id

delete

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

Authorizations
AuthorizationstringRequired
Path parameters
idstringRequired
Responses
delete
/ux/common/leaves/leaveinfo/{id}/
204

No response body

No content

patch

API endpoint that allows to view the leaves for system.

Authorizations
AuthorizationstringRequired
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
/ux/common/leaves/leaveinfo/{id}/
200Success
get

API endpoint that allows to view the leaves for system.

Authorizations
AuthorizationstringRequired
Responses
200Success
application/json
get
/ux/common/leaves/leaveinfo/get_config/
200Success
get

API endpoint that allows to view the leaves for system.

Authorizations
AuthorizationstringRequired
Responses
200Success
application/json
get
/ux/common/leaves/leaveinfo/get_options/
200Success
get

API endpoint that allows to view the leaves for system.

Authorizations
AuthorizationstringRequired
Responses
200Success
application/json
get
/ux/common/leaves/leaveinfo/my_leaves/
200Success
post

API endpoint that allows to view the leaves for system.

Authorizations
AuthorizationstringRequired
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
/ux/common/leaves/leaveinfo/save_config/
200Success

Last updated