Skip to content

3.7 API Testing

eganmichelle edited this page Apr 26, 2017 · 15 revisions

URL End-Points

The documentation for each end-point is available on Swagger:

http://host.domain.org/api/website/

Authorization Headers

In each request you need to include the following headers:

Header: Content-Type
Value: application/json

Header: Authorization
Value: BASIC 14C27F7B-C8FF-4788-B2FD-044E65C9 or BASIC E2AF0B93-3E56-41B9-9C6E-4C76244D1BEB

Notes

Admin user (username): BASIC 14C27F7B-C8FF-4788-B2FD-044E65C9
Reg. user: BASIC E2AF0B93-3E56-41B9-9C6E-4C76244D1BEB

Most requests also require the following query param to select the appropriate profile:
URL Parameter Key: organization_context Value:

Requests to any endpoint outside of /profiles/* and /users/* also require the following query param to select the appropriate profile:

URL Parameter Key: organization_context Value:

organization_context is the organization ID. It`s in the address bar on y when you navigate to an organization.

For example, for Consumer`s Union the URL is:
http://y.domain.org/stories.jsp#organization;id=2
Therefore, Consumer's Union has ID 2.

Authorization Status

Currently, these are the possible statuses returned after an authorization request:

SUCCEEDS = OK = 200
CREATED = 201
UNAUTHORIZED = 401
NOT_FOUND = 404

Examples for API Testing

The document API testing.docx includes testing examples. Note that this document needs to be updated frequently, that is, every time a change related to the API is performed.

Clone this wiki locally