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.
In this topic:
Construct the login request
Before you begin, ensure you have your Cybereason username and password available.
In your REST API client, open a new tab or file.
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:
Ensure that the method for the request is set to POST. (This may be the default for your REST API client).
For the Headers, for the Key column, add a Content-Type header.
For the Value field, add the value application/x-www-form-urlencoded.
For example, in Postman, you header will look like this:
Navigate to the section to add your request body. In Postman, for example, this is the Body tab.
In the Body tab, add two keys: username and password.
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:
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:
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.