<jupyter_start><jupyter_text>Initial Setup  Please follow this documentation for finding out your api-key for your search engine.https://docs.microsoft.com/en-us/azure/search/search-security-api-keys  Import all the required libraries<jupyter_code>import requests
import json<jupyter_output><empty_output><jupyter_text>Define all the parameters<jupyter_code># Define all the parameters
api_key = '#SEARCH_KEY#'
service_name = "#SEARCH_NAME#"
indexer_name = "osha-final"
api_version="2020-06-30"<jupyter_output><empty_output><jupyter_text>Making an API Call for running the indexer on demandThe status code should be 202.<jupyter_code>url = f'https://{service_name}.search.windows.net/indexers/{indexer_name}/run?api-version={api_version}'
headers = {
    'api-key': api_key,
    'Content-Type': 'application/json',
}
response = requests.post(url, headers=headers)
print(response.status_code)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11726384364820847, 'fraction_numerical': 0.011943539630836048, 'mean_word_length': 7.306306306306307, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '177176', 'license': 'MIT', 'n_tokens_mistral': 313, 'n_tokens_neox': 299, 'n_words': 61, 'path': 'Manufacturing/automation/artifacts/notebooks/run_indexer_on_demand.ipynb', 'repo_name': 'KmrShiv/Azure-Analytics-and-AI-Engagement', 'size': '921'}