R4

List Projects

Retrieves a list of all non-archived projects accessible to your API key.

GET /api/v1/machine/project

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour API key

Response

Success (200 OK)

{
  "projects": [
    {
      "id": "507f1f77bcf86cd799439014",
      "name": "Production Infrastructure",
      "externalId": "PROJ-001",
      "description": "Contains all production environment resources",
      "vaultsCount": 5,
      "licensesCount": 12,
      "licenseGroupsCount": 3,
      "archivedAt": null
    },
    {
      "id": "507f1f77bcf86cd799439015",
      "name": "Development Environment",
      "externalId": "PROJ-002",
      "description": "Development and testing resources",
      "vaultsCount": 2,
      "licensesCount": 4,
      "licenseGroupsCount": 1,
      "archivedAt": null
    }
  ]
}

Response Fields

FieldTypeDescription
projectsarrayArray of project objects
projects[].idstringThe unique identifier of the project
projects[].namestringThe name of the project
projects[].externalIdstring | nullOptional external identifier for integration
projects[].descriptionstring | nullA description of the project
projects[].vaultsCountnumberNumber of vaults associated with the project
projects[].licensesCountnumberNumber of licenses (internal + manual) associated
projects[].licenseGroupsCountnumberNumber of license groups associated
projects[].archivedAtstring | nullISO 8601 timestamp when archived (null if active)

Error Responses

401 Unauthorized - Invalid or missing API key

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing API key. Please provide your API key in the X-API-Key header."
  }
}

Example Request

curl -X GET "https://r4.dev/api/v1/machine/project" \
  -H "X-API-Key: rk_abc123def456.ghijklmnopqrstuvwxyz1234567890abcdef"

Use Cases

  • Project inventory: List all projects for dashboards or reports
  • Automation: Programmatically discover projects for automation scripts
  • Integration: Sync project metadata with external systems
  • Auditing: Review project configurations across your organization