If PUT and DELETE operations can be performed on a profile resource by passing either profileId or profileName (both are unique), what is the right way to form URLs?
I want to support both update and delete operations on a profile resource when sending the profileId and support both update and delete operations on a profile resource when sending the profileName.
When sending the profileId, the URL for performing PUT operations would look like:
/api/profiles/{profileId}
How would the URL look like when sending the profileName? Should the profileName be sent as a query parameter?
/api/profiles?profileName=uniqueProfileName
Or is there any better way to handle this scenario?