# Deleting file with binary-api throws 404 not found

**URL:** <https://community.cumulocity.com/t/deleting-file-with-binary-api-throws-404-not-found/2280>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [December 1, 2022, 11:12am UTC](https://community.cumulocity.com/t/deleting-file-with-binary-api-throws-404-not-found/2280 "2022-12-01T11:12:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasH](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@thomasH](https://community.cumulocity.com/u/thomasH)\
**Post date:** [December 1, 2022, 11:12am UTC](https://community.cumulocity.com/t/deleting-file-with-binary-api-throws-404-not-found/2280/1 "2022-12-01T11:12:29Z")

</div>

Hi im trying to delete a .png file with the help of the binaries-API using Postman…  
While the almost similar structured request “[GET] → Retrieve a stored File” is working properly and is carrying the file within the response.  
The “[DELETE] → Remove a stored File” request executed with the same managedObjectID returns with a 404 - not found.

#### What product/components do you use and which version/fix level are you on?

Postman Version 7.36.7

#### Is your question related to the free trial, or to a production (customer) instance?

Customer

#### What are you trying to achieve? Please describe it in detail.

Delete File with the binaries-API

#### Do you get any error messages? Please provide a **full error** message screenshot and log file.

404 not found

#### Have you installed all the latest fixes for the products and systems you are using?

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [December 1, 2022, 11:34am UTC](https://community.cumulocity.com/t/deleting-file-with-binary-api-throws-404-not-found/2280/2 "2022-12-01T11:34:18Z")

</div>

Which tenant and which binary?

---

<div class="post-metadata">

**Author:** ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)\
**Post date:** [December 1, 2022, 2:14pm UTC](https://community.cumulocity.com/t/deleting-file-with-binary-api-throws-404-not-found/2280/3 "2022-12-01T14:14:51Z")

</div>

@thomasH  
Can you post the whole URL of GET and DELETE including the id you wanted to delete?  
I guess there either something wrong in the url, id or in the headers.

For me it is working fine. DELETE gives me 204 when deleting a binary:  
Example:

```auto
DELETE {{url}}/inventory/binaries/241031
Response: 204 No Content

```

---

<div class="post-metadata">

**Author:** ![thomasH](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@thomasH](https://community.cumulocity.com/u/thomasH)\
**Post date:** [December 2, 2022, 8:04am UTC](https://community.cumulocity.com/t/deleting-file-with-binary-api-throws-404-not-found/2280/4 "2022-12-02T08:04:07Z")

</div>

Tenent: t1340861817  
Filename: avatar-14128.png  
ManagedObjectID: 560682

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [December 2, 2022, 9:26am UTC](https://community.cumulocity.com/t/deleting-file-with-binary-api-throws-404-not-found/2280/5 "2022-12-02T09:26:47Z")

</div>

Deleted successfully for me, just turning the GET into a DELETE.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/5/4/5498b0ff8cf8a2b9320a0e7236e9157ced05b497.png)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [May 31, 2023, 9:27am UTC](https://community.cumulocity.com/t/deleting-file-with-binary-api-throws-404-not-found/2280/6 "2023-05-31T09:27:10Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
