Jump to content

Search the Community

Showing results for tags 'api'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • News
    • The Lounge
  • Community
    • Pre-Sales Questions
    • Support
    • The Marketplace
    • Contribute
    • Show Off
    • Feature Requests
    • Bugs
    • Contests
  • Developer Corner
    • General
    • Extensions
  • BlestaStore's Forum
  • BlestaStore's BlestaCMS
  • BlestaStore's Resellers
  • BlestaStore's BlestaForums
  • BlestaStore's Promotions
  • CubeData's Official Announcements From CubeData
  • CubeData's Peer Support
  • CubeData's Resellers
  • ModulesGarden Club's Topics
  • Blesta Addons's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Wire


Location


Interests

Found 21 results

  1. Hi, I'm currently creating a module which automatically provisions a server in game server panel when a customer purchases a service in Blesta. This module sends a "server creation" request to a game server panel's API endpoint but this endpoint is asynchronous and just responses to the request with a running task ID. After server is created, the game server panel API will send another POST request which includes a server ID to a specific callback URL later. To receive the server ID, I would like to use Appcontroller.preAction event handler in module but is it even possible? I came up with the idea of creating a plugin only for receiving a server ID, but I feel having to enable both module and plugin is not a nice implementation. If anyone has any clean idea to make my dream come true, most welcomed. Thanks,
  2. Hello guys, I made a Blesta module that integrates Froxlor into Blesta similar to the cPanel module. Froxlor is a very lightway webhosting control panel written in PHP. It features all basic system management tasks required for webhosting and can be installed manually or from Debian packages. Froxlor allows the creation of standard users as well as resellers based on pre-defined or custom plans. This module enables the creation of users and resellers via Blesta. Whilst users may be created based on pre-defined hosting-plans only, resellers can be assigned custom resources. The installation of the module is pretty easy. You need a working froxlor installation before you can use this module. Download the file of a module release from Github Exract the content into your "/components/modules" folder and rename this folder to "froxlor" Go to the modules section in Blesta admin panel and install the Froxlor module On the page you're redirected to after installation, click on "Add Server". Generate an API Key in your Froxlor panel (top right menu "Options") Copy those API Keys into the corresponding fields in Blesta and click "Add Server" The server can be used now just like any other server resource. Github: GitHub - Hosting-MP/blesta-froxlor: This is a module for Blesta to which it adds integribility with froxlor. Auto-Login directly from Blesta is supported. This module enables the service management in Blesta but it doesn't replace the Froxlor web panel. You cannot modify any services directly from this module, except for password changes of the account. Additionally, this module doesn't sync attributes like name, customer-number, address etc. with Froxlor. This data is added on creation only. For sync an additional plugin is required. I hope you can make use of this module. Should you encounter any trouble, please create an issue at Github or reply in this thread. I'll update the wiki at Github with some useful tips over the next days. Additionally, compatibility with Froxlor 11.0 is planned soon, even though this Froxlor version is still in alpha (as of June 2022) but it looks like there's just few changes in the API required. It's yet to be tested if upgrades are working but this depends on Froxlor itself mostly. fixed
  3. Is there a way to force the namecheap module to use ipv4 only? The api does NOT support ipv6 (verified by namecheap support) and it causing errors when trying to purchase domains.
  4. At Blesta we want to be developer friendly. We put strong emphasis on open code, clear comments, logical file structure, and a powerful API to try to give developers as much power, flexibility, and clarity as possible. However, I've noticed in recent times that the learning curve can be a bit steep for developers getting started with Blesta. In addition we've seen comments saying that development can take a significant amount of time and people may get burned out or give up. That being said, we'd love to hear from the Blesta developer community or those interested in joining us. What we be the most useful ways to help you get started and continue developing on the Blesta platform? These are some of the things I was considering: More clear API docs for input More clear API docs for return values Generic code templates on github for Plugins, Modules, and the various Gateway types More events for Plugin's to tie into Video tutorials (Topic Suggestions?) Some sort of large FAQ A utility/wizard for generating a stubbed out extension (Complete) Let us know if you support any of these measures or have ideas of your own on how we can help. If you don't have a solution, but have a problem that bothers you or slows you down in development, leave a comment (a nice one :P) and perhaps someone else will have a good suggestion for how we can resolve it. We are grateful to all those who support us and have shown interest in the product. It truly warms my heart to see all of those who help each other out both here on the forums and in the discord server.
  5. I'm trying to find a way to retrieve the client_id of a client via the API using only the clients id_value/id_code (Client ID displayed in the client dashboard) as a source. Is there a way to achieve this? I'm attempting to add client transactions via the API where the client id_value, amount, and currency are the only data provided.
  6. I setup API with un: 123 key: ec844ceefaff1d1f2d230ed1ce5b2631 It doesn't seem to be working: [root@cp ~]# curl -k https://katy.com/billing/api/invoices/add.json -u 123:ec844ceefaff1d1f2d230ed1ce5b2631 -d 'vars[client_id]=1' -d 'vars[date_billed]=2013-11-20T16:43:00-07:00' -d 'vars[date_due]=2013-11-20T16:43:00-07:00' -d 'vars[currency]=USD'[B {"message":"The authorization details given appear to be invalid.","errors":{"user":{"valid":"The API user or key appears to be invalid."}},"response":null}[root@cp ~]# Where did I go wrong? After posting this note I delete API user 123
  7. The API document provides this example for adding invoices, how do I add clients via curl / API? curl https://yourdomain.com/installpath/api/invoices/add.json -u username:key -d 'vars[client_id]=1' -d 'vars[date_billed]=2013-11-20T16:43:00-07:00' -d 'vars[date_due]=2013-11-20T16:43:00-07:00' -d 'vars[currency]=USD' -d 'vars[lines][0][description]=Line item #1' -d 'vars[lines][0][amount]=5.99' -d 'vars[lines][1][description]=Line item #2' -d 'vars[lines][1][amount]=3.75' -d 'vars[lines][1][qty]=2' -d 'vars[delivery][0]=email'
  8. Hello to all, At this time I'm using the Namecheap module to resell web domains. I need to create a new module for a manager (https://www.ovh.it/domini/) that is not in the list. How can I do? Help me solve this problem? Thank you very much, Yours sincerely
  9. Hi. When I try to call the Packages\Edit function through the API, it fails with the following error: { "response": null, "error": { "name": { "empty": "Please enter a package name." }, "email_content[0][lang]": { "empty": "Please enter a language." }, "pricing[0][currency]": { "format": "Currency code must be 3 characters." } } } Here's my code which calls the API: public function deactivatePackage($id = null) { global $blestaapi; $response = $blestaapi->put("packages", "edit", array("package_id" => $id, "vars" => array("status" => "restricted"))); $responseParsed = array("response" => $response->response(), "error" => $response->errors()); return $responseParsed; } I'm quite confused, because it seems that I call the Packages\Add function because it complains about the missing options that are a optional in Packages\Edit but not in Packages\Add.
  10. Hi There, I'm trying to generate an invoice using the API. I have included the contents of my 'vars' parameter that is sent to the API. The response i'm getting is just {"message":"The format requested is not supported by the server.","response":null} Is it something simple i'm missing here? Setting an option when I shouldn't be? The docs at http://source-docs.blesta.com/class-Invoices.html do not specify which options are optional on the invoice ( they do for lines of the invoice ) so I wasn't sure which ones were required. Does the invoice term need to match the service term some how? Update: I notice two of my lines below have a zero amount. I have tried without these and its the same result. Thanks in advance for any help! <?php $vars = array ( 'vars' => array ( 'client_id' => 119, 'currency' => 'GBP', 'status' => 'active', 'lines' => array ( 0 => array ( 'service_id' => 108, 'description' => 'Minute Bundles', 'amount' => 5, 'tax' => true, 'qty' => 1, ), 1 => array ( 'service_id' => 108, 'description' => 'Included Top Up', 'amount' => 0, 'tax' => true, 'qty' => 1, ), 2 => array ( 'service_id' => 108, 'description' => 'Intergalactic Minutes Bundles', 'amount' => 0, 'tax' => true, 'qty' => 1, ), 3 => array ( 'service_id' => 108, 'description' => 'Handware Option', 'amount' => 65, 'tax' => true, 'qty' => 1, ), 4 => array ( 'service_id' => 108, 'description' => 'Plumbus Deluxe McSneeze', 'amount' => 100, 'tax' => true, 'qty' => 1, ), ), 'date_billed' => '2017-02-03 11:36:11', 'due_date' => '2017-02-10 11:36:11', 'term' => 1, 'period' => 'month', 'duration' => 'indefinitely', ), ); ?>
  11. How does one place an order just by interacting with the API rather than the order form? I'd like to replicate all the actions that would occur when using the order form. New users can be created with the User model, but what needs to be done to ensure that a new service is created and invoiced? A new service could be created via Services->Add. This can even notify the user that the service has been created. Will it create the initial invoice as well, and activate the service once that invoice has been paid, or does the order plugin need to be used for all of that to happen? The order plugin has models available that aren't documented at http://source-docs.blesta.com/package-blesta.app.models.html (presumably because they are plugin models rather than base Blesta models) It looks like the "add" function in plugins/order/models/order_orders.php may be what I'm looking for - is that all I need to call, or is there some additional work that needs to be done to complete this process?
  12. gmecsol

    Domainbox Module

    Hi, Can any one guide me about how to set up a domainbox module to resell domainbox products to my customers as i looked and read all the documentation from them but i can't do that. If any one can do that for me kindly quote that as well for me
  13. On the `currencies.php` model there is a method `toDecimal` which is labeled as the "precision" of a currency. As I understand it the intention is to turn a float similar to "12.622222" into "12.62". The functionality it actually provides is via the AppModel->truncateDecimal method which is a `minimum` precision as per the documentation. This leads to raw pricing data without truncated precision as per the currency's database configuration. For example USD pricing will result in: { "id": "1", "pricing_id": "1", "package_id": "1", "term": "1", "period": "month", "price": "10.00", "setup_fee": "0.00", "cancel_fee": "0.00", "currency": "USD" } but pricing for GBP is { "id": "1", "pricing_id": "1", "package_id": "1", "term": "1", "period": "month", "price": "6.9834", "setup_fee": "0.00", "cancel_fee": "0.00", "currency": "GBP" } I believe the frontend or view layer of Blesta is obfuscating this minor problem from being apparent. It's a significant issue for identifying the accurate pricing when the Blesta API is being consumed directly.
  14. I need import from other database my customers list to clients in blesta, but i want do it from API, how can i do it? (I'm sorry, but I know a little english)
  15. Hello, I am using Blesta 3.6.1 and Stripe gateway to process credit card payments. FROM BLESTA ============ Stripe (ver 1.3.1) Author: Phillips Data, Inc. FROM STRIPE =========== API VERSION: 2015-07-28 Should I upgrade to the latest STRIPE API version? Is Blesta compatible with it? I am asking because today I could not complete an AMEX transaction which BLESTA displayed the error below despite of having the right information. The zip code you supplied failed validation. Then, I used BrainTree gateway via their control panel to run the transaction and it was fine. Thank you. NOTES from STRIPE: Upgrading your API version may break your implementation. Be sure to read the list of changes* made since your version. You'll be able to roll back to your previous API version for the next 6 hours. You're upgrading to the latest API version from 2015-07-28. Here's a few major changes that may affect you: An error is now returned if invalid parameters are passed in the card or bank account parameters hash during token, customer source, or external account creation. On Charges, the deprecated offset parameter is now only supported when filtering by charge source type. Be sure to read the full list of changes* to see all breaking changes for this upgrade. * https://stripe.com/docs/upgrades?since=2015-07-28#api-changelog
  16. Hey Blesta (users), Is there any Customer API available, where they are able to place orders, products and so on? As I see the API build in Blesta isn't for customers, or is that wrong? Thanks, Wouter
  17. Now i build a new user center base on blesta api.Simplifying a number of steps. In this site user can view invoices, so, how can i make this go to payment url? instead of redevelopment. my english is poor,May be expressed is not clear. thanks you.
  18. Hi All, I'm having a few issues when setting up the Multicraft module in Blesta. I'm running Multicraft 2.0.0 and Daemon 1.8.4. I can create servers manually in Multicraft but when I use the module in Blesta it doesn't auto create. Even when manually activating the service via Blesta I get the error below. An internal error occurred, or the server did not respond to the request. The API is enabled in Multicraft and I believe I've followed the instructions on the Blesta website for inputting the API information and setting everything up. Im really at a loss as to why this isn't working. Help!!
  19. resolvent : $reply_data = array( 'ticket_id'=>9, 'vars' => array( 'ticket_id'=>9, 'staff_id' => null, // the reply is from this staff user 'client_id' => 2, // the reply is from this client user 'contact_id' => null, // the reply is from this client contact user 'type' => "reply", // this is a ticket reply 'details' => "API reply", // the ticket reply description 'status' => "open", // status of the ticket 'staff_id' => null, // the staff user the ticket is assigned to ), 'files' => null, 'new_ticket' => false // this reply is for a newly created ticket ); $response = $api->post("support_managerpro.support_managerpro_tickets", "addReply", $reply_data); ================================================================================================================================= Now i need to use api reply tickets. But I've had some problems. This is my code: $vars=array('ticket_id'=>9,'details'=>'API回复工单','action_type'=>'reply','type'=>'reply','staff_id'=>null,'contact_id'=>null,'status'=>'open'); $ticket= $api->post("support_managerpro.support_managerpro_tickets", "addReply",array("ticket_id"=>9,$vars)); print_r($ticket->raw()); when i use $ticket= $api->post("support_managerpro.support_managerpro_tickets", "addReply",array("ticket_id"=>9,$vars)); this page return {"message":"An unexpected error occured.","response":"Internal error: Failed to retrieve the default value"} when i use $ticket= $api->get("support_managerpro.support_managerpro_tickets", "addReply",array("ticket_id"=>9,$vars)); this page return this error info:{"message":"The requested resource does not exist.","response":null} What should I do to use API to achieve a reply?thanks! support_managerpro:: Model's addReply method(): /** * Adds a reply to a ticket. If ticket data (e.g. department_id, status, priority, summary) have changed * then this will also invoke SupportManagerproTickets::edit() to update the ticket, and record any log entries. * * Because of this functionality, this method is assumed to (and should) already be in a transaction when called, * and SupportManagerproTickets::edit() should not be called separately. * * @param int $ticket_id The ID of the ticket to reply to * @param array $vars A list of reply vars, including: * - staff_id The ID of the staff member this reply is from (optional) * - client_id The ID of the client this reply is from (optional) * - contact_id The ID of a client's contact that this reply is from (optional) * - type The type of reply (i.e. "reply, "note", "log") (optional, default "reply") * - details The details of the ticket (optional) * - department_id The ID of the ticket department (optional) * - summary The ticket summary (optional) * - priority The ticket priority (optional) * - status The ticket status (optional) * - ticket_staff_id The ID of the staff member the ticket is assigned to (optional) * @param array $files A list of file attachments that matches the global FILES array, which contains an array of "attachment" files * @param boolean $new_ticket True if this reply is apart of ticket being created, false otherwise (default false) * @return int The ID of the ticket reply on success, void on error */ public function addReply($ticket_id, array $vars, array $files = null, $new_ticket = false) { $vars['ticket_id'] = $ticket_id; $vars['date_added'] = date("c"); if (!isset($vars['type'])) $vars['type'] = "reply"; // Remove reply details if it contains only the signature if (isset($vars['details']) && isset($vars['staff_id'])) { if (!isset($this->SupportManagerproStaff)) Loader::loadModels($this, array("SupportManagerpro.SupportManagerproStaff")); $staff_settings = $this->SupportManagerproStaff->getSettings($vars['staff_id'], Configure::get("Blesta.company_id")); if (isset($staff_settings['signature']) && trim($staff_settings['signature']) == trim($vars['details'])) $vars['details'] = ""; } // Determine whether or not options have changed that need to be logged $log_options = array(); // "status" should be the last element in case it is set to closed, so it will be the last log entry added $loggable_fields = array('department_id' => "department_id", 'ticket_staff_id' => "staff_id", 'summary' => "summary", 'priority' => "priority", 'status' => "status"); if (!$new_ticket && (isset($vars['department_id']) || isset($vars['summary']) || isset($vars['priority']) || isset($vars['status']) || isset($vars['ticket_staff_id']))) { if (($ticket = $this->get($ticket_id, false))) { // Determine if any log replies need to be made foreach ($loggable_fields as $key => $option) { // Save to be logged iff the field has been changed if (isset($vars[$key]) && property_exists($ticket, $option) && $ticket->{$option} != $vars[$key]) $log_options[] = $key; } } } // Check whether logs are being added simultaneously, and if so, do not // add a reply iff no reply details, nor files, are attached // i.e. allow log entries to be added without a reply/note regardless of vars['type'] $skip_reply = false; if (!empty($log_options) && empty($vars['details']) && (empty($files) || empty($files['attachment']['name'][0]))) $skip_reply = true; if (!$skip_reply) { $this->Input->setRules($this->getReplyRules($vars, $new_ticket)); if ($this->Input->validates($vars)) { // Create the reply $fields = array("ticket_id", "staff_id", "contact_id", "type", "details", "date_added"); $this->Record->insert("support_repliespro", $vars, $fields); $reply_id = $this->Record->lastInsertId(); // Update reply ticket status to awaiting_reply if replyed by staff if (isset($vars['staff_id'])){ if ($vars['staff_id'] > 0 && $vars['type'] == "reply" && $vars['status'] != "awaiting_reply"){ $this->edit($vars['ticket_id'], array('status' => "awaiting_reply")); } } // Handle file upload if (!empty($files['attachment'])) { Loader::loadComponents($this, array("SettingsCollection", "Upload")); // Set the uploads directory $temp = $this->SettingsCollection->fetchSetting(null, Configure::get("Blesta.company_id"), "uploads_dir"); $upload_path = $temp['value'] . Configure::get("Blesta.company_id") . DS . "support_managerpro_files" . DS; $this->Upload->setFiles($files, false); $this->Upload->setUploadPath($upload_path); $file_vars = array('files' => array()); if (!($errors = $this->Upload->errors())) { // Will not overwrite existing file $this->Upload->writeFile("attachment", false, null, array($this, "makeFileName")); $data = $this->Upload->getUploadData(); // Set the file names/paths foreach ($files['attachment']['name'] as $index => $file_name) { if (isset($data['attachment'][$index])) { $file_vars['files'][] = array( 'name' => $data['attachment'][$index]['orig_name'], 'file_name' => $data['attachment'][$index]['full_path'] ); } } $errors = $this->Upload->errors(); } // Error, could not upload the files if ($errors) { $this->Input->setErrors($errors); // Attempt to remove the files if they were somehow written foreach ($file_vars['files'] as $files) { if (isset($files['file_name'])) @unlink($files['file_name']); } return; } else { // Add the attachments $file_fields = array("reply_id", "name", "file_name"); foreach ($file_vars['files'] as $files) { if (!empty($files)) $this->Record->insert("support_attachmentspro", array_merge($files, array('reply_id' => $reply_id)), $file_fields); } } } } } // Only attempt to update log options if there are no previous errors if (!empty($log_options) && !$this->errors()) { // Update the support ticket $data = array_intersect_key($vars, $loggable_fields); $ticket_staff_id_field = array(); if (isset($data['ticket_staff_id'])) $ticket_staff_id_field = (isset($data['ticket_staff_id']) ? array('staff_id' => $data['ticket_staff_id']) : array()); $this->edit($ticket_id, array_merge($data, $ticket_staff_id_field), false); if (!($errors = $this->errors())) { // Log each support ticket field change foreach ($log_options as $field) { $log_vars = array( 'staff_id' => (array_key_exists("staff_id", $vars) ? $vars['staff_id'] : $this->system_staff_id), 'type' => "log" ); $lang_var1 = ""; switch ($field) { case "department_id": $department = $this->Record->select("name")->from("support_departmentspro")-> where("id", "=", $vars['department_id'])->fetch(); $lang_var1 = ($department ? $department->name : ""); break; case "priority": $priorities = $this->getPriorities(); $lang_var1 = (isset($priorities[$vars['priority']]) ? $priorities[$vars['priority']] : ""); break; case "status": $statuses = $this->getStatuses(); $lang_var1 = (isset($statuses[$vars['status']]) ? $statuses[$vars['status']] : ""); break; case "ticket_staff_id": if (!isset($this->Staff)) Loader::loadModels($this, array("Staff")); $staff = $this->Staff->get($vars['ticket_staff_id']); if ($vars['ticket_staff_id'] && $staff) $lang_var1 = $staff->first_name . " " . $staff->last_name; else $lang_var1 = Language::_("SupportManagerproTickets.log.unassigned", true); default: break; } $log_vars['details'] = Language::_("SupportManagerproTickets.log." . $field, true, $lang_var1); $this->addReply($ticket_id, $log_vars); } } } // Return the ID of the reply if (isset($reply_id)) return $reply_id; }
  20. Hey all, Im in need of a new module making so that i can sell domains via blesta with my webhost. Unfortunately they are using whmcs and have only developed a module for that and after waiting a while for them to develop something they have kinda turned round and said sorry we are too busy at the moment to put enough resources into this They have an api and details on how the structure works with their system. I have api access but php really isnt my strong point, you can see my other post about this here http://www.blesta.com/forums/index.php?/topic/4376-connecting-blesta-to-whmcs-via-api/ So im wondering what the price would be for a module Cheers
  21. Hi guys, DigitalOcean would be a better alternative to VPS.net for a lot of us. They have an API so this would be a great module: https://developers.digitalocean.com/
×
×
  • Create New...