Skip to main content
The projects module lists Phoenix projects and assigns existing trace retention policies to them.

Relevant Source Files

  • src/projects/getProjects.ts
  • src/projects/setProjectRetentionPolicy.ts
  • src/types/projects.ts

List Projects

getProjects handles cursor pagination automatically. Use nameContains for a case-insensitive, server-side substring filter.

Assign A Retention Policy

setProjectRetentionPolicy accepts a project name or project GlobalID and the GlobalID of an existing trace retention policy.
You can select the project with projectName, projectId, or the shorthand project. projectId must be the project’s GlobalID. This helper only changes which existing retention policy the project uses. It does not create, read, update, or delete retention policies; policy CRUD is outside the TypeScript client’s projects helper.

Reset To The Default Policy

Pass null as policyId to remove the explicit assignment and return the project to Phoenix’s default retention policy.
Assigning or resetting a retention policy requires an admin when authentication is enabled. Invalid policy GlobalIDs produce a 422 response, while callers without permission receive 403; both are surfaced as HttpError instances by the client.

Source Map

  • src/projects/getProjects.ts
  • src/projects/setProjectRetentionPolicy.ts
  • src/projects/index.ts
  • src/types/projects.ts