Environments
An "environment" is the incarnating features of a phishing topic (logo, fake website, fake email).
Environment have the following structure:
{
"id" : int,
"name" : string,
"status_service_used": string,
"description" : string,
"logo_url" : string,
"customer" : {}Customer,
"customer_id" : int,
"from_envelope" : string,
"domain" : string,
"landingpage" : {}LandingPage,
"landingpage_id" : int,
"targets" : []Target,
"targets_count" : int,
"generic" : bool,
"service_type" : string
}
Get Environments
GET /api/serviceuseds/
Returns a list of environments.
Headers
{
"id": 1,
"name": "Example Environment",
"status_service_used": "Active",
"description": "Example Description",
"logo_url": "https://logo_example.com"
"customer": {}
"customer_id": 138,
"from_envelope": "noreply-example",
"dns": [],
"domain": "example-domain.com",
"landingpage": {}
"landingpageId": 2,
"targets": null,
"targets_count": 0,
"generic": true,
"user_id": 1,
"service_type": "simulation",
"automatic_scenario_generation": 0,
"last_generation_date": "YYYY-MM-DD",
"graph_ql_id": ""
}Get Environment
GET /api/serviceuseds/:id
Returns an environment given an ID.
Path Parameters
id*
integer
The environment ID
Headers
Authorization*
string
A valid API key
{
"id": 1,
"name": "Example Environment",
"status_service_used": "Active",
"description": "Example Description",
"logo_url": "https://logo_example.com"
"customer": {}
"customer_id": 138,
"from_envelope": "noreply-example",
"dns": [],
"domain": "example-domain.com",
"landingpage": {}
"landingpageId": 2,
"targets": null,
"targets_count": 0,
"generic": true,
"user_id": 1,
"service_type": "simulation",
"automatic_scenario_generation": 0,
"last_generation_date": "YYYY-MM-DD",
"graph_ql_id": ""
}{
"message": "Page not found",
"success": false,
"data": null
}Returns a 404 error if the specified environment isn't found.
Get Suggested Environments
GET /api/serviceusedsuggest/?customer_id=X
X is the ID for the customer. If you choose these suggested environments, you don't need to create an associated landing page, as it is
[
{
"id": 1,
"name": "Intern",
"login_url": "",
"website_url": "",
"logo_url": "",
"creation_date": "2024-11-21T14:29:36Z",
"description": "",
"suggested_from": "[email protected]"
},
{
"id": 2,
"name": "Google",
"login_url": "https://accounts.google.com/ServiceLogin",
"website_url": "https://www.google.com",
"logo_url": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
"creation_date": "2024-11-21T14:29:36Z",
"description": "Leading global search engine and technology company offering a wide range of internet services and products.",
"suggested_from": "[email protected]"
},
{
"id": 3,
"name": "YouTube",
"login_url": "https://accounts.google.com/ServiceLogin?service=youtube",
"website_url": "https://www.youtube.com",
"logo_url": "https://upload.wikimedia.org/wikipedia/commons/b/b8/YouTube_Logo_2017.svg",
"creation_date": "2024-11-21T14:29:36Z",
"description": "World's largest video sharing platform where users can upload, view, and share video clips.",
"suggested_from": "[email protected]"
},
...
]Create Environment
POST /api/serviceuseds/
Creates an environment.
Headers
Authorization*
string
A valid API key
Request Body
Payload*
object
The JSON representation of the environment to be created
{
"name": "Example Environment",
"status_service_used": "Active",
"description": "Example Description",
"logo_url": "https://logo_example.com"
"customer": {}
"customer_id": 138,
"from_envelope": "noreply-example",
"dns": [],
"domain": "example-domain.com",
"landingpage": {}
"landingpageId": 2,
"targets": null,
"targets_count": 0,
"generic": true,
"user_id": 1,
"service_type": "simulation",
"automatic_scenario_generation": 0,
"last_generation_date": "YYYY-MM-DD",
"graph_ql_id": ""
}[
{
"id": 1,
"name": "Example Environment",
"status_service_used": "Active",
"description": "Example Description",
"logo_url": "https://logo_example.com"
"customer_id": 138,
"from_envelope": "noreply-example",
"domain": "example-domain.com",
"landingpageId": 2,
"targets": [{"Id": 1},{"Id": 2}]
"generic": false,
"service_type": "simulation"
}
]For generic environnement (environnement for all the employees of the customer), targets need to be set to null. Service_type can be simulation or explanation. In most of the case simulation need to be choice.
Modify Environment
PUT /api/serviceuseds/:id
Modifies an existing environment.
Path Parameters
id*
integer
The ID of the environment to modify
Headers
Authorization*
string
A valid API key
Request Body
Payload*
object
The JSON representation of the environment to be modified
{
"id": 1,
"name": "Example Environment",
"status_service_used": "Active",
"description": "Example Description",
"logo_url": "https://logo_example.com"
"customer": {}
"customer_id": 138,
"from_envelope": "noreply-example",
"dns": [],
"domain": "example-domain.com",
"landingpage": {}
"landingpageId": 2,
"targets": null,
"targets_count": 0,
"generic": true,
"user_id": 1,
"service_type": "simulation",
"automatic_scenario_generation": 0,
"last_generation_date": "YYYY-MM-DD",
"graph_ql_id": ""
}[
{
"id": 1,
"name": "Example Environment",
"status_service_used": "Active",
"description": "Example Description",
"logo_url": "https://logo_example.com"
"customer_id": 138,
"from_envelope": "noreply-example",
"domain": "example-domain.com",
"landingpageId": 2,
"targets": [{"Id" : 1}, {"Id":2}],
"generic": false,
"service_type": "simulation"
}
]{
"message": "Environment not found",
"success": false,
"data": null
}Returns a 404 error if the specified environment isn't found.
Delete Environment
DELETE /api/serviceuseds/:id
Deletes an environment.
Path Parameters
id*
integer
The ID of the environment to delete
Headers
Authorization*
string
A valid API key
{
"message": "Environment Deleted Successfully",
"success": true,
"data": null
}{
"message": "Environement not found",
"success": false,
"data": null
}Returns a 404 error if the specified environment isn't found.
This method returns a status message indicating the environment was deleted successfully.
Last updated