[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4511: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4512: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4513: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
Support Incident Tracker Forum • View topic - add inventory api

add inventory api

Discuss and get help with plugins. Share your ideas for future SiT! features.

add contact api

Postby daleto » Thu Sep 05, 2013 11:59 pm

Want an API to automatically create contact persons so that I can connect this system with our ordering systems

Code: Select all
addcontract()
{
   site=$(echo "SELECT id FROM sites WHERE name='$company'"|mysql -N $DB)
   product=$(echo "SELECT id FROM products WHERE name='$order_item_sku'"|mysql -N $DB)
   reseller=1

   mysql -N $DB <<- eof

      INSERT INTO maintenance (
         site,
         product,
         reseller,
         expirydate,
         licence_quantity,
         licence_type, notes,
         admincontact,
         servicelevelid,
         incidentpoolid,
         incident_quantity,
         productonly,
         term,
         supportedcontacts,
         allcontactssupported)
      VALUES (
         '$site',
         '$product',
         '$reseller',
         CURDATE() + INTERVAL 1 YEAR,
         '$licence_quantity',
         '$licence_type',
         '$notes',
         '$user_id',
         '$servicelevelid',
         '$incidentpoolid',
         '$incident_quantity',
         '$productonly',
         '$term',
         '$numcontacts',
         '$allcontacts');
   eof
}
daleto
SiT! Fan
SiT! Fan
 
Posts: 12
Joined: Thu Sep 05, 2013 11:55 pm

add service api

Postby daleto » Fri Sep 06, 2013 12:02 am

Hi,
I want an "addservice" api so that I can connect SiT with our ordering system.

Code: Select all
addservice()
{
   maintid=$(echo "SELECT max(id) FROM maintenance WHERE site='$site' AND product=$product"|mysql -N $DB)
   enddate=$(echo "SELECT max(expirydate) FROM maintenance WHERE site='$site' AND product=$product"|mysql -N $DB)

   mysql -N $DB <<- eof
      INSERT INTO service (
         contractid,
         startdate,
         enddate,
         creditamount,
         unitrate,
         incidentrate,
         foc)
      VALUES (
         '$maintid',
         NOW(),
         '$enddate',
         '$amount',
         '$unitrate',
         '$incidentrate',
         '$foc');
   eof
}
daleto
SiT! Fan
SiT! Fan
 
Posts: 12
Joined: Thu Sep 05, 2013 11:55 pm

add contract api

Postby daleto » Fri Sep 06, 2013 12:03 am

Hi,

I want an API to add contract so that I can connect this to our ordering system.

Code: Select all
addcontract()
{
   site=$(echo "SELECT id FROM sites WHERE name='$company'"|mysql -N $DB)
   product=$(echo "SELECT id FROM products WHERE name='$order_item_sku'"|mysql -N $DB)
   reseller=1

   mysql -N $DB <<- eof

      INSERT INTO maintenance (
         site,
         product,
         reseller,
         expirydate,
         licence_quantity,
         licence_type, notes,
         admincontact,
         servicelevelid,
         incidentpoolid,
         incident_quantity,
         productonly,
         term,
         supportedcontacts,
         allcontactssupported)
      VALUES (
         '$site',
         '$product',
         '$reseller',
         CURDATE() + INTERVAL 1 YEAR,
         '$licence_quantity',
         '$licence_type',
         '$notes',
         '$user_id',
         '$servicelevelid',
         '$incidentpoolid',
         '$incident_quantity',
         '$productonly',
         '$term',
         '$numcontacts',
         '$allcontacts');
   eof
}
daleto
SiT! Fan
SiT! Fan
 
Posts: 12
Joined: Thu Sep 05, 2013 11:55 pm

add site api

Postby daleto » Fri Sep 06, 2013 12:04 am

Hi,
I want an API to create sites so that I can connect this system with our ordering system

Code: Select all
addsite()
{
   mysql -N $DB <<- eof
      INSERT INTO sites (
         name,
         department,
         address1,
         address2,
         city,
         county,
         country,
         postcode,
         telephone,
         fax,
         email,
         websiteurl,
         notes,
         typeid,
         owner)
      VALUES (
         '$company',
         '$department' ,
         '$address_1',
         '$address_2',
         '$city',
         '$county',
         '$country',
         '$zip',
         '$phone_1',
         '$fax',
         '$user_email',
         '$websiteurl',
         '$notes',
         '$typeid',
         '$owner');
   eof
}
daleto
SiT! Fan
SiT! Fan
 
Posts: 12
Joined: Thu Sep 05, 2013 11:55 pm

add user api

Postby daleto » Fri Sep 06, 2013 12:07 am

Hi,
I want an api to create users to be able to connect this system to our ordering system:

Code: Select all
{
   password=$(date|md5sum)
   mysql -N $DB <<- eof
      INSERT INTO contacts (
         username,
         password,
         courtesytitle,
         forenames,
         surname,
         jobtitle,
              siteid,
         address1,
         address2,
         city,
         county,
         country,
         postcode,
         email,
         phone,
         mobile,
         fax,
              department,
         notes,
         dataprotection_email,
         dataprotection_phone,
         dataprotection_address,
                timestamp_added,
         timestamp_modified,
         created,
         createdby,
         modified,
         modifiedby,
         contact_source)
      VALUES ('$user_email',
         MD5('$password'),
         '$courtesytitle',
         '$first_name',
         '$last_name',
         '$jobtitle',
                 '$siteid',
         '$address_1',
         '$address_2',
         '$city',
         '$county',
         '$country',
         '$postcode',
         '$user_email',
         '$phone_1',
         '$mobile',
         '$fax',
         '$department',
         '$notes',
         'No',
         'No',
         'No',
         NOW(),
         NOW(),
         NOW(),
         1,
         NOW(),
         1,
         1);
   eof
}
daleto
SiT! Fan
SiT! Fan
 
Posts: 12
Joined: Thu Sep 05, 2013 11:55 pm

add reseller api

Postby daleto » Fri Sep 06, 2013 12:08 am

Hi,

I want an API in SIT to crate resellers so that I can connect this to our ordering system.

Code: Select all
INSERT INTO resellers (name) VALUES ('$name')
daleto
SiT! Fan
SiT! Fan
 
Posts: 12
Joined: Thu Sep 05, 2013 11:55 pm

add inventory api

Postby daleto » Fri Sep 06, 2013 12:09 am

Hi,
I want an "add inventory" api in SiT to be able to connect this to our ordering system.

Code: Select all
-------- adding inventory -------------------

INSERT INTO inventory(
   address,
   username,
   password,
   type,
   notes,
   created,
   createdby,
   modified,
   modifiedby,
   active,
   name,
   siteid,
   privacy,
   identifier,
   contactid)
VALUES(
   '{$post['address']}',
   {$post['username']}',
   '{$post['password']}',
   {$post['type']}',
   $post['notes']}',
   NOW(),
   '{$sit[2]}',
   NOW(),
   '{$sit[2]}',
   '1',
   '{$post['name']}',
   '{$post['site']}',
   '{$post['privacy']}',
   '{$post['identifier']}',
   '{$post['owner']}')

---------------------------------------
daleto
SiT! Fan
SiT! Fan
 
Posts: 12
Joined: Thu Sep 05, 2013 11:55 pm

Re: add inventory api

Postby Tomse » Fri Sep 06, 2013 8:38 am

Welcome to the forums.
I've merged the topics.

I can't tell if you are asking to have features added to SiT so you can create plugins yourself,
or if you are asking the community to help you create a plugin for you to do what you want.

can you please elaborate

cheers
Tomse
If you have a problem, give us enough info of what you have done, what is configured in relation to your question.
Enable debugging and post it's censored but relevant info. Don't forget to write which version of SiT you're running.
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 1137
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: add inventory api

Postby daleto » Tue Dec 10, 2013 2:43 am

Thanks for reply Tomse,

It would be nice if there is an API to connect SiT with other tools, so that the inventories/contracts/users can be created using this API's
So threat it as a feature for SiT.

Regards Tomas
daleto
SiT! Fan
SiT! Fan
 
Posts: 12
Joined: Thu Sep 05, 2013 11:55 pm

Re: add inventory api

Postby ivanlucas » Tue Jan 21, 2014 2:45 pm

If you want to see a feature added to SiT! please add it to our issue tracker, see Bugs. Patches are most welcome.
Ivan Lucas, Project Lead, Support Incident Tracker (SiT!) GPL. ......... Chat live on irc, #sit on freenode.
Help free software: Make a donation to the SiT! project or Join the Free Software Foundation as an Associate Member.
User avatar
ivanlucas
SiT! Developer
SiT! Developer
 
Posts: 998
Joined: Sun Feb 01, 2009 9:49 pm
Location: Derbyshire, UK


Return to Plugins & Extending SiT!

Who is online

Users browsing this forum: No registered users and 1 guest

cron