new resources defined in rest api doesn't get synced in wso2 api manger and when I call the resource face 404 not found error,what is the problem?
Asked
Active
Viewed 159 times
0
-
What is the API Manager version you're using? API Manager 4.0.0 onward you need to create a new revision and deploy it to the gateway. – Binod Karunanayake Jan 31 '23 at 09:20
-
I use 3.2.0 version – Ali farahzadi Jan 31 '23 at 09:30
-
Is the new resource available when referring your API in Devportal? If not you have not saved the changes properly. If it's available check deployed artifacts using https://apim.docs.wso2.com/en/3.2.0/develop/product-apis/gateway-apis/gateway-v1/gateway-v1/#tag/Get-API-Artifacts. – Binod Karunanayake Jan 31 '23 at 09:46
-
the new resource is available in Devportal and main problem is the resource doesn't synced and updated in /lib64/wso2/wso2am/3.2.0/repository/deployment/server/synapse-configs/default/api – Ali farahzadi Jan 31 '23 at 10:00
-
Can you provide more details on your deployment? Do you have a separate GW instance? – ycr Jan 31 '23 at 12:22
-
I used this documentation : https://apim.docs.wso2.com/en/3.2.0/install-and-setup/setup/single-node/configuring-an-active-active-deployment/ – Ali farahzadi Jan 31 '23 at 12:31
1 Answers
0
You need to explain a little bit on your process here. If you are using APIM latest version (4.0.0 or 4.1.0), we have decoupled API Publishing and deploy in the gateway in to two. All the runtime changes you have added to the API (Endpoints, mediations, resource changes) will not be synced with API update, but you need to create a new revision and deploy that revision in the gateway.
If you have already created a revision and deployed, yet still resource is not accessible, then you need to investigate the CP and gateway connectivity, or gateway deployed artifacts.
You can check the deployed artifacts with Gateway rest API.

Lakshitha
- 1,021
- 1
- 6
- 15
-
I actually add a new resource to existing rest api and new resource doesn't get updated in synapse-configs and I can't call the resource. I use redeploy in life cycle and doesn't change anything.I use api manager 3.2.0 version – Ali farahzadi Jan 31 '23 at 09:37
-
-
-
How about demoting it to created and then publishing? Shall we try that? – Lakshitha Jan 31 '23 at 10:07
-
-
Even if you demote it to created, was the artifact undeployed and removed from the file system? – Lakshitha Jan 31 '23 at 10:53
-
-
This means there is a problem connecting with the gateway. Is this a distributed setup? Can you share your deplyoment.toml config and an overview of deployment architecture? – Lakshitha Jan 31 '23 at 13:06
-
Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/251519/discussion-between-lakshitha-and-ali-farahzadi). – Lakshitha Jan 31 '23 at 13:59