Create a project
This tutorial will guide you through the process of creating a project to store the assets information and analysis results. The project is the main container for all the data and analysis results. It is also the place where you can define the risk model and the risk analysis settings.
API Endpoint
[POST] https://api.intensel.net/apiv2/create_project/
Request Arguments
Argument | Type | Description |
---|---|---|
project_name | string | The name of the project. |
variables | list | The list of variables. |
Variables
Variables |
---|
river_flood * |
typhoon * |
storm_surge * |
landslide |
extreme_heat |
snow_melt |
rainfall_flood |
drought |
sea_level_rise |
wild_fire |
* The variables marked with an asterisk are the default variables.
Example
- Python
- JavaScript
- cURL
import requests
URL = "https://api.intensel.net/apiv1/create_project/"
headers = {
'X-Intensel-Api-Key': 'YOUR_API_KEY',
}
payload = {
"project_name": "My Awesome Project",
"variables":["rainfall_flood", "extreme_heat"],
}
response = requests.post(URL, json=payload, headers=headers)
data = response.json()
print(data)
const axios = require('axios');
const URL = "https://api.intensel.net/apiv1/create_project/";
const headers = {
'X-Intensel-Api-Key': 'YOUR_API_KEY',
};
const payload = {
"project_name": "My Awesome Project",
"variables":["rainfall_flood", "extreme_heat"],
}
axios.post(URL, payload, {headers: headers})
.then((response) => {
console.log(response.data);
}, (error) => {
console.log(error);
});
curl -X POST "https://api.intensel.net/apiv1/create_project/" \
-H "X-Intensel-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"project_name": "My Awesome Project", "variables":["rainfall_flood", "extreme_heat"]}'
Example Response
Create Project Response JSON -> view response