Sending a user upload via the xMatters API

Question 

How do I upload users programmatically using a .csv file? 

Environment

All versions of xMatters On-Demand

Answer

The documentation covers how to do this via CURL:

curl https://acmeco.xmatters.com/api/xm/1/uploads/users-v1 \
-X POST \
-H "Content-Type: multipart/form-data" \
-F "name=Upload 1" \
-F "file=@user_data.csv" \
--user $USERNAME:$PASSWORD

It's important to note the @ in front of the filename (without this the request will fail).

Here's what it would like look using Postman:

mceclip1.png

Don't forget to choose File format for the request:

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.