Forum Discussion

cblown's avatar
cblown
Boss
12 years ago

Lithium Custom Settings - Set externally via REST

We are looking for a way to SET a global custom setting via the REST api from an external system.

 

The intented process ;

 

1/ Autheticate with the REST api and receive an Admin access / session token

2/ POST the value for the custom setting to the REST API  via /restapi/vc/settings/name/hinterlands.data/set

3/ Check the response XML for success.

 

We have confirmed steps 2&3 using a test form in an Endpoint 

 

<form action="/restapi/vc/settings/name/hinterlands.data/set" method="post">
<input type="text" name="value" value="1234567890"/>
<input type="submit" value="go"/>
</form>

 

With regards to authentication, how do we supply the session token in the POST payload, as a cookie? or as a variable in the POST?

This also assumes that the REST api will allow a POST from a domain other than the origin? 

 

Any pointers would be appreciated