---
keyword: [Extend, Model Components, Extend BPs, Extend Business Processes, Model Business Processes, Extend BP]
nav: wcp_docs
parent_url: /wcp_docs/
title: Get the Event Step and Event IDs
layout: subsection
---

Every Extend subprocess initiation PMD has a context WID for the current event step. Call the Event Steps REST API in the <b>businessProcess</b> REST service using the `queryParams.eventStepId` variable. The `eventStepId` variable corresponds to the `eventStepId` variable in the `routingPattern` in the AMD task definition.

This example is the page inbound endpoint for the `GET /eventSteps` endpoint, which uses the `queryParams.eventStepId` variable

```
"endPoints": [
 {
   "name": "searchEventStep",
   "baseUrlType": "workday-bp",
   "url": "<% 'eventSteps/' + queryParams.eventStepId %>",
   "authType": "sso"
 },
 ...
]
```

The above endpoint named <i>searchEventStep</i> returns the Extend subprocess event step ID.

Using the returned event step ID, you can also fetch the Extend subprocess event ID by using the Events REST API in the <b>businesProcess</b> REST service. This determines the parent business process event context. Example:

```
"endPoints": [
{
  "name": "searchEvent",
  "baseUrlType": "workday-bp",
  "url": "<% 'events/' + searchEventStep.event.id %>",
  "authType": "sso"
},
...
]
```

The above endpoint named <i>searchEvent</i> returns the ID of the parent business process event. You’ll use this event ID when you call the PATCH endpoint to update the target of the subprocess event.

<b>Note:</b> The Events REST API also returns details of the parent business process event, such as the event target or the initiator of the event. You can find the ID of the parent event target in the `for.id` response field. Example: For the Create Position Workday-delivered business process, the event target is the supervisory organization associated with the position request. You can fetch the parent event object using the current Extend subprocess event, and then access the supervisory organization as `parentEvent[‘for’].id`.

```
"endPoints": [
{
 "name": "parentEvent",
 "baseUrlType": "workday-bp",
 "url": "<% 'events/' + searchEvent['for'].id  %>",
 "authType": "sso"
},
...
]
```

The processing user must have security access to the parent event in order for the API call to successfully fetch the parent event object. Example: View All permission in the parent business process security policy.

