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

# User Activity

## Get the current user's activity single pane

> Aggregates the authenticated user's recent activity for one or more registered projects\
> &#x20;       (each repositoryIdentifier must be a registered project; unregistered repos are rejected with 400):\
> &#x20;       \- Open PRs, plus recently merged / closed / in-review PRs (from the review-status cache)\
> &#x20;       \- Review environments attached to those PRs\
> &#x20;       \- Build status of recently merged PRs (from the builds-v2 cache)\
> &#x20;       \- Dev sandboxes currently held by the user (across all pools)\
> \
> &#x20;       Identity is resolved from linked git provider identities (DR 018). When none is linked, pass\
> &#x20;       githubUsername / adoUsername, otherwise the PR sections return empty with a hint. All reads are\
> &#x20;       served from cache and never trigger a cold rebuild.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.40.2"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"UserActivityDto":{"type":"object","properties":{"identity":{"description":"Resolved identity for the caller","allOf":[{"$ref":"#/components/schemas/UserActivityIdentityDto"}]},"repositories":{"description":"Per-repository activity for the caller","type":"array","items":{"$ref":"#/components/schemas/RepositoryActivityDto"}},"devEnvironments":{"description":"Dev sandboxes currently held by the caller","type":"array","items":{"$ref":"#/components/schemas/DevEnvironmentHoldDto"}},"generatedAt":{"type":"string","description":"When this snapshot was generated (ISO 8601)"}},"required":["identity","repositories","devEnvironments","generatedAt"]},"UserActivityIdentityDto":{"type":"object","properties":{"email":{"type":"string","description":"Authenticated account email"},"providerLinked":{"type":"boolean","description":"Whether a git provider username could be resolved"},"usernames":{"description":"Resolved git provider usernames","allOf":[{"$ref":"#/components/schemas/UserActivityUsernamesDto"}]},"source":{"type":"string","enum":["linked","session","override","mixed","none"],"description":"Where the resolved usernames came from ('session' = derived from the social-auth login)"},"hint":{"type":"string","description":"Guidance shown when no provider identity could be resolved"}},"required":["email","providerLinked","usernames","source"]},"UserActivityUsernamesDto":{"type":"object","properties":{"github":{"type":"string","description":"Resolved GitHub username"},"azureDevops":{"type":"string","description":"Resolved Azure DevOps username"},"gitlab":{"type":"string","description":"Resolved GitLab username"}}},"RepositoryActivityDto":{"type":"object","properties":{"repositoryIdentifier":{"type":"string","description":"Repository identifier"},"stale":{"type":"boolean","description":"True when no review-status cache exists for this repo (PRs may be incomplete)"},"pullRequests":{"description":"The user's PRs in this repo","allOf":[{"$ref":"#/components/schemas/PullRequestActivityBucketsDto"}]},"reviewEnvironments":{"description":"Review environments on the user's PRs","type":"array","items":{"$ref":"#/components/schemas/ReviewEnvironmentRefDto"}}},"required":["repositoryIdentifier","stale","pullRequests","reviewEnvironments"]},"PullRequestActivityBucketsDto":{"type":"object","properties":{"open":{"description":"Open PRs authored by the user","type":"array","items":{"$ref":"#/components/schemas/PrActivityDto"}},"inReview":{"description":"Open PRs whose checks have not concluded successfully","type":"array","items":{"$ref":"#/components/schemas/PrActivityDto"}},"mergedRecently":{"description":"Recently merged PRs (within the review cache window)","type":"array","items":{"$ref":"#/components/schemas/PrActivityDto"}},"closedRecently":{"description":"Recently closed (unmerged) PRs","type":"array","items":{"$ref":"#/components/schemas/PrActivityDto"}}},"required":["open","inReview","mergedRecently","closedRecently"]},"PrActivityDto":{"type":"object","properties":{"issueTitle":{"type":"string","description":"Title of the pull request"},"issueUrl":{"type":"string","description":"Link to the pull request on GitHub"},"number":{"type":"number","description":"Pull request number"},"branch":{"type":"string","description":"Source branch name of the PR"},"baseBranch":{"type":"string","description":"Target branch name of the PR"},"author":{"type":"string","description":"Author login of the pull request"},"authorAvatarUrl":{"type":"string","description":"Author avatar URL"},"labels":{"description":"Labels attached to the pull request","type":"array","items":{"$ref":"#/components/schemas/LabelDto"}},"elapsedTime":{"type":"number","description":"Time elapsed since PR creation in milliseconds"},"merged":{"type":"boolean","description":"Whether the PR has been merged"},"headSha":{"type":"string","description":"Full SHA of the head (source branch tip) commit"},"mergeCommitSha":{"type":"object","description":"SHA of the merge commit if PR is merged"},"files":{"description":"Files changed in the pull request","allOf":[{"$ref":"#/components/schemas/FilesChangedDto"}]},"commitsAhead":{"type":"number","description":"Number of commits ahead of the base branch"},"commitsBehind":{"type":"number","description":"Number of commits behind the base branch"},"metadata":{"description":"Salesforce metadata changes organized by package","allOf":[{"$ref":"#/components/schemas/SalesforceMetadataDto"}]},"reviewEnvironment":{"description":"Review environment details for this pull request","allOf":[{"$ref":"#/components/schemas/ReviewEnvironmentDetailDto"}]},"error":{"type":"object","description":"Error message if the PR failed to process, null if no error occurred"},"buildActionLink":{"type":"string","description":"Link to the build action run"},"checkStatus":{"type":"string","description":"Status of the checks (queued, in_progress, completed)"},"checkConclusion":{"type":"string","description":"Conclusion of the checks (success, failure, neutral, cancelled, skipped, timed_out, action_required)"},"validationActionLink":{"type":"string","description":"Link to the validation action run"},"build":{"description":"Build status (attached to merged PRs only)","allOf":[{"$ref":"#/components/schemas/PrBuildStatusDto"}]}},"required":["issueTitle","issueUrl","number","branch","baseBranch","author","authorAvatarUrl","elapsedTime","merged","headSha"]},"LabelDto":{"type":"object","properties":{"key":{"type":"string","description":"Label key/name"},"description":{"type":"object","description":"Label description"},"color":{"type":"string","description":"Label color hex code"}},"required":["key"]},"FilesChangedDto":{"type":"object","properties":{"added":{"description":"List of files added in the PR","type":"array","items":{"type":"string"}},"deleted":{"description":"List of files deleted in the PR","type":"array","items":{"type":"string"}},"modified":{"description":"List of files modified in the PR","type":"array","items":{"type":"string"}}},"required":["added","deleted","modified"]},"SalesforceMetadataDto":{"type":"object","properties":{}},"ReviewEnvironmentDetailDto":{"type":"object","properties":{"orgId":{"type":"string","description":"Salesforce org ID of the review environment"},"username":{"type":"string","description":"Username to access the review environment"},"browserLoginUrl":{"type":"string","description":"Browser-accessible codev login URL that serves as a gateway proxy authenticator. Once authenticated, allows user access to the Salesforce org."},"apiAuthUrl":{"type":"string","description":"Server-side API endpoint that returns the actual Salesforce frontdoor URL with session token for programmatic access."},"type":{"type":"string","description":"Type of environment: scratchorg or sandbox"},"branch":{"type":"string","description":"Branch associated with the environment"},"pool":{"type":"string","description":"Pool that the environment belongs to"},"environmentName":{"type":"string","description":"Environment name/identifier"},"status":{"type":"string","description":"Current status of the environment"},"isActive":{"type":"boolean","description":"Whether the environment is currently active"},"name":{"type":"string","description":"Name identifier of the environment"},"issue":{"type":"string","description":"Issue/PR number associated with the environment"},"loginUrl":{"type":"string","description":"Direct Salesforce login URL"},"expiryDate":{"type":"string","description":"Expiry date of the environment (for scratch orgs)"},"assignedAt":{"type":"number","description":"Timestamp when environment was assigned to the PR"},"createdAt":{"type":"number","description":"Timestamp when environment was created (for sandboxes)"},"isImmortal":{"type":"boolean","description":"Whether the environment is immortal (for sandboxes)"}}},"PrBuildStatusDto":{"type":"object","properties":{"commitId":{"type":"string","description":"Commit the build ran against"},"overallState":{"type":"string","description":"Headline state rolled up across domains"},"ciService":{"type":"string","description":"CI service identifier"},"buildUrl":{"type":"string","description":"URL to the CI build/run"},"buildNumber":{"type":"string","description":"Build number or ID"},"lastUpdatedAt":{"type":"string","description":"Last update timestamp of the build"},"domains":{"description":"Per-domain build states","type":"array","items":{"$ref":"#/components/schemas/PrBuildDomainStateDto"}}},"required":["commitId","overallState","domains"]},"PrBuildDomainStateDto":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name"},"state":{"type":"string","description":"Per-domain build state"}},"required":["domain","state"]},"ReviewEnvironmentRefDto":{"type":"object","properties":{"orgId":{"type":"string","description":"Salesforce org ID of the review environment"},"username":{"type":"string","description":"Username to access the review environment"},"browserLoginUrl":{"type":"string","description":"Browser-accessible codev login URL that serves as a gateway proxy authenticator. Once authenticated, allows user access to the Salesforce org."},"apiAuthUrl":{"type":"string","description":"Server-side API endpoint that returns the actual Salesforce frontdoor URL with session token for programmatic access."},"type":{"type":"string","description":"Type of environment: scratchorg or sandbox"},"branch":{"type":"string","description":"Branch associated with the environment"},"pool":{"type":"string","description":"Pool that the environment belongs to"},"environmentName":{"type":"string","description":"Environment name/identifier"},"status":{"type":"string","description":"Current status of the environment"},"isActive":{"type":"boolean","description":"Whether the environment is currently active"},"name":{"type":"string","description":"Name identifier of the environment"},"issue":{"type":"string","description":"Issue/PR number associated with the environment"},"loginUrl":{"type":"string","description":"Direct Salesforce login URL"},"expiryDate":{"type":"string","description":"Expiry date of the environment (for scratch orgs)"},"assignedAt":{"type":"number","description":"Timestamp when environment was assigned to the PR"},"createdAt":{"type":"number","description":"Timestamp when environment was created (for sandboxes)"},"isImmortal":{"type":"boolean","description":"Whether the environment is immortal (for sandboxes)"},"prNumber":{"type":"number","description":"PR number this review environment is assigned to"},"repositoryIdentifier":{"type":"string","description":"Repository the PR belongs to"}},"required":["prNumber","repositoryIdentifier"]},"DevEnvironmentHoldDto":{"type":"object","properties":{"poolTag":{"type":"string","description":"Pool the sandbox belongs to"},"sandboxName":{"type":"string","description":"Salesforce sandbox name"},"status":{"type":"string","description":"Instance status"},"instanceUrl":{"type":"string","description":"Salesforce instance URL"},"repositoryIdentifier":{"type":"string","description":"Repository the pool is scoped to"},"assignedAt":{"type":"string","description":"When the sandbox was assigned to the user"},"expiresAt":{"type":"string","description":"When the assignment expires"},"isImmortal":{"type":"boolean","description":"Whether the sandbox bypasses automatic expiration"}},"required":["poolTag","sandboxName","status"]}}},"paths":{"/sfp/api/users/me/activity":{"get":{"operationId":"UserActivityController_getMyActivity","summary":"Get the current user's activity single pane","description":"Aggregates the authenticated user's recent activity for one or more registered projects\n        (each repositoryIdentifier must be a registered project; unregistered repos are rejected with 400):\n        - Open PRs, plus recently merged / closed / in-review PRs (from the review-status cache)\n        - Review environments attached to those PRs\n        - Build status of recently merged PRs (from the builds-v2 cache)\n        - Dev sandboxes currently held by the user (across all pools)\n\n        Identity is resolved from linked git provider identities (DR 018). When none is linked, pass\n        githubUsername / adoUsername, otherwise the PR sections return empty with a hint. All reads are\n        served from cache and never trigger a cold rebuild.","parameters":[{"name":"githubUsername","required":false,"in":"query","description":"GitHub username override","schema":{"type":"string"}},{"name":"adoUsername","required":false,"in":"query","description":"Azure DevOps username override","schema":{"type":"string"}}],"responses":{"200":{"description":"Activity retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActivityDto"}}}},"400":{"description":"Missing repositoryIdentifier, an unregistered project, or an unresolvable user email"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden - Requires role: owner, member"}},"tags":["User Activity"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp-server/api-reference/user-activity.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
