Hello Midhun,
Please have a look into a blog PI REST Adapter – Using dynamic attributes - it contains details about configuration of REST sender communication channel and mapping, that fulfils your requirement.
Few checks to be verified:
1. In REST sender channel: on "REST resources tab", did you specify URL pattern and mapping from custom attribute to PI dynamic attribute correctly? Variables in URL pattern shall be surrounded by curly brackets. For example, in a URL you provided above, URL custom pattern shall be /Hub/Employee/{employeenumber}, assuming employeenumber is a variable that you then map to a dynamic attribute (based on your description, having identical name).
2. Can you ensure a message gets corresponding custom dynamic attribute created and populated? For a processed message, please check its message attributes in Message Monitor > Message Versions (available by clicking a button "Open Message"). On the tab "Message Attributes", can you see an attribute "employeenumber" and a valid value assigned to it?
Regards,
Vadim