A Simplified RESTful workflow


Log out

When you want to terminate the client session, log out to delete the current access token.

Prerequisites

Verify that you are logged in and have a valid access token.

Procedure

Make a request to the /api/logout endpoint by specifying your username (resp. access token) with the User (resp. Authorization: Token) header.

Example: logging out

This example deletes the current access token which logs the user out.
Request:

      POST https://trackhubregistry.org/api/logout
      Authorization: Token 52d07632507e6c17f4dca1a2c6b76fb146078c2e
Response:
      200 OK
      ...
      {
         "success": "Successfully logged out."
      }

Example Clients


use strict;
use warnings;

use JSON;
use HTTP::Request::Common;
use LWP::UserAgent; # install LWP::Protocol::https as well

my $auth_token = 'exampletoken';
my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 });

my $request = POST('https://trackhubregistry.org/api/logout', 
  'Content-type' => 'multipart/form-data', 
  'Authorization' => "Token $auth_token"
);

my $response = $ua->request($request);
my $response_message;
if ($response->is_success) {
  print "Logged out successfully!\n" if $response;
} else {
  die sprintf "Couldn't logout, reason: %s [%d] ", $response->content, $response->code;
}

Status:

API v, UI v0.9.1


Copyright © EMBL-EBI 2025.

This website uses cookies. By continuing to browse this site, you are agreeing to the use of our site cookies. We also collect some limited personal information when you browse the site. You can find the details in our Privacy Policy.