---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [safety](../index.md) / extractJobIdFromPath

# Function: extractJobIdFromPath()

> **extractJobIdFromPath**(`path`): `string` \| `undefined`

Defined in: [packages/b2c-tooling-sdk/src/safety/safety-guard.ts:38](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/safety/safety-guard.ts#L38)

Extract a job ID from a URL path if it's a job execution endpoint.

Matches patterns like:
- `/s/-/dw/data/v24_5/jobs/sfcc-site-archive-import/executions`
- `/jobs/sfcc-site-archive-export/executions`

## Parameters

### path

`string`

## Returns

`string` \| `undefined`
