Discussions

Ask a Question
Back to all

Getting all profile data

Hi all,

Is anyone able to successfully send a POST to get all athletes back when hitting the /v1/getprofilesearch endpoint listed in the page below?

https://docs.ams.teamworksapp.com/reference/v1getprofiledata

I've tried a couple scenarios:

  1. I've been using a user id list of all users tracked in AMS, however AMS returns an error when user ids that are not within the form are sent in the payload.

  2. I've tried sending empty userIDs payloads like so:

    Example 1:
    {
    "formNames": [
    "My_test_profile"
    ],
    "userIds": []
    }

    Example 2
    {
    "formNames": [
    "My_test_profile"
    ]
    }

    Both of which are returning just an empty responses
    {}


Any advice on this? Seems like the docs are contradictory -> On the API docs it says

Both formNames and userIds are optional — omitting either returns data across all forms or all users respectively.

then proceeds to say


userIds
array of integers
List of user IDs to return profile data for. Must contain at least one ID.


Would love any advice.

Cheers