You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got below error , when I tried to add policy for API using Product API[1] [2024-07-15 08:30:26,477] ERROR - ApisApiServiceImpl An error has occurred while adding an API specific operation policy org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
Description
Hi All,
I got below error , when I tried to add policy for API using Product API[1]
[2024-07-15 08:30:26,477] ERROR - ApisApiServiceImpl An error has occurred while adding an API specific operation policy org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
[1] https://apim.docs.wso2.com/en/4.2.0/reference/product-apis/publisher-apis/publisher-v4/publisher-v4/#tag/API-Operation-Policies/operation/addAPISpecificOperationPolicy
Steps to Reproduce
Invoke the mentioned [1] REST API ( using below curl command ) to add a policy for API
curl -v -k -H "Authorization: Bearer 6908faa7-78c5-3259-a21c-0fbf7a5fd5a5" -H "Content-Type: multipart/form-data" -F policySpecFile=@setHeader.yaml -F synapsePolicyDefinitionFile=@setHeader.j2 "https://localhost:9443/api/am/publisher/v4/apis/6d47d20e-579f-4b36-9b63-a5ee67c5595f/operation-policies"
Find the sample policyFile & definitionFile here :
sampleFiles.zip
[1] https://apim.docs.wso2.com/en/4.2.0/reference/product-apis/publisher-apis/publisher-v4/publisher-v4/#tag/API-Operation-Policies/operation/addAPISpecificOperationPolicy
Affected Component
APIM
Version
wso2am-4.2.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered: