Hello,
How do I perform a "session logout" in the API?
I am using the ansible's URI module and so far I tried a few different options, like for example this:
- name: Logout from IdM API
uri:
url: "https://{{ ipa_master }}/ipa/session/json"
headers:
Content-type: "application/json"
Accept: "application/json"
Referer: "https://{{ ipa_master }}/ipa"
Cookie: "{{ ipa_session }}"
method: POST
body_format: json
body: |
{
"id": 0,
"method": "session_logout/1",
"params": [
{
"version": "{{ ipa_api_version | default('2.231') }}"
}
]
}
which gives me the following error:
message: 'Invalid JSON-RPC request: params must contain [args, options]'
I also tried to simply visit the /ipa/session/session_logout, or the /ipa/session_logout. Both options gave me a 404.
So, how do I "logout"?