You can use the following script to mark files as verified using the API:
import requests
model_id = "REPLACE WITH MODEL ID"
api_key = "REPLACE WITH API KEY"
url = 'https://app.nanonets.com/api/v2/Inferences/Model/' + model_id + '/ImageLevelInferences?start_day_interval=18000¤t_batch_day=19500'
print(url)
response = requests.request('GET', url, auth=requests.auth.HTTPBasicAuth(api_key,''))
all_data = response.json()
print('COUNT OF VERIFIED/APPROVED FILES', len(all_data.get('moderated_images', [])))
print('COUNT OF NON VERIFIED FILES', len(all_data.get('unmoderated_images', [])))
# file_id of file you want to verify. The API response contains all your files for the specified timeframe.
# You can choose a file using any of the other attributes including original filename.
file_id = "ADD ID OF THE FILE" # file_id looks LIKE 71039a58-867a-11ed-9da2-5a4368fa08db
file_data = ''
if len(all_data.get('unmoderated_images', [])) > 0:
for i in all_data['unmoderated_images']:
# FIND THE FILE YOU WANT TO CHANGE
if i['id'] == file_id:
file_data = i
# MANUALLY VERIFY THE FILE
file_data['is_moderated'] = True
# COMMUNICATE TO SERVER THE UPDATED STATUS
url = "https://app.nanonets.com/api/v2/Inferences/Model/" + model_id + "/ImageLevelInference"
response = requests.patch(url, auth=requests.auth.HTTPBasicAuth(api_key, ''), json=file_data)
print(response.status_code)
print(response.text)