Skip to content

[Foxx] Foxx API Updates: Update Repository and Allocation Endpoints for Type Support #1515

@AronPerez

Description

@AronPerez

Description

As a backend developer, I want to update the Foxx API endpoints to support repository types and the new allocation response format so that metadata-only repositories can execute allocations synchronously without creating tasks.

Response Format Changes

New Allocation Response Format:

// For metadata-only repositories (direct execution)
{
  "execution_method": "direct",
  "result": {
    "allocation": { /* allocation data */ }
  }
}

// For Globus repositories (task execution)
{
  "execution_method": "task",
  "task": { /* task data */ }
}

Data Transfer Error for Metadata-Only:

{
  "error": "ERR_INVALID_OPERATION",
  "message": "Data transfers not supported for metadata-only repository",
  "repo_type": "metadata_only",
  "repo_id": "repo/repo_dev_01"
}

Acceptance Criteria

  • Update POST /api/repo/create to require and validate the 'type' field
  • Modify repository creation logic to store type in database
  • Update GET /api/repo/alloc/create to return new response format
  • Update GET /api/repo/alloc/delete to return new response format
  • Implement direct (synchronous) allocation for metadata-only repositories
  • Maintain task-based allocation for Globus repositories
  • Add repository type checking to data transfer endpoints (PUT/GET)
  • Return appropriate errors for unsupported operations on metadata-only repos

Resources

  • Engineering Design Document: spec.md - API Changes section
  • Current endpoints:
    • Repository creation: core/database/foxx/api/repo_router.js:100
    • Allocation create: core/database/foxx/api/repo_router.js:659
    • Allocation delete: core/database/foxx/api/repo_router.js:709
  • Data router: core/database/foxx/api/data_router.js

Dependencies

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions