Hi @Raja ,
Thanks for providing more context.
My first statement was not specific for this set of postman scripts but was in general that the CosmosDB REST API endpoint will work by passing respective headers without worrying about this pre-script as this prescript is creating the required headers.
You are getting this error - "Authorization header doesn't confirm to the required format. Please verify and try again." as I believe you are passing CosmosDB master key directly to authorization header. You need to make sure that to create a proper authorization string in the below format in order to make a REST call -
type={typeoftoken}&ver={tokenversion}&sig={hashsignature}
Example Authorization string -
type=master&ver=1.0&sig=5mDuQBYA0kb70WDJoTUzSBMTG3owkC0/cEN4fqa18/s=
Also, you need to make sure that you are passing the hashed token signature for a ComosDB master key. Hash signature can be constructed using the steps provided over here. The prescript of Postman sample is actually doing the same and thus your requests are passing through.