diff --git a/docs/getstarted/tutorials/device42-tutorial.mdx b/docs/getstarted/tutorials/device42-tutorial.mdx index 66ed4ca0..19e6f170 100644 --- a/docs/getstarted/tutorials/device42-tutorial.mdx +++ b/docs/getstarted/tutorials/device42-tutorial.mdx @@ -100,8 +100,8 @@ Of course, there are forms available for screen-based data entry via the UI, as Three tutorials are available to help familiarize you with the Device42 system, and a selection of How-to videos are available that address common questions: ([Check out the how-to videos index here!](docs/how-to-videos/index.md)) 1. The [Loading Data Using the API Tutorial](getstarted/tutorials/tutorial-loading-data-using-the-api.md) uses the API to load a fairly robust set of data into Device42 system. Don't be concerned if you are not a programmer. The script used in this tutorial is a very simple bash script. Please send us a note if you would like a sample in PowerShell, Python or other languages. -2. The [Loading Data Using Spreadsheets Tutorial](/getstarted/tutorials/tutorial-loading-data-using-spreadsheets.md) uses spreadsheets to load data. There is no scripting involved. If you are fairly certain that you will never script API calls, this is the tutorial you should use. -3. The [Navigating The Device42 User Interface Tutorial](getstarted/tutorials/tutorial-navigating-the-device42-user-interface.md) explores the Device42 core features using your data (follow the above tutorials to create data, or should you not have time to create your own data, request a sample spreadsheet of data by emailing support@device42.com. This sample spreadsheet will load a wide variety of data in Device42; use tutorial #2, "Loading data using spreadsheets" to load the sample data). +2. The [Loading Data Using Spreadsheets Tutorial](/getstarted/tutorials/tutorial-loading-data-using-spreadsheets.mdx) uses spreadsheets to load data. There is no scripting involved. If you are fairly certain that you will never script API calls, this is the tutorial you should use. +3. The [Navigating The Device42 User Interface Tutorial](getstarted/tutorials/tutorial-navigating-the-device42-user-interface.mdx) explores the Device42 core features using your data (follow the above tutorials to create data, or should you not have time to create your own data, request a sample spreadsheet of data by emailing support@device42.com. This sample spreadsheet will load a wide variety of data in Device42; use tutorial #2, "Loading data using spreadsheets" to load the sample data). It might not be necessary to work through all of the tutorials, but we absolutely recommend that you work through at least one of them if you're new. Many will find it beneficial to follow through on more than one tutorial, as well, gaining valuable experience along the way. If you'd like to keep your Device42 instance fresh for each tutorial, or would like to revert back to fresh after doing one, simply use hypervisor snapshots (ask your IT/sysadmin if you don't manage Device42!), start with a new copy of the Device42 virtual appliance, or set up a dedicated training environment! diff --git a/docs/getstarted/tutorials/index.md b/docs/getstarted/tutorials/index.md index d1895bb5..96946935 100644 --- a/docs/getstarted/tutorials/index.md +++ b/docs/getstarted/tutorials/index.md @@ -9,6 +9,6 @@ Welcome to the Device42 tutorials section. Choose a topic below to get started! ## Table of contents - [Tutorials Overview](/getstarted/tutorials/device42-tutorial.mdx) -- [Tutorial: Loading Data Using Spreadsheets](getstarted/tutorials/tutorial-loading-data-using-spreadsheets.md) +- [Tutorial: Loading Data Using Spreadsheets](getstarted/tutorials/tutorial-loading-data-using-spreadsheets.mdx) - [Tutorial: Loading Data using the API](getstarted/tutorials/tutorial-loading-data-using-the-api.md) -- [Tutorial: Navigating the Device42 User Interface](getstarted/tutorials/tutorial-navigating-the-device42-user-interface.md) \ No newline at end of file +- [Tutorial: Navigating the Device42 User Interface](getstarted/tutorials/tutorial-navigating-the-device42-user-interface.mdx) \ No newline at end of file diff --git a/docs/getstarted/tutorials/tutorial-loading-data-using-spreadsheets.md b/docs/getstarted/tutorials/tutorial-loading-data-using-spreadsheets.md deleted file mode 100644 index 95ad4481..00000000 --- a/docs/getstarted/tutorials/tutorial-loading-data-using-spreadsheets.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: "Tutorial: Loading Data Using Spreadsheets" -sidebar_position: 1 ---- - -In this Tutorial, we will be loading data using the API Import feature. Using this feature, you can load any type of data that can be loaded via the device42 API which means it is possible to import just about all your data using this feature. To get started, click on Tools in the main menu and then click on 'Import/Export (xls)'. - -![](/assets/images/wpid6270-media_1403088743508.png) - -![](/assets/images/wpid6271-media_1403088819265.png) - -Each spreadsheet is loaded by first clicking the Choose File button (1) to select an Excel file then clicking the Import Excel File button (2) to load the data. - -The easiest way to create an API Import spreadsheet is to look through the list of imports on the page and find the one you need. Let's start by loading our buildings (3). Click on the Download Sample Excel File link (4) to get a sample spreadsheet. Click on the View Documentation link (5) to view the documentation to learn what the fields in the spreadsheet mean, which fields are required, and which are optional. - -Alternatively, you can download all your current data (6). If the Type of Import is "Create or update..." or "Modify...", you can then change and add data elements, and then reimport the spreadsheet with the Import Excel File button (2). - -### Loading sample data - -![Loading sample data](/assets/images/wpid6272-media_1403088949672.png) - -When you open the downloaded spreadsheet, the first two lines will have the API command and the API verb. It's not necessary to understand what these mean but if you want to, you can read the API Documentation. - -The third line has the field names and the actual data is in lines 4 and below. The example above loads two buildings into device42. If we wanted to load 20 buildings, we would put the data on rows 4 through 23 of the spreadsheet. - -When you click the View Documentation link for buildings, you will see... - -### Documentation - -![Documentation](/assets/images/wpid6273-media_1403089025837.png) - -As you can see from the documentation, the name of the building is required but the rest of the fields are optional (meaning you can leave them blank). - -Now, click the 'Choose File' button, select the downloaded buildings spreadsheet, and click the 'Import Excel File' button to load this building data. - -You should then see the message circled above indicating a successful load. - -Next, let's click the 'Home' menu item. - -![](/assets/images/wpid6274-media_1403089104159.png) - -You should then see the message circled above indicating a successful load. - -Next, let's click the 'Home' menu item... - -![](/assets/images/wpid6275-media_1403427508156.png) - -Your dashboard now shows that you have two buildings loaded. - -Click the Buildings hyperlink (circled above in red) to see the buildings data in device42. - -![](/assets/images/wpid6268-media_1375377991929.png) - -Here you see the two buildings listed. You can click on either building to see more detail about that particular building and/or to edit the building data. - -Next, let's add a couple of rooms. Download the 'Create or update rooms' spreadsheet. - -  - -When you open this sample spreadsheet, there are two rooms. Now, load the rooms spreadsheet just like you did with the building data. - -Please note that the room spreadsheet references the building name (or id). Because the building name (or id) is required to add a room, this means that the building has to be loaded before the room. Most of the imports will have logical references like these. - -A good order for the key objects is the following: - -* Add Buildings -* Add Rooms -* Add Vendors -* Add Racks -* Add Hardware Models -* Add Devices -* Add Devices to Racks -* Add Assets -* Add Switches (Devices) -* Add VLANs -* Add Subnets -* Add IP Addresses -* Add Application Components - -In fact, this is the data we'll be loading in this tutorial and this is the order we'll load the data. - -Next, load the Vendors and Racks spreadsheet. Also, please download the Devices spreadsheet. - -![](/assets/images/wpid6269-media_1375389545587.png) - -A few things to note: - -First, note that the device in row 7 is a blade chassis and that the devices in rows 8-10 are blades that go in that chassis. - -Second, note that the blade in row 8 is a virtual host and that the device in row 11 is a virtual machine that reside on the blade in row 8 and that the vm's in rows 13-15 reside in the nh-demo-02 physical server. - -Now, load this spreadsheet and also load the 'Add Devices to Racks' and 'Application Components' spreadsheet. - -At this point, our demo system has multiple buildings, rooms, racks, and devices. - -We've reached the end of this tutorial. Next, we encourage you to follow the Tutorial [Navigating the device42 User Interface](getstarted/tutorials/tutorial-navigating-the-device42-user-interface.md). We'd also like to encourage you browse through the documentation for more detailed information on the various device42 features. diff --git a/docs/getstarted/tutorials/tutorial-loading-data-using-spreadsheets.mdx b/docs/getstarted/tutorials/tutorial-loading-data-using-spreadsheets.mdx new file mode 100644 index 00000000..83f688a8 --- /dev/null +++ b/docs/getstarted/tutorials/tutorial-loading-data-using-spreadsheets.mdx @@ -0,0 +1,123 @@ +--- +title: "Tutorial: Loading Data Using Spreadsheets" +sidebar_position: 1 +--- + +import ThemedImage from '@theme/ThemedImage' +import useBaseUrl from '@docusaurus/useBaseUrl' +import apiImage from '/assets/images/tutorial-loading-data-using-spreadsheets/buildings-api-parameters.png' + +In this tutorial, we will load data to the Main Appliance using the API import feature. You can load any type of data that can be loaded via the Device42 API, which means it is possible to import just about all of your data using the import feature. + +To get started, navigate to **Tools > Imports/Exports (xls)**. + + + +## Workflow Overview + +The easiest way to create an API Import spreadsheet is to look through the list of import types (3) on the page to find the one you need. Click the **Download Sample Excel File** link (4) and add your data to it. + +To learn what the fields in the spreadsheet mean and which parameters are required, click the **View Documentation** link (5) to go to the API documentation. + +Click the **Browse** button (1) to select a prepared Excel file on your machine and click the green **Import** button (2) to upload the data. + + + +Alternatively, you can download all your current data (6) and add new data to it. If the **Type of Import** contains the words "Create" or "Update", you can change and add data elements, and then upload the spreadsheet with the **Import** button (2). + +## Buildings Example + +### Prepare the Excel Data + +![Loading sample data](/assets/images/tutorial-loading-data-using-spreadsheets/building-xls-modified-sample.png) + +Let's start by uploading building data. When you open the downloaded sample spreadsheet, you'll see the API URL and HTTP request method on the first two rows. + +The third row contains the field names. The actual data starts from the fourth row onwards. The example above shows two buildings to be loaded into Device42. If we wanted to load 20 buildings, we would put the data on rows 4 through 23 of the spreadsheet. + +### Consult the API Docs + +As you can see from the [documentation](https://api.device42.com/#Buildings_postBuildings), the name of the building is required but the rest of the fields are optional and can be left blank. + + + +### Upload the Excel File + +From the Main Appliance, **Browse** to your buildings spreadsheet and click the **Import** button to upload the data. + +You'll see a message indicating a successful upload. + + + +### View the Uploaded Data + +Navigate to **Infrastructure > Buildings** and find the two buildings listed in the table. You can click on a building name to view its details, edit, or add more information to it. + + + +You can also view the new building data from the **Classic Dashboard** on the home page. Click the number across the **Buildings** statistics to go to the buildings list page. + + + +## Load Related Data + +Next, let's add a couple of rooms. Download the **Rooms - Create Rooms** sample spreadsheet and add room data to it. + +A unique `building` name or the `building_id` is required to add a new room record, which means that building data needs to be added before room data. Most of the other imports will have logical references like these. + +### Upload Order + +A good order for uploading objects to Device42 is the following: + +* Add Buildings +* Add Rooms +* Add Vendors +* Add Racks +* Add Hardware Models +* Add Devices +* Add Devices to Racks +* Add Assets +* Add Switches (Devices) +* Add VLANs +* Add Subnets +* Add IP Addresses +* Add Application Components + +## Next Steps + +Next, we encourage you to follow the [Navigating the Device42 User Interface](/getstarted/tutorials/tutorial-navigating-the-device42-user-interface.mdx) tutorial. Browse through the documentation for more detailed information on the various Device42 features. \ No newline at end of file diff --git a/docs/getstarted/tutorials/tutorial-loading-data-using-the-api.md b/docs/getstarted/tutorials/tutorial-loading-data-using-the-api.md index 747af9d0..9e25a7a8 100644 --- a/docs/getstarted/tutorials/tutorial-loading-data-using-the-api.md +++ b/docs/getstarted/tutorials/tutorial-loading-data-using-the-api.md @@ -45,4 +45,4 @@ For example, hover over the "2nd Floor" hyperlink, and look at the lower left co ![wpid3355-media_1375697151375.png](/assets/images/wpid3355-media_1375697151375.png) -We've reached the end of this tutorial. Next, we encourage you to follow the Tutorial [Navigating the device42 User Interface](getstarted/tutorials/tutorial-navigating-the-device42-user-interface.md). We'd also like to encourage you browse through the documentation for more detailed information on the various device42 features. +We've reached the end of this tutorial. Next, we encourage you to follow the Tutorial [Navigating the device42 User Interface](getstarted/tutorials/tutorial-navigating-the-device42-user-interface.mdx). We'd also like to encourage you browse through the documentation for more detailed information on the various device42 features. diff --git a/docs/getstarted/tutorials/tutorial-navigating-the-device42-user-interface.md b/docs/getstarted/tutorials/tutorial-navigating-the-device42-user-interface.md deleted file mode 100644 index 415a9609..00000000 --- a/docs/getstarted/tutorials/tutorial-navigating-the-device42-user-interface.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -title: "Tutorial: Navigating the Device42 User Interface" -sidebar_position: 3 ---- - -![Populated D42 Dashboard](/assets/images/d42_dashboard_v15.png) - -At this point, you should have data in your Device42 system from following one of the two "Loading Data" tutorials provided. If you go to the Device42 Home Page by clicking the 'Home' button on the menu bar, you will see the Dashboard above if you followed the [Spreadsheets tutorial](/getstarted/tutorials/device42-tutorial.mdx) and you will see a Dashboard with more objects if you followed the [API tutorial](getstarted/tutorials/tutorial-loading-data-using-the-api.md). - -In either case, let's take a tour through what we've created. - -Let's click on the Buildings hyperlink... - -![Select building to view](/assets/images/select_building_to_view_long.png) - -Let's click on 'New Haven DC'... - -![View New Haven bldg](/assets/images/view_bldg_new_haven.png) - -  - -And let's click on the _Room Layout_ button: - -![Room layout button](/assets/images/view_room_layout.png) - -  - -### Room Layout View - -![Room layout view](/assets/images/room_layout_view.png) - -  - -This is the room layout view. Here we can view the racks and their layout in a room. Notice that some racks are colored yellow and some are red -- while the others are colored green. **Green** means the _racks are empty and have lots of room_ to accomodate new devices. **Yellow** means _the rack has devices but there is still plenty of room_. **Red** indicates that the _rack is full_. There are 5 colors available and the colors can be assigned in Tools / Settings / Global Settings. - -If you have the **DCM Power Module** , you will also see options for power and temperature heat maps. - -Now let's hover over rack NH-DC1-04... - -![mouseover rack hover popup](/assets/images/mouse_hover_over_rack.png) - -  - -When you do this, you will see a hover box with detailed information about the rack. - -Now let's click 'View RA1 layout'... - -  - -### Rack Layout View - -![rack layout view](/assets/images/rack_layout_view.png) - -Here you see an image of the front of the rack on the left and the back of the rack on the right. - -As with the room layout view, if you have the DCM Power Module, you will see options for power and temperature heat maps. - -Notice while hovering over the 'NHCTCC01' device, we not only see the details about the device itself, but because the device is a blade chassis, you also see hyperlinks that will take you to the details page for each of the individual blades in chassis NHCTCC01. - -If you click 'View Toplogy', you will see a visual diagram of the physical and virtual machines and the applications they support.... - -  - -### Impact Charts - -![View topology impact chart](/assets/images/impact_chart_topology_view.png) - -  - -This is a fairly simple example but they can get quite complex. These impact charts are very useful for assessing the impact of losing a particular server. This can be helpful during business continuity planning and/or when trying to track down root cause during a production outage. - -  - -![](/assets/images/wpid3603-media_1375389640738.png) - -Similar to the blade chassis, if a device host virtual machines, you will see hyperlinks to each virtual machine. - -Now, let's learn how to edit data. Please go to _Devices --> All Devices..._ - -  - -### Viewing and Editing Data: The List View - -![view all devices overview](/assets/images/view_all_devices.png) - -  - -Here you see a list view of all your devices. On the right side of the screen you see a button to add a device. Below the add button, you see a number of filters that can be applied to reduce the size of the list. You can filter by device type, hardware model, OS, and so on. If you have hundreds or thousands of devices, these filters can be very useful. Similarly, there is a search box for filtering the list. If I type 'nh-demo' into the search box, the list will filter down to just the devices that contain the string 'nh-demo'. Last, there is an action bar for bulk operations such as delete (more on this later). - -All Device42 objects have a list view. The Add, Filter, Search, and Action tools are common to all Device42 objects. Add and Search will be present on all object list pages. Filter and Action will be present for most objects. - -### Bulk Actions - -![bulk actions dropdown](/assets/images/bulk_actions_dropdown.png) - -If you highlight one or more devices and then click the Action pulldown, you will see a number of bulk action choices. You can delete the selected devices or perform any of the actions in the dropdown on the selected devices. - -You will find bulk actions on most Device42 objects. Of course, the options will vary for each object. - -Next, click the a device hyperlink to see the Detail View for that device... We clicked device '08-upload-2-229': - -### Detail View - -![device detail view overview](/assets/images/detail_view_overview.png) - -The Detail View contains a great deal of information about the Device. A number of fields are cut out in the middle of image above to make it readable but you should be able to see them all on your screen if you are following along. - -Notice that there are 4 tabs of data (highlighted by the #1 red circle). Clicking on a tab brings you to another page of data for the device. - -There are also a set of Action Buttons (highlighted by the #2 red circle). The Edit button takes you to the Edit View for the device. The Edit View has the same information as the Detail View (including the tabs); however, the fields are editable. - -The History button takes you to an audit trail of the views and changes for this device. The Impact Chart brings up the impact chart we saw above. The Passwords button brings you to a List View for the password(s) for this device. - -All objects in Device42 have a List View, a Detail View, and an Edit View. Most also have a History button that shows the audit trail. - -  - -We've now reached the end of this tutorial. We'd like to encourage you browse through the documentation for more detailed information on the various Device42 features. diff --git a/docs/getstarted/tutorials/tutorial-navigating-the-device42-user-interface.mdx b/docs/getstarted/tutorials/tutorial-navigating-the-device42-user-interface.mdx new file mode 100644 index 00000000..27f2c1b1 --- /dev/null +++ b/docs/getstarted/tutorials/tutorial-navigating-the-device42-user-interface.mdx @@ -0,0 +1,201 @@ +--- +title: "Tutorial: Navigating the Device42 User Interface" +sidebar_position: 3 +--- + +import ThemedImage from '@theme/ThemedImage' +import useBaseUrl from '@docusaurus/useBaseUrl' + +## Prerequisites + +This tutorial uses sample data added to the Main Appliance from the [API tutorial](getstarted/tutorials/tutorial-loading-data-using-the-api.md). You can still follow along if you have at least one building record that includes a room with related rack CIs (Configuration Objects). + +## Dashboard View + +On the home page of the Main Appliance, you'll see your dashboard below the notification summary. The dashboard provides summary information and statistics for items added or discovered by Device42. Select a dashboard option that displays the most useful information for you from the dropdown menu. + + + +If you've followed the [spreadsheets tutorial](/getstarted/tutorials/device42-tutorial.mdx), [API tutorial](getstarted/tutorials/tutorial-loading-data-using-the-api.md), or run an autodiscovery job, your dashboard statistics will reflect the new CIs. + + + +Click on the building count, or navigate to **Infrastructure > DataCenter > Buildings** to go to the buildings list view. + + + +Click on the **New Haven DC** building, scroll down, and select the **NHDC1** room. + + +  + +Click the ellipsis button on the **NHDC1** room page and select **Room Layout**. + + +  + +## Room Layout View + +This is the room layout view. Here we can view the racks and their layout in a room. + + + + +Under **Display Options**, you can choose which text and color coding to apply to the layout: +- **Rack Display:** Choose the text to include on the rack labels. +- **Rack Color:** Choose between the usage or temperature heatmaps, or select a [custom field](/administration/custom-key-value-pairs-explained.mdx). + +:::info +See [Buildings and Rooms](/infrastructure-management/buildings-rooms-and-racks/buildings-and-rooms/#room-layout-view.mdx) for information on editing room layouts. +::: + +If you have the **DCM Power Module**, you will also see options for power and temperature heat maps. + +Now hover over the rack **NH-DC1-04** example. + + + +When you do this, you will see a hover box with detailed information about the rack. Now, click on the **View NH-DC1-04 Layout** link to go to the rack layout view. + +## Rack Layout View + +Here you see an image of the front of the rack on the left and the back of the rack on the right. + +:::tip +If you want to add a new rack with the kind of information shown below, navigate to **Infrastructure > Racks** and click **+ Add Rack** on the right of the Racks list page. +::: + + + +As with the room layout view, if you have the DCM Power Module, you will see options for power and temperature heat maps. + +While hovering over the "NHCTCC01" device, you can see details about the device itself, and because the device is a blade chassis, you also see hyperlinks that will take you to the details page for each of the individual blades in chassis NHCTCC01. + +Now click the **View Topology** link on the bottom right. + +## Topology Charts + +The topology impact chart is a diagram of the physical and virtual machines and the applications they support. + + + +This is a fairly simple example but they can get quite complex. These impact charts are very useful for assessing the impact of losing a particular server. This can be helpful during business continuity planning or when trying to track down a root cause during a production outage. + +## The List View + +Go to **Resources > All Devices** to view all your devices. + +All Device42 objects have a list view. The add, filter, search, and action tools are common to all Device42 objects. + + + +On the right side of the screen, you see a button to add a device (1). + +You'll see several filters that can be applied to reduce the size of the list (2). You can filter by device type, hardware model, OS, and more. If you have hundreds or thousands of devices, these filters can be very useful. + +Similarly, there is a search box for filtering the list (3). If you type "nh-demo" into the search box, the list will filter down to just the devices that contain the string "nh-demo". + +There is an action bar for bulk operations, like deleting items (4). + +## Bulk Actions + + + +Click the **Select and action** dropdown menu to see several bulk action choices. You can delete the selected devices or perform any of the actions in the dropdown on the selected devices. To execute the selected action, select one or more devices and click the **hammer icon**. + +You will find bulk actions on most Device42 objects, but the options will vary for each object. + +## Detail View + +All objects in Device42 have a list view, a detail view, and an edit view. Most objects also have a **History (Audit Logs)** button that shows a history of changes to the object. + +Click a device name to view its details. + + + +Notice the set of buttons on the top right corner of the view. Click the **Edit** button to open up the fields for editing and additions. Click the **ellipsis icon** for related view options, including the **Impact Chart** option we saw above. + +Scroll down for tabs that open subpages of data for the device. + + + +Browse through the documentation for more detailed information on the various Device42 features. diff --git a/docs/integration/api-overview/importing-csv-files-into-d42-using-the-api-helper-utility.md b/docs/integration/api-overview/importing-csv-files-into-d42-using-the-api-helper-utility.md index 01c14f9a..d5975f4e 100644 --- a/docs/integration/api-overview/importing-csv-files-into-d42-using-the-api-helper-utility.md +++ b/docs/integration/api-overview/importing-csv-files-into-d42-using-the-api-helper-utility.md @@ -3,53 +3,56 @@ title: "Importing CSV files into D42 using the API helper utility" sidebar_position: 3 --- -Device42 RESTful APIs make it simple to import data into the D42 appliance. In this section, we will discuss how you can use the API helper script to import csv files into Device42 using the APIs. +Device42 RESTful APIs make it simple to import data into the Main Appliance. This guide will show you how to use the Device42 API helper script to import CSV files into Device42 using APIs. -## Requirement and script location +## Requirements -Only requirement is python 2.7.x. Available at: [https://www.python.org/download/releases/](https://www.python.org/download/releases/) +You'll need the following to get started: -The API helper script is available at: [https://github.com/device42/API\_Helpers](https://github.com/device42/API_Helpers) +- A Python installation that's available from [https://www.python.org/download/releases/](https://www.python.org/download/releases/). -## Get the URL and field names +- The sample API helper script from [https://github.com/device42/API\_Helpers](https://github.com/device42/API_Helpers). -This sample script can be easily modified to read a comma-delimited csv file of data for any of the API's supported by Device42. +## Get the URL and Field Names -- From the [API documentation](https://api.device42.com/), determine which API call you need to use. -- From the documentation of the API call, note the URL (e.g. /api/1.0/custom\_fields/appcomp/) and the URL method (either PUT or POST). +This sample script can be easily modified to read a comma-delimited CSV file for any of the APIs supported by Device42. Visit the [API documentation](https://api.device42.com/) and find the API call you need to use. + +- Note the URL endpoint (for example, `/api/1.0/custom\_fields/appcomp/`) and the URL method (for example, `PUT` or `POST`). ![URL method](/assets/images/importing-csv-files/api-docs-method.png) -- From the documentation of the API call, identity the mandatory fields you must include and the optional fields you wish to include. +- Identify the mandatory fields you must include and the optional fields you want to include. ![Required fields](/assets/images/importing-csv-files/api-docs-required-fields.png) -## Create the CSV file +## Create a CSV File ![Table with data for API use](/assets/images/importing-csv-files/csv-file-headings.png) -Create comma separated CSV file with following: +Create a CSV file of comma-separated values that has the following: - The header row (first line) values must match the API field names found in the [documentation](https://api.device42.com/). -- After the header row, there should be one row of values for each data record that you need to send to the device42 appliance. +- After the header row, there should be a row of values for each data record you need to send to the Main Appliance. - Each line in the CSV file must have a value for each mandatory field. -## Modify the script +## Modify the Script ![Python script](/assets/images/importing-csv-files/api-python-script.png) -You will need to Change lines 25-30 in the script to match your environment: +Change lines 25-30 of the script to match your environment: -- **D42\_API\_URL** includes your Device42 IP or FQDN (1) followed by the API call URL (2) that you found in the API documentation. -- Add your **D42\_USERNAME** and **D42\_PASSWORD**. -- **API\_METHOD** will be put or post, depending on the documentation for the particular API. -- **CSV\_FILE\_NAME** will be the name of the CSV file with data you created [previously](#create-the-csv-file). -- **DEBUG** can be changed to True or False, depending on how verbose you want the output to be. +- **`D42_API_URL`:** Your Device42 IP or FQDN (1) followed by the API call URL (2) that you found in the API documentation. +- Add your **`D42_USERNAME`** and **`D42_PASSWORD`**. +- **`API_METHOD`:** Will be `'put'` or `'post'` depending on the documentation for the particular API. +- **`CSV_FILE_NAME`:** The name of the CSV file with the data you created [previously](#create-the-csv-file). +- **`DEBUG:`** A value of `True` or `False`. A `True` value will return a detailed output. -## Execute the script +## Execute the Script -Once you save the file, you can execute _(python script\_name.py)_. After the script completes, it will print two sections of information: The **added** section will show all the rows that were added successfully. The **notadded** section will have any rows that failed and the reason for the failure. +Save the file and execute it by running `python script_name.py`. The script will print two sections of information: +- **added:** All the rows that were added successfully. +- **notadded:** Any rows that haven't loaded and the reason for the failure. ## Additional Resources -Watch our [API Imports hardware models](how-to-videos/api-imports-add-create-hardware-models.md) video for an example of how to use the API helper utility to import CSV files into Device42. +Watch our [API Imports hardware models](how-to-videos/api-imports-add-create-hardware-models.md) video for an example of how to use the API helper utility to import CSV files into Device42. \ No newline at end of file diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/building-xls-modified-sample.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/building-xls-modified-sample.png new file mode 100644 index 00000000..e6ac640b Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/building-xls-modified-sample.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-api-parameters.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-api-parameters.png new file mode 100644 index 00000000..9f97dc26 Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-api-parameters.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-list-page-dark.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-list-page-dark.png new file mode 100644 index 00000000..56b342bd Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-list-page-dark.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-list-page-light.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-list-page-light.png new file mode 100644 index 00000000..09611726 Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/buildings-list-page-light.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/classic-dashboard-dark.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/classic-dashboard-dark.png new file mode 100644 index 00000000..15807725 Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/classic-dashboard-dark.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/classic-dashboard-light.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/classic-dashboard-light.png new file mode 100644 index 00000000..ed2246b9 Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/classic-dashboard-light.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/import-excel-page-dark.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/import-excel-page-dark.png new file mode 100644 index 00000000..4244d7fe Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/import-excel-page-dark.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/import-excel-page-light.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/import-excel-page-light.png new file mode 100644 index 00000000..cc5c8568 Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/import-excel-page-light.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/imports-xls-menu-location-dark.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/imports-xls-menu-location-dark.png new file mode 100644 index 00000000..f95e7105 Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/imports-xls-menu-location-dark.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/imports-xls-menu-location-light.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/imports-xls-menu-location-light.png new file mode 100644 index 00000000..8eab16b8 Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/imports-xls-menu-location-light.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/success-message-dark.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/success-message-dark.png new file mode 100644 index 00000000..5b2814e3 Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/success-message-dark.png differ diff --git a/static/assets/images/tutorial-loading-data-using-spreadsheets/success-message-light.png b/static/assets/images/tutorial-loading-data-using-spreadsheets/success-message-light.png new file mode 100644 index 00000000..8aa6ca7f Binary files /dev/null and b/static/assets/images/tutorial-loading-data-using-spreadsheets/success-message-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/buildings-list-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/buildings-list-dark.png new file mode 100644 index 00000000..6c07f4b7 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/buildings-list-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/buildings-list-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/buildings-list-light.png new file mode 100644 index 00000000..c05c07aa Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/buildings-list-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/dashboard-stats-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/dashboard-stats-dark.png new file mode 100644 index 00000000..355b31a1 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/dashboard-stats-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/dashboard-stats-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/dashboard-stats-light.png new file mode 100644 index 00000000..ec3f2720 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/dashboard-stats-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/device-actions-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/device-actions-dark.png new file mode 100644 index 00000000..9840eac7 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/device-actions-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/device-actions-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/device-actions-light.png new file mode 100644 index 00000000..653e42c4 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/device-actions-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/device-tabs-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/device-tabs-dark.png new file mode 100644 index 00000000..fb8a1003 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/device-tabs-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/device-tabs-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/device-tabs-light.png new file mode 100644 index 00000000..e05f7515 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/device-tabs-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/devices-list-view-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/devices-list-view-dark.png new file mode 100644 index 00000000..9a806348 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/devices-list-view-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/devices-list-view-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/devices-list-view-light.png new file mode 100644 index 00000000..8a375097 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/devices-list-view-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/ellipsis-button-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/ellipsis-button-dark.png new file mode 100644 index 00000000..c667e284 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/ellipsis-button-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/ellipsis-button-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/ellipsis-button-light.png new file mode 100644 index 00000000..f569a2bd Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/ellipsis-button-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/new-haven-example-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/new-haven-example-dark.png new file mode 100644 index 00000000..5bd2d1d1 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/new-haven-example-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/new-haven-example-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/new-haven-example-light.png new file mode 100644 index 00000000..cacc6f37 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/new-haven-example-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/nhdc1-hover-box-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/nhdc1-hover-box-dark.png new file mode 100644 index 00000000..14669d1f Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/nhdc1-hover-box-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/nhdc1-hover-box-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/nhdc1-hover-box-light.png new file mode 100644 index 00000000..afa09c8e Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/nhdc1-hover-box-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/rack-layout-view-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/rack-layout-view-dark.png new file mode 100644 index 00000000..1dcbf726 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/rack-layout-view-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/rack-layout-view-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/rack-layout-view-light.png new file mode 100644 index 00000000..fed35835 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/rack-layout-view-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/room-layout-example-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/room-layout-example-dark.png new file mode 100644 index 00000000..df56ddd6 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/room-layout-example-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/room-layout-example-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/room-layout-example-light.png new file mode 100644 index 00000000..e45d43e1 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/room-layout-example-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/select-dashboard-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/select-dashboard-dark.png new file mode 100644 index 00000000..c09c1440 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/select-dashboard-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/select-dashboard-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/select-dashboard-light.png new file mode 100644 index 00000000..5f8a642e Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/select-dashboard-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/topology-example-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/topology-example-dark.png new file mode 100644 index 00000000..a4ec7743 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/topology-example-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/topology-example-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/topology-example-light.png new file mode 100644 index 00000000..a2088cd1 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/topology-example-light.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/view-device-dark.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/view-device-dark.png new file mode 100644 index 00000000..01d2b97a Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/view-device-dark.png differ diff --git a/static/assets/images/tutorial-navigating-the-device42-user-interface/view-device-light.png b/static/assets/images/tutorial-navigating-the-device42-user-interface/view-device-light.png new file mode 100644 index 00000000..c5343b43 Binary files /dev/null and b/static/assets/images/tutorial-navigating-the-device42-user-interface/view-device-light.png differ