I'm using Geoserver REST API to create a new PostGIS feature type in Geoserver doing a POST to an url following this pattern
and passing it data like this:
The post effectively create the feature type but is returning a 500 code error which mean:
Internal server error.
According to the official doc the returned code is supposed to be 201.
Looking in Geoserver log show me the following error:
INFO [org.geoserver] - Loaded feature type 'my_featuretype_name', enabled
ERROR [geoserver.rest] - :Resource named 'my_featuretype_name' already exists in store: 'my_ds'
The table already exist in my database but is not published as a layer in Geoserver.
What I want to do is to reproduce, with the REST API, the exact same action of clicking publish for an existing table in my database in the add new layer page of the Geoserver Web admin.
Am I doing something wrong?
Thanks a lot