Deleting submissions by an author
Text submissions and their results can be deleted by specifying the author whose submissions should be deleted. If no submissions are found when searching using the specified author ID, this API call will not return an error, but will instead say that 0 submissions were deleted.
If a deletion API call for the same author ID is made multiple times the same result will be returned, assuming no submissions with the author ID are made in between. For example, if a deletion request is made and reports that 2 submissions were deleted and the same deletion request is made again, it will still respond that 2 submissions were deleted, along with the timestamp that the original deletion request was processed.
Request
DELETE /VERSION/account/ACCOUNT_ID/author/ID
Parameters:
Parameter | Required? | Format | Description |
---|---|---|---|
version |
Yes | The desired API version. | |
account_id |
Yes | Your API account ID. | |
id |
Yes | Maximum 40 characters (alphanumeric or hyphens) | the ID of the author whose data is to be deleted (the same author ID as specified by author_id when uploading a submission). |
Response
Success
HTTP status code: 200
Example response body JSON:
{
"type":"success","code":200,"submissions_deleted":2,"timestamp":"2018-09-11T11:15:14Z"
}
Attribute name | Format | Description |
---|---|---|
type |
always "success" | |
code |
always 200 | |
submissions_deleted |
Integer | The number of submissions deleted. An integer >= 0. It will be 0 if no submissions were found containing the specified author ID. |
timestamp |
UTC timestamp string in ISO-8601 format | The time when the deletion request was processed. |
Failure
The request can fail if the author ID format is invalid.
HTTP status code: 400
Example response body JSON:
{"type": "error", "code": 400, "message": "id too long"}
type
is always "error". The message
attribute value can vary depending on the specific error as shown by the examples below.
Error | Code | Example message |
---|---|---|
Length limit is exceeded for author ID. | 400 |
"id too long" |
Invalid format for author ID. | 400 |
"id must only contain alphanumerics and hyphens" |