- Start a new Node project by issuing...
npm init
...with these parameters:
{
"name": "<projectName>",
"version": "1.0.0",
import requests | |
import csv | |
import urllib3 | |
import argparse | |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
parser = argparse.ArgumentParser( | |
description="Reads CSV, applies metric registry updates, resets all metrics based on new values." | |
) |
"""Script to register ArcGIS Monitor Agent with ArcGIS Monitor Server""" | |
import argparse | |
import socket | |
import sys | |
import requests | |
def generate_monitor_token(monitor_url, username, password, verify_certs=True): | |
"""Generates a token for ArcGIS Monitor""" | |
url = f"{monitor_url}/auth/token" |
import requests | |
def get_access_token(): | |
# Generate an access token using the client ID and client secret from the registered app. | |
url = f"{portal_url}/sharing/rest/oauth2/token" | |
params = { | |
"f": "json", | |
"grant_type": "client_credentials", |
from arcgis import GIS | |
from arcgis.geocoding import batch_geocode, get_geocoders | |
# Parameters | |
url = "https://machine.domain.com/webadaptorname" | |
username = "portalusername" | |
password = "portalpassword" | |
# Data | |
data = [ |