For a client I need to be able to add attributes to a feature server. I identified 2 endpoints that works except I don't understand how the authentication works from a internal system.
endpoint 1: POST /arcgis/rest/admin/services/<service>/FeatureServer/<layer>/addToDefinition
endpoint 2: POST arcgis/rest/services/<service>/FeatureServer/<layer>/updateFeatures
How can I authenticate these requests in a internal system like a cron job, script etc...?
I tryed the api key but doesn't seem to work.
I could just use https://www.arcgis.com/sharing/rest/generateToken with username and password. Store the token and refetch if expired but that doesn't seem like a best practice.