dambel

دمبل

shevron
ورود | ثبت نام

API Docs / tracker / shares / index



GET /api/v1/tracker/shares

Retrieve a list of shared tracker configurations.


Permissions

PermissionDescription
shared_trackers.viewView shared trackers

Query Parameters

NameTypeRequiredDescription
user_idintegerNoFilter by user ID (person sharing the tracker)
viewer_user_idintegerNoFilter by viewer user ID (person the tracker is shared with)
start_datestringNoFilter by start date (YYYY-MM-DD format)
end_datestringNoFilter by end date (YYYY-MM-DD format)
include_wakeupbooleanNoFilter by whether wakeup data is included
include_weightbooleanNoFilter by whether weight data is included
include_waterbooleanNoFilter by whether water intake data is included
include_sleepbooleanNoFilter by whether sleep data is included
include_supplementbooleanNoFilter by whether supplement data is included
include_mealbooleanNoFilter by whether meal data is included
include_workoutbooleanNoFilter by whether workout data is included
searchstringNoSearch in description field
pageintegerNoPage number for pagination (default: 1)
per_pageintegerNoNumber of items per page (default: 100)

Response

200 OK

<shared tracker resource collection>

Error Responses

StatusError TypeReference
401UnauthorizedAuthentication error
403ForbiddenPermission error

Example Request

curl -X GET "https://api.example.com/api/v1/tracker/shares?user_id=123&include_wakeup=true&search=workout" \
  -H "Authorization: Bearer {token}"

Example Response

{
  "data": [
    <shared tracker resource>
  ],
  "current_page": 1,
  "per_page": 100,
  "total": 1
}

See Shared Tracker Resource for the complete resource structure.


Notes

  • Users can only see shared trackers where they are either the owner (user_id) or the viewer (viewer_user_id)
  • Results are ordered by creation date (newest first)
  • The response includes pagination information
  • Boolean filters work with true/false values
  • Date filters use the format YYYY-MM-DD
  • Search is performed on the description field using partial matching
footer wave
logo

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutube