Join the Conversation

To sign in, use your existing MySonicWall account. To create a free MySonicWall account click "Register".

Is there a "best" method to identify which objects are Default vs. Custom using the API?

Basically the title. The closest I could come up with is that in most cases, the UUID of the object generally starts with 00000000-0000- when it's been created manually via the UI, however this is not always the case and was hoping to find out if there was a more reliable way to identify Custom objects vs. Default.

In the CLI we can execute show address-objects custom is that a thing in the API?

Searching docs and Swagger don't really give any clues.

Thanks!

Category: Developer Hub
Reply

Answers

  • JaimeJaime SonicWall Employee
    edited December 2022

    Hi @hbonath,

    I've done a lot of research and have come up empty. I think this should be submitted as an Enhancement Request as I haven't found a way to filter those objects via the API endpoints.

    There is one alternative API endpoint you can use... /direct/cli. You can essentially post the show command you want and get the text back. Unfortunately, you'd have to parse it back into JSON yourself since it returns text/plain.

    To use /direct/cli, POST to it with the Accept and Content-Type headers set to text/plain. In the body, send "show address-objects custom".

    The response will the output as if you got it from the CLI, "exit" commands and all.

    Hope that helps!

    Jaime

Sign In or Register to comment.