-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 612 #38
Issue 612 #38
Changes from 5 commits
df2ea9c
bda6f3c
e1420dd
983e18c
ed8902e
9b61739
5e307c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,15 +30,21 @@ Houdini sets up two endpoints: | |
- /identify/ | ||
- /convert/ | ||
|
||
Houdini only accepts `GET` requests containing the path an image in Fedora at both of these endpoints. | ||
Houdini is meant for use wtih Api-X, and accepts `GET` and `OPTIONS` requests to those endpoints. The `OPTIONS` requests are for use with the Api-X service loading mechanism, and return RDF describing the | ||
service for Api-X. The `GET` requests are used to execute the services, and must contain the uri to an image in Fedora in the `ApixLdpResource` header. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
### Identify | ||
|
||
This runs the imagemagick identify command on the specified resource and returns the results as JSON with the mimetype application/json. | ||
|
||
For example, suppose if you have a TIFF in Fedora at `http://localhost:8080/fcrepo/rest/foo/bar`. If running the PHP built-in server command described in the Installation section: | ||
``` | ||
$ curl -H "Authorization: Bearer blabhlahblah" "localhost:8888/identify/foo/bar" | ||
$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" "localhost:8888/identify" | ||
``` | ||
|
||
But you're probably going to use Houdini through Api-X, which exposes this service as `svc:indentify`. Assuming your Api-X proxy is on port 8081, you can access the service with | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a service that indents everything, lol |
||
``` | ||
$ curl -H "Authorization: Bearer blabhlahblah" "http://localhost:8081/services/foo/bar/svc:identify" | ||
``` | ||
|
||
### Convert | ||
|
@@ -47,14 +53,19 @@ This runs the imagemagick convert command on the specified resource. The output | |
|
||
For example, suppose if you have an image in Fedora at `http://localhost:8080/fcrepo/rest/foo/bar`. If running the PHP built-in server command described in the Installation section: | ||
``` | ||
$ curl -H "Authorization: Bearer blabhlahblah" -H "Accept: image/png" "localhost:8888/convert/foo/bar" | ||
$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "Accept: image/png" "localhost:8888/convert/foo/bar" | ||
``` | ||
|
||
This will return the TIFF converted into a PNG file. | ||
|
||
Additional arguments can be specified using the X-Islandora-Args header. For example to resize to 10% the size use: | ||
``` | ||
$ curl -H "Authorization: Bearer blabhlahblah" -H "X-Islandora-Args: -resize 10%" "localhost:8888/convert/foo/bar" | ||
$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "X-Islandora-Args: -resize 10%" "localhost:8888/convert/foo/bar" | ||
``` | ||
|
||
But you're probably going to use Houdini through Api-X, which exposes this service as `svc:convert`. Assuming your Api-X proxy is on port 8081, you can access the service with | ||
``` | ||
$ curl -H "Authorization: Bearer blabhlahblah" "http://localhost:8081/services/foo/bar/svc:convert" | ||
``` | ||
|
||
## Maintainers | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually
API-X
(all caps). Alsowtih
=>with