# Getting 504 Gateway Time-out when updating a collection

**URL:** <https://community.postman.com/t/getting-504-gateway-time-out-when-updating-a-collection/51399>\
**Category:** Help Hub\
**Tags:** collections\
**Created:** [September 5, 2023, 9:45pm UTC](https://community.postman.com/t/getting-504-gateway-time-out-when-updating-a-collection/51399 "2023-09-05T21:45:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philip-ellis](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@philip-ellis](https://community.postman.com/u/philip-ellis)\
**Post date:** [September 5, 2023, 9:45pm UTC](https://community.postman.com/t/getting-504-gateway-time-out-when-updating-a-collection/51399/1 "2023-09-05T21:45:31Z")

</div>

I am running a script that generates the postman collection from an open API specification using the openapi-to-postmanv2 script and then pushing the collection to postman via API.

When running the postman PUT operation for updating a collection:

```auto
https://api.getpostman.com/collections/

```

I am consistently getting a 504 Gateway Time-out message. The collection is quite large, so it takes a while to process, but I’m wondering if there is any way around this? Right now the only option I have is to delete the collection and re-add it, but then the ID changes which is not really ideal.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 6, 2023, 2:39pm UTC](https://community.postman.com/t/getting-504-gateway-time-out-when-updating-a-collection/51399/2 "2023-09-06T14:39:00Z")

</div>

Hey @philip-ellis 👋

Welcome to the Postman Community! :postman:

I don’t think that there is currently a simple solution for this - It is something that we are researching, to hopefully provide an easier way of doing this and avoiding the timeouts.

We do have these [endpoints](https://www.postman.com/postman/workspace/postman-public-workspace/collection/16473433-f2f0cb8f-609d-443f-913c-9831187c326e) on the Postman API that allow you to update individual items in the collections but I’m not sure that this is going to be what you’re after.

If you do use/try out the endpoints mentioned above, you’re going to need to use the `Accept:application/vnd.postman.v2+json` header in the request.

---

<div class="post-metadata">

**Author:** ![philip-ellis](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@philip-ellis](https://community.postman.com/u/philip-ellis)\
**Post date:** [September 6, 2023, 3:13pm UTC](https://community.postman.com/t/getting-504-gateway-time-out-when-updating-a-collection/51399/3 "2023-09-06T15:13:01Z")

</div>

Yes I think the amount of effort that would have to go into using the endpoints API would be prohibitive. Hopefully in the future they will make some kind of async endpoint that can be employed to update large specifications. For now I think I will just go the route of deleting and re-uploading a new one.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [September 9, 2023, 3:13pm UTC](https://community.postman.com/t/getting-504-gateway-time-out-when-updating-a-collection/51399/4 "2023-09-09T15:13:43Z")

</div>

Closed on September 9, 2023, 3:13pm UTC

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