The Unified Listing is a resource for people who want to find assistive technology solutions and mainstream products with assistive features. The live instance can be found at:
This package provides a working copy of the Unified Listing API, including the API documentation, and sample data that can be used to test integrations with the UL API.
For the reference front-end user interface that runs on top of the API, see the ul-website package.
To use this package, you must have a supported version of node.js
installed. Currently, the
package is developed with and tested against the 6.9.1 LTS version of node. Once you have node
installed:
- Install the required libraries by running
npm install
. - Launch the API test harness using the command
node tests/js/launch-test-harness.js
. - An instance of the API with test data will be available at: http://localhost:6714/api/
- See the API docs for details on the available API endpoints and options for each.
The search and other "read" endpoints in the UL API do not require a login. However, to add data to the UL, you will need to login using an account with the correct permissions. To create an account, you can either clone and edit one of the existing users, or create an account using the self-signup procedure.
The existing user data used by the test harness can be found at ./tests/data/users.json
. The hashed passwords are all
set to password
. As long as you are only editing the username and email address, your cloned users should have the
same password.
The UL API includes a copy of the gpii-express-user/ user management package. See that package for full details about the supported login/logout endpoints.
To create a user using the self-signup procedure:
- Launch the test harness as outlined above.
- Open the signup endpoint in your browser: http://localhost:6714/api/user/signup
- Fill out and submit the form.
You will need to verify the new account before you can use it to log in. The verification process normally depends on a mail server. When using the test harness, you must manually verify the new account:
- Open the administrative interface for the test database: http://localhost:6715/_utils/
- Navigate to the
users
database (note, we do not use the similarly named_users
database). - Look for the record whose
id
corresponds to the new username, as inorg.couchdb.user:myuser
- Edit the record and change
verified
totrue
. - Save your changes.
- You should now be able to log in with the new account.
By default, each user has permission to read data from all unified records and public sources. Users also have
permission to write to their private datasource, which consists of a tilde and their username (as in ~myuser
).
There are also a handful of sources maintained by database contributors, write access to these is controlled by the
permissions in ./src/js/sources/sources.json
. For test purposes, an account with permission to write to each of these
sources is provided as part of the test data in this package. The sources associated with data coming from EASTIN are
writable using the eastin
test user, password password
. The source associated with data coming from the
Semantic Alignment Tool is writable using the sat
test user, password password
.
To run the tests in this package, use the command npm test
.