1. Home
  2. Docs
  3. API Documentation
  4. Login
  5. AddLogin

AddLogin

This function allow you to create new Login Authentication\Login Profiles to use in your scans.

Note : to add the desired Login to your scan, insert it’s name in as a value in the correct field when initiating a new scan.

Request Syntax

{

“apiKey”: “string”,

“action”: “log_d”|”log_h”|”log_self”,

“loginName”: “String”,

“loginUrl”: “https://aaa.com”,

“username”: “String”,

“password”: “String”,

“headers”: [“key: value”, “key2: value2”]

}


Request Parameters

Parameters being used in the Request

Parameter Name :

apiKey

Parameter Usage and Options :

Your Kayran given API Key.

How do I get it ? :

Located in the “Profile” section.

Note : by default, the “API Status” is enabled, unless, the Admin has disabled it in the “Server Settings” section.

Type :

String

Is it Optional ? :

No.


Parameter Name :

action

Parameter Usage and Options :

The type of the login profile you wish to create.

Value :

log_d – Login Dialog

log_h – Headers Authentication

log_self – Self Login

Type :

String

Is it Optional ? :

No.


Parameter Name :

loginName

Parameter Usage and Options :

The name of the login profile.

Type :

String

Is it Optional ? :

No.


Parameter Name :

loginUrl

Parameter Usage and Options :

The URL of the login profile.

Type :

String

Is it Optional ? :

No.


Parameter Name :

username

Parameter Usage and Options :

A Username to be used in the login profile.

Type :

String

Is it Optional ? :

No.


Parameter Name :

password

Parameter Usage and Options :

A Password to be used in the login profile.

Type :

String

Is it Optional ? :

No.


Parameter Name :

headers

Parameter Usage and Options :

Headers that you want to be used in the login profile.

Value :

[“key: value”, “key2: value2”]

Type :

String

Is it Optional ? :

No.


Successful Response

{
“Error”: 0,
“Function”: “AddLogin”,
“Data”: “Created”
}

Errors and their Possible Causes

For more information, please refer to the General Errors section.