DistributorSongsAssign file by path
Assign audio file to song by path
Moves an audio file from a shared volume path and associates it to an existing song. Requires an admin JWT.
Authorization
BearerAuth Authorization<token>
Type "Bearer" followed by a space and JWT token.
In: header
Request Body
application/json
Request body
song_id*string
source_path*string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/songs/assign-file-by-path" \ -H "Content-Type: application/json" \ -d '{ "song_id": "00000000-0000-0000-0000-000000000000", "source_path": "/app/storage/downloads/song.flac" }'{
"file": {
"created_at": "string",
"duration": 0,
"format": "string",
"id": "string"
},
"status": "File assigned to song successfully"
}{
"error": "Validation failed"
}{
"error": "Validation failed"
}{
"error": "Validation failed"
}{
"error": "Validation failed"
}