API via curl

You can use curl via the unix command line to submit API requests.


Obtain a token via a get token call since all API calls require a token

Accessing API via curl

Here are some test examples for fetching (GET) data and inserting (POST) data.

Fetch data

curl -X GET "https://yourserver.metricinsights.com/api/user_group" -H "Accept:application/json" -H "Content-Type:application/json" -H "Token:CaA3cEEkNp8R5k9t1QNHkMxdGRjigzrtYPnLWWZTwyvazbFEtu"

Insert data

curl -H "Accept:application/json" -H "Content-Type:application/json" -H "Token:CaA3cEEkNp8R5k9t1QNHkMxdGRjigzrtYPnLWWZTwyvazbFEtu" -d '{"name":"group 123","description":"created via API","all_access_group":"No"}' "https://yourserver.metricinsights.com/api/user_group"