Who can use this?
First, let's make sure you have access to the API and all its endpoints. You will need Manage API keys and API access permissions.
On the user page, select the Access tab. Under Management, select Manage API Keys. Under API access, select Select All.
With your permissions set, navigate to Settings, then click API keys and click on the link "Interactive API documentation can be found here.
A new tab will open and you will see all your API endpoints.
Locate the user ID
First we need to identify the unknown user's user_id so we can use that to locate any work he/she is associated with.
- Click on the very last endpoint, users.
- A list of available parameters will appear. You can locate the user_id with the name or email of the user. Type in the name or email of the unknown user in the appropriate field. In this example we are using the email address.
- Hit "Enter" or click the Try it outbutton at the bottom of the parameter list.
- If you have typed in the name and/or email correctly you will see a result set like this for the unknown user. The user_id we need will be listed at the top of the results next to the parameter "id". Copy this number to your clipboard. We will be using this in the following steps.
Now that you have the user_id we can locate any work that has been imported for this user.
Let's check to see if the unknown user has any commits recorded across any of your imported repos.
- Scroll to the top of your API endpoint list and click on commits,then click the top GET URL. This will open up the list of parameters for the commits endpoint.
- Locate the parameter apex_user_id.It will be towards the bottom of your parameter list. Paste in the user_id you copied in the last section and hit "Enter" or use the Try it out button to run the query.
- If any results appear you can identify what commits the unknown User authored by locating the "external_commit_url". This will take you into your Git host to review the work further. If there are commits for this User the results will look like this.
Success! You found the source of your unknown user. Count is the total number of records/commits found. Hexsha is the commit sha from Git host.
If there were 0 commits found for this user your response will look like this. Move on to the next section Pull requests to continue looking.
If the commit's endpoint did not return any results. Let's continue the search in the pull requestendpoint.
- Locate and click on the pull request endpoint.
- Find the apex_user_idparameter and paste in your user_id and hit "Enter" or use the Try it out button.
- Upon running your query you will either see results or you will not. If 0 PRs were found continue to the next endpoint. If results were found for this unknown user you have identified the origin source for the user.
If you have a ticket integration or use your Git host tickets/issues you can look for your unknown user in the tickets endpoints. Ticket endpoints require an user_alias_id. These are the aliases that have been merged under the apex_user. You should try the apex_user_id and any user_alias_ids to locate tickets, ticket events and/or ticket comments this unknown User may have made.
- Under the user_aliasendpoint locate the apex_userfield and paste the user_id you have been using in the previous steps. Hit "Enter" or click the Try it out button.
- The results will show you all the aliases found for this apex_user. Count is the total number of aliases found for the user. Copy and save all id's for later use. Id is user_alias_id.
- Now that we have all user_alias_ids for our unknown user let's see if we can locate any tickets. Open the tickets endpoint and locate the created_by_id field
- Copy one of the user_alias_ids you saved from Step: 2 and hit "Enter" or Try it out to see if any records are found. Swap out each user_alias_id and try the apex_user_id (the original ID we got at the beginning of this guide). If records are found, great! If not continue on to the next endpoint.
Locate and click on the ticket_eventsendpoint. Find the user_alias_id field and paste in one of your user_alias_ids. You can also utilize the user_alias_id__in field and paste in all your user_alias_id's separated by a comma. This will look for any record across any of the ID's you input. Click Try it out to see the results.
If you have been unsuccessful in locating any data in the above endpoints, continue searching across the remaining endpoints listed below.
I did not find any data for the user
I did not find any data for the user
If you have not find any data in your account for this user, it could be that the data has been deleted/removed from your account. This can happen if the repo or project has been removed from your Flow account. If this the case, you should be able to delete this user as there is no data tying them to your account.You can do this on the User page.
If you need help, please email firstname.lastname@example.org for 24/7 assistance.