Fedora 6.x.x introduced the concept of "ghost nodes". These are URI path segments that do not resolve to a resource on their own.
For example, in a new empty repository:
curl -v -XPUT http://localhost:8080/rest/ghost/path/object
would create a single resource at the path /rest/ghost/path/object
The paths http://localhost:8080/rest/ghost and http://localhost:8080/rest/ghost/path both return a 404 Not Found for requests.
> curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/ghost HTTP/1.1 404 Not Found Date: Mon, 10 Apr 2023 18:01:30 GMT Set-Cookie: JSESSIONID=node0evxhuptudzd010yslilwp5pu010.node0; Path=/ Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 09-Apr-2023 18:01:30 GMT; SameSite=lax Content-Type: text/turtle;charset=utf-8 Content-Length: 32 Server: Jetty(9.4.44.v20210927) Error: Resource /ghost not found > curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/ghost/path HTTP/1.1 404 Not Found Date: Mon, 10 Apr 2023 17:57:18 GMT Set-Cookie: JSESSIONID=node01jeiv46h6xn6h1peerv0d3zp5l5.node0; Path=/ Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 09-Apr-2023 17:57:18 GMT; SameSite=lax Content-Type: text/turtle;charset=utf-8 Content-Length: 37 Server: Jetty(9.4.44.v20210927) Error: Resource /ghost/path not found
These are called "ghost" nodes because they still have a haunting effect. You cannot replace these path segments with a new resource. This is a significant difference from Fedora 4.x & 5.x
> curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/ghost -XPUT HTTP/1.1 409 Conflict Date: Mon, 10 Apr 2023 18:05:05 GMT Set-Cookie: JSESSIONID=node01i26p8o44mumkrmixiobx8zf718.node0; Path=/ Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 09-Apr-2023 18:05:05 GMT; SameSite=lax Content-Type: text/plain;charset=utf-8 Content-Length: 45 Server: Jetty(9.4.44.v20210927) Resource path ghost is an immutable resource. > curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/ghost/path -XPUT HTTP/1.1 409 Conflict Date: Mon, 10 Apr 2023 18:03:42 GMT Set-Cookie: JSESSIONID=node013j2yecnv6mis8pb8dc60qyjm14.node0; Path=/ Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 09-Apr-2023 18:03:42 GMT; SameSite=lax Content-Type: text/plain;charset=utf-8 Content-Length: 50 Server: Jetty(9.4.44.v20210927) Resource path ghost/path is an immutable resource.
You can create items off part of the "ghost" path segments.
> curl -i -ufedoraAdmin:fedoraAdmin -XPUT http://localhost:8080/rest/ghost/newThing1 HTTP/1.1 201 Created Date: Mon, 10 Apr 2023 18:00:50 GMT ... http://localhost:8080/rest/ghost/newThing1 > curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/ghost/newThing1 HTTP/1.1 200 OK Date: Mon, 10 Apr 2023 18:06:54 GMT
You can also create other resources at the same level as the original resource.
> curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/ghost/path/newThing2 -XPUT HTTP/1.1 201 Created Date: Mon, 10 Apr 2023 18:04:02 GMT ... http://localhost:8080/rest/ghost/path/newThing2 > curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/ghost/path/newThing2 HTTP/1.1 200 OK Date: Mon, 10 Apr 2023 18:04:06 GMT