import fireREST as fr
from ..config import HOSTNAME, USERNAME, PASSWORD, DOMAIN
# Try establishing a connection and exit out if the credentials
# are not correct
try:
fmc = fr.FMC(hostname=HOSTNAME, username=USERNAME, password=PASSWORD, domain=DOMAIN)
except fr.exceptions.AuthError:
print('Auth error, check your credentials')
exit(0)
all_audits = fmc.audit.auditrecords.get()
Traceback
Traceback (most recent call last):
File "C:\Users\User\Python\Python310\lib\site-packages\fireREST\utils.py", line 190, in wrapper
response.raise_for_status()
File "C:\Users\User\Python\Python310\lib\site-packages\requests\models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: 404 for url: https://10.106.38.119/api/fmc_config/v1/domain/e276abec-e0f2-11e3-8169-6d9ed49b625f/audit/auditrecords?limit=1000&expanded=True
The api call for getting all audit records is
/api/fmc_platform/v1/domain/{domainUUID}/audit/auditrecords
But when I implement this using this library, I get a 404 error. When I dig into the error, I see the API endpoint the library querying is
/api/fmc_config/v1/domain/{domainUUID}/audit/auditrecords
The source code I used to produce this problem
Traceback