- Click the Records tab on the left, expand Integration Resources, right-click Service Package, and select the Create command from the shortcut menu.
- On the Create Service Package form, type customapi in the Service Package Name field. Provide a description for the package in the Short description field and click Create and open.
- On the Edit Service Package form, specify an access group in the Service access group field (the format of the group is <Application_name>:<Access group>).
Note: To view the list of available access groups, click the Records tab on the left and navigate to Security → Access Group. - Click Save.
- Go to the newly created access group by clicking Records → Security → Access Group → ABBYYFC:Administrators/ABBYYFC:Users.
- In the Available roles field, add a PegaRULES:PegaAPI role.
- Click the Records tab on the left, expand Integration-Services, right-click Service REST, and select the Create command from the shortcut menu.
- On the form that opens, specify the following:
- Service name: files
- Service package name: customapi
- URI Template: cases/{id}/files/{name}
- Service version: v2
- Click Create and open.
- Click the Service tab and type Pega-API-CaseManagement in the Pega class field. In the URL path parameters section, type Param.CaseId in the Map to Key column for the Id parameter. Then type Param.FileName for the name parameter.
- Click the Methods tab. Expand the POST method and on the Request tab, specify the following for the Message data fields:
- Description: Request Data
- Map to: Clipboard
- Map to key: Param.Request
- Click the Response tab and create three response conditions:
Process what | Parameter values | Header fields | Message data |
|---|---|---|---|
pxIsInternalError |
| ||
pxIsErrorResponse |
|
| |
Success response |
|
|
|
