I'm trying to determine if a definition query is applied to a layer in a feature service referencing one of our enterprise geodatabases. Does anyone know how to grab the applied definition query via the REST or Python API's?
Here's where I've looked so far. The REST API response(documentation link) for a service layer doesn't contain this information.
I am able to grab the service manifest via REST (documentation) and inspect the JSON. It contains the connection properties for source geodatabase, and the name of the feature class used by each service layer. However but it doesn't contain any information about the definition query either. The manifest does show a serverpath for the location of the service's .MSD file on the server's disk.
Therefore I'm guessing this definition query information only lives within the MSD file itself. My server admin was able to grab the msd file for me off disk and I verified the definition query is buried in there. I guess I could write a script to grab the file and parse it, but figured this would be somewhere in the server admin interface or API's.