Skip to content

@salesforce/b2c-tooling-sdk / safety / extractJobIdFromPath

Function: extractJobIdFromPath() ​

extractJobIdFromPath(path): string | undefined

Defined in: packages/b2c-tooling-sdk/src/safety/safety-guard.ts:38

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

Released under the Apache-2.0 License.