Unable to access Xmatters api

I am new to Xmatters . I am trying to make a REST API call to know who is on duty.Every time I run this command I get 401 status saying,unauthorized user.I can login successfully using the Xmatters Web Interface.
Here is the api call I am making

curl -H "Content-Type: application/json" --user username "https://xxx.hosted.xmatters.com/api/xm/1/groups/groupId/calendar"

Can somebody please tell me where I am going wrong??


Please sign in to leave a comment.