Skip to content

POST Codes should return ID (similar behaviour to POST Messages) #40

dxjones opened this Issue Jan 2, 2013 · 1 comment

2 participants

dxjones commented Jan 2, 2013

The REST API has some inconsistencies that should get cleaned up.

Here is one example: POST Messages vs POST Codes

With IronMQ, when you add a message to a queue,
the HTTP response includes the ID of the message.

POST /projects/{Project ID}/queues/{Queue Name}/messages
HTTP Response =
  "ids": ["message 1 ID", "message 2 ID"],
  "msg": "Messages put on queue."

With IronWorker, when you add new code,
the HTTP response does not include the ID of the code.

POST /projects/{Project ID}/codes
HTTP Response =
    "msg": "Upload successful."

There is no reason for the ID to be omitted.

It is difficult, in fact, to obtain the ID of the code you just uploaded.
You can start by [getting a list of code packages]{},
but then you need to scan through the list to find the package you just uploaded.

The fix? POST Codes should return the ID.

@treeder member
treeder commented Jan 3, 2013

Ya, that makes sense. I've added it to our list and will update here when it's available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.