iron-io / issues

For Iron.io services issue tracking. Public facing issue tracking for behind the scenes issues.
5 stars 0 forks source link

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

Open dxjones opened 11 years ago

dxjones commented 11 years ago

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]{http://dev.iron.io/worker/reference/api/#list_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 commented 11 years ago

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