I would make API different here. So that client selects and string as an ID it wants and then server just returns that. Not that server reconstructs the ID from parameters. If you want, you can use random ID, or what this function does, if you think it is good to create potentially long IDs. :-)