I am trying to create a coveragestore and coverage for an S3 based COG GeoTIFF. I can successfully create the coveragestore, but cannot figure out how to create a coverage using that coveragestore. I can create a coverage in the GeoServer UI using this coveragestore, but not through the REST API.
Here is how I create the coveragestore:
curl -u admin:geoserver -X POST "https://mygeoserverhost/geoserver/rest/workspaces/myworkspace/coveragestores" -H "content-type: application/xml" -d '<coverageStore><name>S3_Test</name><type>GeoTIFF</type><enabled>true</enabled><workspace><name>myworkspace</name></workspace><__default__>true</__default__><url>cog://http://mytest.s3.amazonaws.com/max_wse.tif</url><metadata><entry key="CogSettings.Key"><cogSettings><useCachingStream>false</useCachingStream><rangeReaderSettings>HTTP</rangeReaderSettings></cogSettings></entry></metadata></coverageStore>'
To create the coverage, I have tried a bunch of things, and this one seems to get the closest. (It does not return any errors and there are no errors in the GeoServer log - but no coverage is created)
curl -u admin:geoserver -XPOST -H "Content-Type: text/plain" -d "<coverage><name>S3_Test_Layer</name><title>S3_Test_Layer</title></coverage>" "https://mygeoserverhost/geoserver/rest/workspaces/myworkspace/coveragestores/Curl_S3_Test/coverages"