Uploads

Create a direct upload session for a local file

Upload bridge for clients and AI assistants with local/sandbox files. Creates a short-lived pre-signed upload target. Complete the session to register an opaque source_file artifact ID.

post/api/artifact-uploads

Request

  • Base URL: https://courseprofiler.com
  • URL: https://courseprofiler.com/api/artifact-uploads
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer
    • none

Request body

file_namestring required
content_typestring required
size_bytesinteger required
purpose'course_source' | 'runner_evidence' | 'usrprof_source' | 'generic_source' required

Upload purpose. Use usrprof_source when uploading an existing local .usrprof runner profile; completed source_file artifacts can then be passed through runner.sources or /api/usrprof/imports.

metadataobject

Example request

{
  "file_name": "course.gpx",
  "content_type": "application/gpx+xml"
}

Response

Upload session created

upload_idstring required
status'waiting_for_upload' | 'uploaded' | 'completed' | 'failed' | 'expired' | 'cancelled' required
complete_urlstring
artifact_idstring

Present after completion.

created_atstring date-time
expires_atstring date-time required

Example response

{
  "upload_id": "upl_01JABCDEF",
  "complete_url": "/api/artifact-uploads/upl_01JABCDEF/complete",
  "warnings": [
    {
      "code": "missing_elevation"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.