---
title: Logout
slug: tp-api/logout
docTags: 
createdAt: 2023-12-26T14:37:58.070Z
---

{
  "id": "KlFFZPHVNb8sohyjpZPfk",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}logout",
    "servers": [
      {
        "url": "{{url}}logout",
        "description": "Development environment"
      }
    ],
    "name": "Logout",
    "description": "<p>This method allows the currently logged-in user to log out from KRON DSP Upon successful logout, the system returns a confirmation.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "cookieAuth",
          "name": "SESSION",
          "kind": "optional",
          "type": "apiKey",
          "in": "cookie"
        },
        {
          "id": "tokenAuth",
          "name": "X-XSRF-TOKEN",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "XOUdwTmkmtEMDPckSLU9a",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}logout \\\n     --header 'accept: application/json'"
        },
        {
          "id": "PS3EH_EpmPbN5AoUCtTKk",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}logout\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "PXHOTrHeviqWUEa7xbF4w",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}logout\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "fmStGzAKEg8U7dfZZ31hD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}logout\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "XOUdwTmkmtEMDPckSLU9a"
    },
    "results": {
      "languages": [
        {
          "id": "esgAivuyu7tpiaTP5eP7M",
          "language": "200",
          "code": "// OK\n"
        }
      ],
      "selectedLanguageId": "esgAivuyu7tpiaTP5eP7M"
    }
  },
  "children": [
    {
      "id": "YaCP7sM10oWzR-S5j7c9Z",
      "type": "paragraph",
      "children": [
        {
          "text": "This method allows the currently logged-in user to log out from KRON DSP Upon successful logout, the system returns a confirmation.",
          "id": "KmM2gzlwheda1wKkqWye1"
        }
      ]
    }
  ]
}