Using feeds_ex to import content to drupal using 2 steps API calls I am trying to import data to Drupal 8 website using Feeds and Feeds_ex module and here is my scenario:


I need to make a call to the first JSON API and extract the IDs from it, here is a sample of the API

{
"rm": [{
    "mn": "Friday",
    "id": 3003,
    "ra": "JEB  ",
    "md": "2019-11-01 00:00:00.0"
}, {
    "mn": "Saturday",
    "id": 3014,
    "ra": "SHJ  ",
    "md": "2019-11-02 00:00:00.0"
}]


}
Then I want to use the extracted IDs to construct custom URLs to get the actual data that I want to import.

http:/somewebsite/api/index.php?id=1234


I looked to Feeds documentation to create a custom fetcher with no luck.Any advice?
The trick is to create a new parser, not a new fetcher.
I created a new module and a new parser at the following:
New files at MY_MODULE/src/Feeds/Parser/MymoduleJsonPathParser.php

I wanted to build on top of the feeds_ex module so I used their interfaces as the following:

use RuntimeException;
use Drupal\Core\Logger\RfcLogLevel;
use Drupal\feeds\FeedInterface;
use Drupal\feeds\Result\FetcherResultInterface;
use Drupal\feeds\Result\ParserResultInterface;
use Drupal\feeds\StateInterface;
use Peekmo\JsonPath\JsonStore;
use Drupal\feeds_ex\feeds\Parser\JsonParserBase;
use Drupal\feeds_ex\feeds\Parser\ParserBase;
use Drupal\Core\Form\FormStateInterface;


If you would like to add custom options that appear at the feeds UI add your custom form at the following:

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);

$form['FIELD'] = [ .....];
return $form;


}

Now you can build on your custom parser:

    protected function executeContext(FeedInterface $feed, FetcherResultInterface $fetcher_result, StateInterface $state) {
    $raw = $this-&gt;prepareRaw($fetcher_result);
    $parsed = $this-&gt;utility-&gt;decodeJsonArray($raw);
    // Your code gose here.
  }


I am writing a custom module and I will share it here when it's finished.