As this is not documented, I am thinking the easiest approach will be to open
Web UI and see what JSON requests it sends to IPA for desired actions. I tested
that for example with Chrome developer tools and I could easily see that for
showing a particular user it uses following JSON:

{"method":"user_show","params":[["fbar"],{"all":true,"rights":true}]}

or for user-del:

{"method":"user_del","params":[["fbar"],{}]}

Martin

On 02/10/2014 10:13 AM, Alexandre Santos wrote:
> I have to install the new version, I have the 3.2 installed. 
> 
> I have to integrate the web apps to my web administration site, so i can add, 
> remove, update and find users. 
> 
> Thanks
> 
> Alexandre Santos
> 
> On 07 Feb 2014, at 15:15, Alexandre Santos <asan...@uc.pt> wrote:
> 
>> Thanks, i´m new to this json. How can i find the methods available and there 
>> options? 
>>
>> Thanks
>>
>> Alexandre Santos
>>
>>
>> On 07 Feb 2014, at 09:45, Alexander Bokovoy <aboko...@redhat.com> wrote:
>>
>>> On Fri, 07 Feb 2014, Alexandre Santos wrote:
>>>> Hi Martin,
>>>>
>>>> I´ve tried your example and i get this error:
>>>>
>>>> curl -v  \
>>>>        -H "Content-Type:application/json" \
>>>>        -H "Accept:applicaton/json"\
>>>>        --negotiate -u : \
>>>>        --delegation always \
>>>>        --cacert /etc/ipa/ca.crt  \
>>>>        -d  '{"method":"user_find","params":[[""],{}],"id":0}' \
>>>>        -X POST       https://ipa/ipa/json
>>>>
>>>> ...
>>>>
>>>>> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 
>>>>> NSS/3.13.6.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
>>>>> Host: pi
>>>>> Content-Type:application/json
>>>>> Accept:applicaton/json
>>>>> Content-Length: 48
>>>>>
>>>> < HTTP/1.1 200 Success
>>>> < Date: Thu, 06 Feb 2014 16:42:26 GMT
>>>> < Server: Apache/2.2.15 (CentOS)
>>>> < Connection: close
>>>> < Transfer-Encoding: chunked
>>>> < Content-Type: application/json; charset=utf-8
>>>> <
>>>> {
>>>>   "error": {
>>>>       "code": 911,
>>>>       "message": "Missing or invalid HTTP Referer, missing",
>>>>       "name": {
>>>>           "__base64__": "UmVmZXJlckVycm9y"
>>>>       }
>>>>   },
>>>>   "id": null,
>>>>   "principal": “admin@ipa",
>>>>   "result": null,
>>>>   "version": "3.0.0"
>>>> * Closing connection #0
>>>>
>>>>
>>>> Any suggestion?
>>> You need to set the referrer.
>>>
>>> -H referer:https://ipa.mybox/ipa/ui/index.html 
>>> -- 
>>> / Alexander Bokovoy
>>
> 
> 

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to