I try to use the 'REST API (Beta)'
(http://www.novell.com/developer/plug...f/restapi/7.0/) to get
events and correlated events.

I can get a authentifiion token and some data, but I have some problems
to get the data I want.

This is a part of my script :


Code:
--------------------

BASIC_AUTH_VALUE=`echo -n "$USER_NAME_PARAM:$PASSWORD_PARAM" | base64`
BASIC_AUTH_HDR="Authorization : Basic $BASIC_AUTH_VALUE"

AUTH_RESPONSE=`curl -s -k -XPOST -H "$BASIC_AUTH_HDR" -H "Accept: application/json" "$PROTOCOL_PARAM://$HOST_NAME_PARAM:$PORT_PARAM/SentinelAuthServices/auth/tokens"`

SAML_AUTH_TOKEN=`echo "${AUTH_RESPONSE}" | sed -rn 's/\{"Token":"([^"]+)".+/\1/p'`

SAML_AUTH_HDR="Authorization : X-SAML $SAML_AUTH_TOKEN"

curl -k -XPOST -H "$SAML_AUTH_HDR" -H "Accept: application/json" "$PROTOCOL_PARAM://$HOST_NAME_PARAM:$PORT_PARAM/SentinelRESTServices/objects/event"

--------------------


And this is the result :

Code:
--------------------

{"Fault":{"Code":{"Value":"Sender","Subcode":{"Val ue":"NoAccess"}},"Reason":{"Text":"Insufficient permission for user 'admin'."}}}

--------------------


I always test with user admin, this user have is the default
administrator. I try with an other user with database right or others
right but nothing works.

Please can you tell me where is my mistake ? Is it the user permissions,
my request or it's not possible to get data of events using this API ?


--
chris54
------------------------------------------------------------------------
chris54's Profile: https://forums.netiq.com/member.php?userid=1915
View this thread: https://forums.netiq.com/showthread.php?t=44981