4.3.5.5 Delete files using a prefix value

Delete files from the object store, using a prefix value as the reference.

To delete files using a prefix value:
  1. Open a relevant tool, such as via cURL command.
  2. Prepare a cURL command with the authentication token and other details. For more information refer to the following code.

    Syntax

    curl -k --location --request POST 'https://<hostname>/<TENANT-ID>/utils-service/v1/file/deleteprefix/<prefix_value>
    --header 'ofs_remote_user: <USERID>' \
    --header 'locale: en-US' \
    --header 'ofs_tenant_id: <TENANT-ID>' \
    --header 'ofs_workspace_id: WS001' \
    --header 'content-type: application/json' \
    --header 'Authorization: Bearer <TOKEN>'
    Example (truncated)
    curl -k --location --request POST 'https://<hostname>/<TENANT-ID>/utils-service/v1/file/deleteprefix/prefixvalue1
    --header 'ofs_remote_user: cneadmin' \
    --header 'locale: en-US' \
    --header 'ofs_tenant_id: aaitestdev1001-prd' \
    --header 'ofs_workspace_id: WS001' \
    --header 'content-type: application/json' \
    --header 'Authorization: Bearer eyJ4NXQjUzI1NiI6Ildia25rQUR5TUZIMlhlQ1pKcTY1c3o4VzdEVWhKa0s4MldYY0hadk4wWkkiLCJ4
    ...
    ...
    sQXj0iohsSIEmQXVwwjhhqnc4eJNnmCjx8Tb7TXjx1MIQLeOIcfrIj5gkzoMKX94_7USxHv-6LhBzw'
    Response
    {"payload":"Files Deleted Successfully"}