Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

curl -v -XPUT http://localhost:8080/rest/ghost/path/object

This 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 GET requests.

Code Block
> 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


Why these These are called "ghost" paths, is nodes because they still have a haunting effect. You cannot replace these path segments for new resources.with a new resource. This is a significant difference from Fedora 4.x & 5.x

Code Block
> 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.

Code Block
> curl -i -ufedoraAdmin:fedoraAdmin -XPUT http://localhost:8080/rest/ghost/newThingnewThing1 
HTTP/1.1 201 Created
Date: Mon, 10 Apr 2023 18:00:50 GMT
...

http://localhost:8080/rest/ghost/newThingnewThing1

> curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/ghost/newThingnewThing1
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.

Code Block
> 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