-
Notifications
You must be signed in to change notification settings - Fork 0
3.7 API Testing
The documentation for each end-point is available on Swagger:
http://host.domain.org/api/website/
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
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.
Currently, these are the possible statuses returned after an authorization request:
SUCCEEDS = OK = 200
CREATED = 201
UNAUTHORIZED = 401
NOT_FOUND = 404
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.