Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Store the json list returned by an API consumed through the dynamic type input #646

Closed
GuillaumeFalourd opened this issue Oct 29, 2020 · 1 comment
Labels
🔨 improvement Improvement in features ✨ feature Suggest a new feature or enhancement to the Ritchie project

Comments

@GuillaumeFalourd
Copy link
Contributor

GuillaumeFalourd commented Oct 29, 2020

What I would like to see

Be able to store the Json list returned by an API consumed through the dynamic type input, to be able to use the list again to extract other variables from the list on another input, without having to consume the API more than one time.

Example

The following url https://api.github.com/users/dennis could return a list of the user repositories, as well as a list of branches for each repository.

{
   "label": "Choose your repository: ",
   "name": "repo_list",
   "type": "dynamic",
   "requestInfo": {
     "url":"https://api.github.com/users/dennis",
     "jsonPath":"$user["repositories"].repositoryName"
   }
}, 
{
   "label": "Choose the repository branch: ",
   "name": "repo_branch",
   "type": "dynamic",
   "requestInfo": {
     "url":"https://api.github.com/users/dennis",
     "jsonPath":"$user["repositories"]["branches"].branchName"
   }
 }

If I want to extract repositories names and branches names I would have to consume the URL twice as it is implemented now.

Why is it needed

Currently, if I want to extract different variables from the same list returned from an API, I would like to consume the API for each variable I want to extract.

This isn't very efficient in terms of performance, as the API response time could be quite long depending on the API consumed.

@GuillaumeFalourd GuillaumeFalourd added ✨ feature Suggest a new feature or enhancement to the Ritchie project 🔨 improvement Improvement in features labels Oct 29, 2020
@henriquemoraeszup
Copy link
Contributor

Removing since we will be using formulas output to resolve this problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 improvement Improvement in features ✨ feature Suggest a new feature or enhancement to the Ritchie project
Projects
None yet
Development

No branches or pull requests

2 participants