Delete Upload or File
delete
/serviceapi/logan.uploads
Deletes an upload or a file.
Request
Supported Media Types
- application/json
Query Parameters
-
fileName(optional): string
Name of the file to be deleted.
-
forceDelete(optional): boolean
Needs to be set when deleting multiple files with same name in an upload.
-
uploadName: string
Name of the upload.
-
uploadUser(optional): string
Owner of the upload. If not provided, defaults to current user.
Response
Supported Media Types
- application/json
200 Response
Operation succeeded.
400 Response
Bad request. See response body for explanation.
Root Schema : InternalErrorResponse
Type:
Show Source
object
-
messages(optional):
array messages
-
type(optional):
string
Allowed Values:
[ "PARSERERROR", "INVALIDPARAMETER", "UNSUPPORTEDSUBSYSTEM", "UNSUPPORTEDFILTER", "UNSUPPORTEDVERSION", "INVALIDJOBID", "INVALIDQUERYID", "FORBIDDEN", "INTERNALERROR", "JSONERROR", "INTERRUPTEDERROR", "EXECUTIONERROR", "COMPILATIONERROR", "SERVICEAVAILABILITYERROR" ]
-
violations(optional):
array violations
403 Response
Forbidden. User does not have required privileges.
500 Response
Internal server error. See response body for explanation.
Root Schema : InternalErrorResponse
Type:
Show Source
object
-
messages(optional):
array messages
-
type(optional):
string
Allowed Values:
[ "PARSERERROR", "INVALIDPARAMETER", "UNSUPPORTEDSUBSYSTEM", "UNSUPPORTEDFILTER", "UNSUPPORTEDVERSION", "INVALIDJOBID", "INVALIDQUERYID", "FORBIDDEN", "INTERNALERROR", "JSONERROR", "INTERRUPTEDERROR", "EXECUTIONERROR", "COMPILATIONERROR", "SERVICEAVAILABILITYERROR" ]
-
violations(optional):
array violations
Examples
Run the following command to delete the upload with uploadName=SyslogUpload:
curl -u "OMC_USERNAME" -X DELETE -H "Content-Type:application/json" "https://{OMC_URL}/serviceapi/logan.uploads?uploadName=SyslogUpload"
Example of Response
The following shows an example of the response body.
{ "uploadUser":"user", "uploadName":"SyslogUpload", "deletedLogCount":10323, "deletedLogFiles" : 1 }
Example 2: Delete a File
Run the following command to delete the file with uploadName=SyslogUpload and fileName=sys.log:
curl -u "OMC_USERNAME" -X DELETE -H "Content-Type:application/json" "https://{OMC_URL}/serviceapi/logan.uploads?uploadName=SyslogUpload&fileName=sys.log"
Example of Response
The following shows an example of the response body.
{ "uploadUser" : "user", "uploadName" : "SyslogUpload", "fileName" : "sys.log", "deletedLogCount" : 102, "deletedLogFiles" : 1 }