J. Daniel Schmidt napsal(a): > Hi hackers, > > I want to share my current thoughts about the Rest Api for the registration. > Please have a look and feel free to comment and ask. > > > > Registration Configuration: > --------------------------------- > * /registration/config > GET > get registration server > > returns: > > <registrationconfig> > <server> > <url>https://myregistration.server.com/center/regsvc</url> > </server> > </registrationconfig>
Hi, just few notes. Why get doesn't get certificate? Maybe someone find usefull to check server certificate > > > PUT > set new registration server > the certificate is inclueded as well > > post data: > > <registrationconfig> > <server> > <url>https://somewhere.else.com/center/regsvc</url> > </server> > <certificate> > <data> > <![CDATA[ > -----BEGIN CERTIFICATE----- > MIIFIDCCBAigAwIBAgIJAPP6cY6saTFlMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYD > VQQGEwJERTEPMA0 ......... 60QTef32lxeuVH9Kve8gGZiMwDqcJfl > J8NLO3kNW3Zys2p4agg22yttmUs= > -----END CERTIFICATE----- > ]]> > </data> > </certificate> > </registrationconfig> > > return value is the same as for GET > > > Run Registration: > --------------------------------- > > * /registration I am not sure if you don't have problems run registration as controller and have registration/config for configuration. Maybe you should use another subdirectory for registration? > > POST > run registration and return the/a result > > post data: > > <registration> > <options> > <debug>2</debug> > <nooptional>1</nooptional> > <nohwdata>1</nohwdata> > <forcereg>0</forcereg> > <httpproxy>http://my.proxy</httpproxy> > <httpsproxy>http://my.proxy</httpsproxy> > </options> > > <arguments> > <argument> > <name>key</name> > <value>val</value> > </argument> > ... > </arguments> > <registration> > > > returns: > > <registration> > <status>finished|missinginfo|error</status> > <message>Some text to display</message> > <guid>systemsguid</guid> > > <!-- in case of missing arguments --> I think that missing argument should be reported as error, also another controller handle it as error (I plan add specific exception for arguments missing/invalid). Do you have any reason to respond it as success response? Also status error is not good I think...thats reason why status code exist, just report problem in status code and explain problem in response. Don't mix success registration and problematic. Josef -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
