When running the command, I encounter the following error:
(node:71992) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
error: runtime~extractRunnableItems: Unable to find a folder or request: "[name]"
Error Note: I’ve replaced “[name]” with both the folder/request names (ex. “My-Folder”, “request-inside-folder”, and “request-outside-folder”) and their respective id’s (ex. 230…-…-…-…-…-…3d3) and all yield the same error.
The folder flag looks at the Collection and does a string based match against the folders or requests. There’s some quirkiness to it like it wouldn’t be able to pick between duplicate folder or request names and would just run the first one it finds.
I reviewed the collection_file.json file and extracted the “name” from the request I aimed to trigger, and that worked! However to be more specific, my real goal is to trigger the request using the Request Id instead of the name, as you pointed out, to avoid potential issues.
After looking at the collection_file.json, I saw several fields containing id attributes and saw something interesting. Within the request details, there are both “id” and “uid” fields.
collection.item.event.script.id – did not work
collection.item.id – did work, but it’s a shorter version of the collection.item.uid
collection.item.uid – did not work, but is the same id that appears in Postman
The “uid” is mentioned in the Request Details in the Postman application as ID, this id does not work. Whereas, the id (which appears to be a shorter version of uid) does work, as show in the command screenshot below.
I guess with this, are users expected to know that they’ll need to use the shorter version of the “uid” or would programmers be expected to grab the “collection.item.id” instead of the “collection.item.uid”? Or would this be considered a bug?
I heard back from the Postman team regarding the inconsistency I mentioned previously, and here’s what they had to say:
It appears that this is a known issue, but it may not be on their roadmap for resolution. So, I’ll need to parse out the “first part (userID)” of the UID for my scenario.
Thank you for everyone’s assistance, really appreciate it!