0

I am trying to send POST request via curl command which has a variable and the variable is having an escape character like this

curl -r POST 'https://<url>/admin/v1/Apps/.search' --header 'Content-Type: application/json' --header "Authorization: Bearer $ACCESS_TOKEN" --data '{"schemas": ["urn:ietf:params:scim:api:messages:2.0:SearchRequest"],"attributes": ["displayName", "certificates"],"filter":"displayName eq \"$CLIENT_NAME\"","startIndex": 1,"count": 10}'

Here the value of $ACCESS_TOKEN gets changed but the value of CLIENT_NAME is not replacing. But in the same request if i use the actual value of CLIENT_NAME then it works fine.

Please let me know how to handle this scenario

Shubhro
  • 11
  • 2
  • What shell is it? Bash or similar maybe? Your `$CLIENT_NAME` is single-quoted. [The outer quotes matter](https://superuser.com/q/1404244/432690). This is not an answer because I'm not sure what shell you're using. – Kamil Maciorowski Nov 24 '21 at 18:16

0 Answers0