Close popover
John Pritchard-Williams (JOHNPW_GCS)
Client Support Team Lead
Pegasystems Inc.
JOHNPW_GCS Member since 2009 20 posts
Posted: May 28, 2015
Last activity: May 29, 2015

Pega API : Get to Play Quickly !

If like me, you couldn't wait to start messing about about with the new 'Pega API' facility in PRPC 7.1.8: here's a couple of quick startup tips so you can get going:

Out of the box: There are two basic requirements for getting going here:

1. You'll need to add the ROLE 'PegaRULES:PegaAPI' to your ACCESS GROUP.

2. You'll need be running HTTPS on your PRPC App Server.

If you are just messing about in on a scratch system - and you don't have time to set up HTTPS - you can swich over to using HTTP for testing.

This means your username/password will be sent over 'in the clear' - so anybody on your network with the right tools could read them : probably fine in a testing envrionment , definitely not fine at all for production systems...


1. Login in as you Administrator User. (You will be using the DESIGNER STUDIO).

2. Top Right Hand Side: Click your Username and then 'Access Group':


3. Add in in the ROLE to your ACCESS GROUP and SAVE the changes.


4. Log out, log back in.


1. Login as your administrator user.

2. Enter "api" into the search box (top right) and hit enter.

3. This will bring back more than a page of results : scroll to the bottom and click the link labelled "Show all results in new window".


4. Scroll down the new window until you find "Service Package| Api" - click the word 'Api' to navigate to the rule itself.


5. On the "Service Package : api" rule - uncheck the checkbox 'Use TLS/SSL (Rest only) - and save the rule - there is no need to logout.


Now try it: fire up the Pega API screen : Resources (top right)  | Pega API


This will bring up the main Pega API Landing Page - where you can test the REST methods directly - choose '[GET] /casetypes' for instance:

Click the 'Try it out!' button :


This will ask you to provide login credentials (it is using BASIC HTTP AUTHENTICATION):


After entering the details correctly - the server will respond in JSON , with a list of Case Types ( I have only one here ):

{ "pxObjClass":
"Pega-API-CaseManagement", "caseTypes":
{ "ID": "GCS-GCSApp-Work-MYWORK", "name": "MYWORK", "pxObjClass": "Pega-API-CaseManagement-CaseType", "startingProcesses":
{ "ID": "pyStartCase", "name": "MYWORK", "pxObjClass": "Pega-API-CaseManagement-Process" }


It is even nice enough to:

1. Provide you with a URL you can try directly from any HTTP client (just stick it in any old browser - or even a WGET cmdline, or a Python script or a Java Program or an Internet-Of-Things Thing of your choice.....)

2. Warn you that you that you are not using HTTPS:

{  "warning": "299 xxxxxx \"Use of TLS/SSL is strongly recommended for services using Basic Authentication\"",
  "content-type": "application/json;charset=UTF-8",
  "content-length": "277"

So there you have it : hope the new API brings you much hAPIness :-|

Data Integration
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.