About the Pathways API
The Pathways API allows a client application to query and
manage Pathways objects through simple HTTP requests.
The Pathways API is a REST-based API. All requests are executed
through HTTP using specific URL patterns and standard parameters.
The Pathways API supports the representation of request and response
payloads in two formats: JSON (JavaScript Object Notation) or XML.
HTTP requests can designate this preference in the Accept: header
(Accept: application/xml or Accept: application/json). Additionally,
GET type requests allow this preference to be passed as a query string
argument (format=XML or format=JSON). The JSON format might be easier
to work with in the context of a JavaScript call, while XML is usually
preferable from application server code.
For example, the responses below are returned from GET /pathways/api/privileges?format=XML
and GET /pathways/api/privileges?format=JSON respectively.
XML response:<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<soc:PPrivileges xmlns:soc="http://social.bea.com/pathways">
<access>HAS_PORTAL_ACTIVITY_ACCESS_PATHWAYS</access
><access>CAN_VIEW_TAGS</access><
access>HAS_APPLICATION_WRITE</access>
</soc:PPrivileges>
JSON response:{"soc$PPrivileges":{"@xmlns":{"soc":"http:\/\/social.bea.com\/pathways"},
"access":[{"access":"HAS_PORTAL_ACTIVITY_ACCESS_PATHWAYS"},
{"access":"CAN_VIEW_TAGS"},
{access":"HAS_APPLICATION_WRITE"}]}}
The base URL for all requests is the URL of the Remote Server object
defined for the Web Service in the portal, plus “/pathways/api/”.
(For details on configuring a Remote Server, see the portal online
help.)
- For a complete list of URL patterns for specific requests, see Pathways API Interfaces.
- For examples of common requests, see the following topics:
Note: All HTTP requests to the Pathways API must include security
credentials. There are two ways of providing these credentials:
- To use the standard REST API URL in the form of http://server/pathways/api/items,
you must provide a portal login token. The login token can be borrowed
from a portal-to-portlet request or retrieved using the IDK. For
details on configuring the portal to send a login token, see Configuring Web Services that Use the Pathways API. For details on using the IDK to access a login token, see Initiating a PRC Session to Use IDK Remote APIs.
- To use the /direct/ URL pattern (http://server/pathways/api/direct/items),
you must provide username/password credentials in a traditional basic
authentication format. For details on configuring the portal to send
basic authentication information, see Configuring Web Services that Use the Pathways API.
For details on Pathways objects, see the Pathways documentation.
- Pathways API InterfacesThe Pathways API includes a collection of interfaces for accessing and managing items, users, views, tags, and saved searches.
- Pathways API Search Query ParametersThe Pathways API provides a set of standard query parameters to execute search queries.
- Executing Searches Using the Pathways APITo search for items, users, and tags, use a search interface with standard query parameters.
- Retrieving Data Using the Pathways APITo retrieve data about items, views, saved searches and users (experts), use one of the interfaces provided by the Pathways API.
- Creating and Managing Tags Using the Pathways APITo create new tags and assign tags to specific items, use the /pathways/api/item/[id]/tag interface.
- Creating and Managing Saved Searches Using the Pathways APITo create new saved searches and modify existing saved searches, use the /pathways/api/savedsearch interfaces.
- Creating and Managing Views Using the Pathways APITo create new views and update existing views, use the /pathways/api/view interfaces.
- Configuring Web Services that Use the Pathways APITo send the portal login token or basic authentication information to a remote application that uses the Pathways API, register the remote application as a Web Service in the portal.