Skip to content
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

Merged
merged 7 commits into from
Aug 15, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions Houdini/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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). Also wtih => with

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URI (caps) as used elsewhere in this doc


### 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

svc:indentify=>svc:identify

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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
Expand All @@ -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
Expand Down
Loading