Log in to your Cybereason Platform

In this tutorial, we will explain, step-by-step, how to use the API to log in to your Cybereason platform. You must log in before each session in which you plan to send requests.

This tutorial explains how to set up the request using a standard REST API client, such as Postman. You can use other methods to send the request (such as a cURL command or a Python script).

If you follow these steps in your own environment, make sure that you update the details to reflect your environment.

Construct the login request

Before you begin, ensure you have your Cybereason username and password available.

  1. In your REST API client, open a new tab or file.

  2. In the relevant field, enter the URL for the request:

    https://<your server address>/login.html

    For example, in Postman, you enter the URL here:

    URL to use for an API authentication request in the Postman API client

  3. Ensure that the method for the request is set to POST. (This may be the default for your REST API client).

    Example of setting a method for the request

  4. For the Headers, for the Key column, add a Content-Type header.

  5. For the Value field, add the value application/x-www-form-urlencoded.

    For example, in Postman, you header will look like this:

    Example of the header to use for an authentication request in the Postman API client

  6. Navigate to the section to add your request body. In Postman, for example, this is the Body tab.

  7. In the Body tab, add two keys: username and password.

  8. For the values of each of these keys, add the username and password you use to access the Cybereason platform.

    For example, in Postman, the body will look like this:

    Required request body for an authentication request

  9. In your client machine, run your request.

View the response

After you run the request, the response body will include some HTML code for the post-login page.

In addition, your client also contains a cookie indicating a successful login. For example, in Postman, you can see the cookie here:

Authentication cookies on an API client

You need this cookie present to send other request in the same session.

Next steps

Now that you understand how to use the API to log in to the platform, ensure you log in the next time you use the API and incorporate the login as part of your API workflow.