Remove an image
DELETE
/api/v1/activities/{activityId}/images/{imageId}
const url = 'http://localhost:8080/api/v1/activities/activity-9756441741/images/activityImage-0a8cdfbb-63b4-4f0f-a09d-faedd5a00753';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://localhost:8080/api/v1/activities/activity-9756441741/images/activityImage-0a8cdfbb-63b4-4f0f-a09d-faedd5a00753 \ --header 'Authorization: Bearer <token>'Removes the image from the activity and deletes the file.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”activityId
required
string
The prefixed activity identifier, activity- included.
imageId
required
string
The prefixed image identifier, activityImage- included, as listed in the activity’s images.
Responses
Section titled “Responses”The image was removed.
The Authorization header was missing, malformed, or did not match the configured key.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Examples
ExampleinvalidToken
{ "error": "invalid_token", "message": "A valid API token is required. Send it in the Authorization header as a Bearer token."}Headers
Section titled “Headers”WWW-Authenticate
string
The activity does not exist, or the image is not one of its images.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Examples
No such activity
{ "error": "not_found", "message": "Activity \"activity-1\" not found"}No such image on this activity
{ "error": "not_found", "message": "Image \"activityImage-0a8cdfbb-63b4-4f0f-a09d-faedd5a00753\" not found"}This instance runs with IMPORT_MODE=stravaApi
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Examples
ExamplewrongImportMode
{ "error": "import_mode_not_files", "message": "Images can only be removed from activities when running in file import mode."}