> For the complete documentation index, see [llms.txt](https://docs.projetly.ai/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.projetly.ai/home/api-reference/activity-logs.md).

# Activity Logs

## GET /api/activity/log/

> API endpoint that allows activity logs to be created, viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"Projetly API","version":"1.0.0"},"servers":[{"url":"https://api.app.projetly.io"}],"security":[{"bearerAuth":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained from /api/login/. Pass as: Authorization: Bearer <token>"}},"schemas":{"ActivityLog":{"type":"object","description":"Serializer for Documents.\n\nRecognized primitve fields:\n\n    * ``StringField``\n    * ``URLField``\n    * ``EmailField``\n    * ``IntField``\n    * ``LongField``\n    * ``FloatField``\n    * ``DecimalField``\n    * ``BooleanField``\n    * ``DateTimeField``\n    * ``ComplexDateTimeField``\n    * ``ObjectIdField``\n    * ``SequenceField`` (assumes it has integer counter)\n    * ``UUIDField``\n    * ``GeoPointField``\n    * ``GeoJsonBaseField`` (all those fields)\n    * ``DateField``\n\nCompound fields: ``ListField`` and ``DictField`` are mapped to corresponding DRF fields, with respect to nested field specification.\n\nThe ``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)``).\n\nFor ``EmbeddedDocumentField`` also nested serializer autogenerated for non-zero depth, otherwise it is skipped. TODO: THIS IS PROBABLY WRONG AND SHOULD BE FIXED.\n\nGeneric fields ``GenericReferenceField`` and ``GenericEmbeddedDocumentField`` are handled by their own with corresponding serializer fields.\n\nNot well supported or untested:\n\n    ``FileField``\n    ``ImageField``\n    ``BinaryField``\n\nAll other fields are mapped to ``DocumentField`` and probably will work wrong.","properties":{"log_id":{"type":"string","maxLength":25},"title":{"type":"string"},"raw_description":{"type":"object","additionalProperties":{}},"description":{"type":"string"},"html_description":{"type":"string"},"created_by":{"type":"string","readOnly":true},"icon":{"type":"string","readOnly":true},"time_ago":{"type":"string","readOnly":true},"avatar":{"type":"string","readOnly":true}},"required":["avatar","created_by","icon","log_id","time_ago"]}}},"paths":{"/api/activity/log/":{"get":{"operationId":"activity_log_list","description":"API endpoint that allows activity logs to be created, viewed or edited.","tags":["Activity Logs"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivityLog"}}}},"description":""}}}}}}
```

## POST /api/activity/log/

> API endpoint that allows activity logs to be created, viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"Projetly API","version":"1.0.0"},"servers":[{"url":"https://api.app.projetly.io"}],"security":[{"bearerAuth":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained from /api/login/. Pass as: Authorization: Bearer <token>"}},"schemas":{"ActivityLog":{"type":"object","description":"Serializer for Documents.\n\nRecognized primitve fields:\n\n    * ``StringField``\n    * ``URLField``\n    * ``EmailField``\n    * ``IntField``\n    * ``LongField``\n    * ``FloatField``\n    * ``DecimalField``\n    * ``BooleanField``\n    * ``DateTimeField``\n    * ``ComplexDateTimeField``\n    * ``ObjectIdField``\n    * ``SequenceField`` (assumes it has integer counter)\n    * ``UUIDField``\n    * ``GeoPointField``\n    * ``GeoJsonBaseField`` (all those fields)\n    * ``DateField``\n\nCompound fields: ``ListField`` and ``DictField`` are mapped to corresponding DRF fields, with respect to nested field specification.\n\nThe ``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)``).\n\nFor ``EmbeddedDocumentField`` also nested serializer autogenerated for non-zero depth, otherwise it is skipped. TODO: THIS IS PROBABLY WRONG AND SHOULD BE FIXED.\n\nGeneric fields ``GenericReferenceField`` and ``GenericEmbeddedDocumentField`` are handled by their own with corresponding serializer fields.\n\nNot well supported or untested:\n\n    ``FileField``\n    ``ImageField``\n    ``BinaryField``\n\nAll other fields are mapped to ``DocumentField`` and probably will work wrong.","properties":{"log_id":{"type":"string","maxLength":25},"title":{"type":"string"},"raw_description":{"type":"object","additionalProperties":{}},"description":{"type":"string"},"html_description":{"type":"string"},"created_by":{"type":"string","readOnly":true},"icon":{"type":"string","readOnly":true},"time_ago":{"type":"string","readOnly":true},"avatar":{"type":"string","readOnly":true}},"required":["avatar","created_by","icon","log_id","time_ago"]}}},"paths":{"/api/activity/log/":{"post":{"operationId":"activity_log_create","description":"API endpoint that allows activity logs to be created, viewed or edited.","tags":["Activity Logs"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLog"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ActivityLog"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ActivityLog"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLog"}}},"description":""}}}}}}
```

## GET /api/activity/log/{id}/

> API endpoint that allows activity logs to be created, viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"Projetly API","version":"1.0.0"},"servers":[{"url":"https://api.app.projetly.io"}],"security":[{"bearerAuth":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained from /api/login/. Pass as: Authorization: Bearer <token>"}},"schemas":{"ActivityLog":{"type":"object","description":"Serializer for Documents.\n\nRecognized primitve fields:\n\n    * ``StringField``\n    * ``URLField``\n    * ``EmailField``\n    * ``IntField``\n    * ``LongField``\n    * ``FloatField``\n    * ``DecimalField``\n    * ``BooleanField``\n    * ``DateTimeField``\n    * ``ComplexDateTimeField``\n    * ``ObjectIdField``\n    * ``SequenceField`` (assumes it has integer counter)\n    * ``UUIDField``\n    * ``GeoPointField``\n    * ``GeoJsonBaseField`` (all those fields)\n    * ``DateField``\n\nCompound fields: ``ListField`` and ``DictField`` are mapped to corresponding DRF fields, with respect to nested field specification.\n\nThe ``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)``).\n\nFor ``EmbeddedDocumentField`` also nested serializer autogenerated for non-zero depth, otherwise it is skipped. TODO: THIS IS PROBABLY WRONG AND SHOULD BE FIXED.\n\nGeneric fields ``GenericReferenceField`` and ``GenericEmbeddedDocumentField`` are handled by their own with corresponding serializer fields.\n\nNot well supported or untested:\n\n    ``FileField``\n    ``ImageField``\n    ``BinaryField``\n\nAll other fields are mapped to ``DocumentField`` and probably will work wrong.","properties":{"log_id":{"type":"string","maxLength":25},"title":{"type":"string"},"raw_description":{"type":"object","additionalProperties":{}},"description":{"type":"string"},"html_description":{"type":"string"},"created_by":{"type":"string","readOnly":true},"icon":{"type":"string","readOnly":true},"time_ago":{"type":"string","readOnly":true},"avatar":{"type":"string","readOnly":true}},"required":["avatar","created_by","icon","log_id","time_ago"]}}},"paths":{"/api/activity/log/{id}/":{"get":{"operationId":"activity_log_retrieve","description":"API endpoint that allows activity logs to be created, viewed or edited.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["Activity Logs"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLog"}}},"description":""}}}}}}
```

## Gets the activity log with the given id

> This endpoint is used to fetch an activity log for the current organization

```json
{"openapi":"3.0.3","info":{"title":"Projetly API","version":"1.0.0"},"servers":[{"url":"https://api.app.projetly.io"}],"security":[{"bearerAuth":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained from /api/login/. Pass as: Authorization: Bearer <token>"}},"schemas":{"ActivityLog":{"type":"object","description":"Serializer for Documents.\n\nRecognized primitve fields:\n\n    * ``StringField``\n    * ``URLField``\n    * ``EmailField``\n    * ``IntField``\n    * ``LongField``\n    * ``FloatField``\n    * ``DecimalField``\n    * ``BooleanField``\n    * ``DateTimeField``\n    * ``ComplexDateTimeField``\n    * ``ObjectIdField``\n    * ``SequenceField`` (assumes it has integer counter)\n    * ``UUIDField``\n    * ``GeoPointField``\n    * ``GeoJsonBaseField`` (all those fields)\n    * ``DateField``\n\nCompound fields: ``ListField`` and ``DictField`` are mapped to corresponding DRF fields, with respect to nested field specification.\n\nThe ``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)``).\n\nFor ``EmbeddedDocumentField`` also nested serializer autogenerated for non-zero depth, otherwise it is skipped. TODO: THIS IS PROBABLY WRONG AND SHOULD BE FIXED.\n\nGeneric fields ``GenericReferenceField`` and ``GenericEmbeddedDocumentField`` are handled by their own with corresponding serializer fields.\n\nNot well supported or untested:\n\n    ``FileField``\n    ``ImageField``\n    ``BinaryField``\n\nAll other fields are mapped to ``DocumentField`` and probably will work wrong.","properties":{"log_id":{"type":"string","maxLength":25},"title":{"type":"string"},"raw_description":{"type":"object","additionalProperties":{}},"description":{"type":"string"},"html_description":{"type":"string"},"created_by":{"type":"string","readOnly":true},"icon":{"type":"string","readOnly":true},"time_ago":{"type":"string","readOnly":true},"avatar":{"type":"string","readOnly":true}},"required":["avatar","created_by","icon","log_id","time_ago"]}}},"paths":{"/api/activity/log/{module_id}/{reference_id}/":{"get":{"operationId":"activity_log_retrieve_2","description":"This endpoint is used to fetch an activity log for the current organization","summary":"Gets the activity log with the given id","parameters":[{"in":"path","name":"module_id","schema":{"type":"string","pattern":"^\\w+$"},"required":true},{"in":"path","name":"reference_id","schema":{"type":"string","pattern":"^\\w+$"},"required":true}],"tags":["Activity Logs"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLog"}}},"description":""}}}}}}
```

## Track engagement (encrypted)

> Submit engagement tracking event. Set is\_encrypted=True when Angular encrypts sensitive fields (user\_obj.email, recipient\_email).

```json
{"openapi":"3.0.3","info":{"title":"Projetly API","version":"1.0.0"},"servers":[{"url":"https://api.app.projetly.io"}],"security":[{"bearerAuth":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained from /api/login/. Pass as: Authorization: Bearer <token>"}}},"paths":{"/api/activity/log/track/":{"post":{"operationId":"activity_log_track_create","description":"Submit engagement tracking event. Set is_encrypted=True when Angular encrypts sensitive fields (user_obj.email, recipient_email).","summary":"Track engagement (encrypted)","tags":["Activity Logs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"responses":{"201":{"description":"No response body"},"500":{"description":"No response body"}}}}}}
```
