Skip to main content

Elvis 6 REST API - logout


Do you have corrections or additional information about this article? Leave a comment!
Do you have a question about what is described in this article? Please contact Support.

1 comment

  • Michael Drozdek

    With Powershell this code works:

    Took me a while to figure it out. Maybe someone needs it.

    $token = ""

    $urlLogin = 'http://<elvisserver>/services/apilogin?
    cred=<base64 credentials>

    $urlLogout = 'http://<elvisserver>/services/logout'

    $responseLogin = Invoke-RestMethod -Method 'Post' -Uri $urlLogin

    $token = $responseLogin.authToken

    $headers = @{
    'Content-Type' = 'application/json'
    'Authorization' = ''
    $headers.'Authorization' = 'Bearer ' + $token


    $responseLogout = Invoke-RestMethod -Method 'Post' -Headers $headers -Uri $urlLogout

    Write-Host $responseLogout


Please sign in to leave a comment.