Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ivory

Script API object not found

Jump to solution

Hi everyone.

 

I'm developing roles for scripting with Ansible using the API. I have followed the API Documentation: 

Spoiler

 

I get the token and add it to headers for run-script call. I use the body like this:

{
"script-name": "Test",
"script": "ls -l /",
"targets": [ "1.1.1.1" ]
}

And this is the output

{
  "code": "generic_err_object_not_found",
  "message": "Requested object [1.1.1.1] not found"
}
 
1.1.1.1 is the CMA's IP, I have tried to with CMA's Name and FW's IP and FW's name but I always get the same response.
 
Thank you!

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Admin
Admin
Commands run at the machine level, so a CMA or VS are not supported targets.
It's meant for gateways, but I believe the MDS name will work as well.

The relevant "show" command for a given object type (e.g. show-simple-gateway) will take a name as input and provide the uid in the output.

View solution in original post

0 Kudos
4 Replies
Highlighted
Admin
Admin
Per the API documentation: "Targets may be identified by their name, or object unique identifier."
Specifically we're talking object name.
An IP address definitely won't work.
0 Kudos
Highlighted
Ivory
True, but I have tried it with the name and didn't work. I could try with the ID (for my development I prefer name, but for testing should be usefull to).
So, Why did fail with the CMA's name?. How can I get the id from a name?

Thank your for you answer and your help
0 Kudos
Highlighted
Admin
Admin
Commands run at the machine level, so a CMA or VS are not supported targets.
It's meant for gateways, but I believe the MDS name will work as well.

The relevant "show" command for a given object type (e.g. show-simple-gateway) will take a name as input and provide the uid in the output.

View solution in original post

0 Kudos
Highlighted

Hello Aromegom. I am facing the same issue than you. Did you find the proper target to run-script operation?

 

Thanks and kind regards.

0 Kudos