Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added searchByMgmtHostname

  • Loading branch information...
commit cc2956f07e7af6078540b2b26207d7a21e46d97b 1 parent 8c5be27
@soffi authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 wwwroot/api.php
View
15 wwwroot/api.php
@@ -1,5 +1,6 @@
<?php
-
+// this is from: https://github.com/ibettinger/racktables/
+// his repo was 0.20.0 but I was already running a 0.20.1 schema so I grabbed this to work on it
// TODO: look into using global $sic, which has merged GET and POST parameters, instead of $_REQUEST['blah'].
// Apparently it may handle UTF-8 arguments better. Created in transformRequestData().
@@ -23,6 +24,18 @@
break;
+ // get object_id by its FQDN
+ // using function searchByMgmtHostname()
+ // soffanias@gmail.com
+ case 'searchByMgmtHostname':
+ require_once 'inc/init.php';
+
+ assertStringArg ("fqdn", TRUE);
+
+ $object_id = searchByMgmtHostname(( $_REQUEST['fqdn'] ));
+
+ sendAPIResponse($object_id);
+ break;
// get overall 8021q status
// UI equivalent: /index.php?page=8021q
Please sign in to comment.
Something went wrong with that request. Please try again.