### Retrieve Tariff Change Start Date (JavaScript) Source: https://splynx.docs.apiary.io/reference/tariffs/change-tariff/retrieve-start-date-of-new-tariff JavaScript code snippet for fetching the tariff change start date. This example uses the fetch API to make the GET request. ```JavaScript fetch('http://demo.splynx.com/api/2.0/admin/tariffs/change-tariff/service_id?type=service_type', { method: 'GET', headers: { 'accept': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/config/entry-point Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Retrieve Tariff Change Start Date (Java) Source: https://splynx.docs.apiary.io/reference/tariffs/change-tariff/retrieve-start-date-of-new-tariff Java code snippet demonstrating how to retrieve the start date of a new tariff change using the HttpClient. This example shows a basic GET request. ```Java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.io.IOException; public class TariffChange { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://demo.splynx.com/api/2.0/admin/tariffs/change-tariff/service_id?type=service_type")) .header("accept", "application/json") .GET() .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.statusCode()); System.out.println(response.body()); } } ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/introduction/how-to-upload-files/main-rules Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Get Task Checklist Response Example Source: https://splynx.docs.apiary.io/reference/scheduling/tasks-checklist/get-task-checklist Example JSON response for the 'Get Task Checklist' API call, showing the structure of checklist items and their associated task statuses. ```json [ { "checklist_template_item": { "id": 1, "checklist_template_id": 1, "name": "Prepare materials / tools" }, "tasks_item_status": { "task_id": 1, "checklist_template_item_id": 1, "checked": true } } ] ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/login/portal-login/retrieve-entry-point Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Get Customer Traffic Counters Response Example Source: https://splynx.docs.apiary.io/reference/customers/customer-traffic-counters/get-customer-traffic-counters Example JSON response for the Get Customer Traffic Counters endpoint, showing uploaded and downloaded bytes for a service ID on a specific date. ```json [ { "service_id": 1, "date": "2018-01-15", "up": 333, "down": 444 } ] ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/reference/config/entry-point Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/services/voice-services/start-voice-service Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Retrieve Payment Statement Examples Source: https://splynx.docs.apiary.io/reference/finance/payment-statement/retrieve-a-payment-statement Provides examples of how to retrieve a payment statement using various programming languages. These examples demonstrate making an HTTP GET request to the Splynx API endpoint. ```cURL curl -X GET "http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id" -H "Content-Type: application/json" ``` ```JavaScript fetch('http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id', { method: 'GET', headers: { 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` ```Python import requests url = "http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id" headers = { 'Content-Type': 'application/json' } response = requests.get(url, headers=headers) print(response.json()) ``` ```PHP ``` ```Ruby require 'net/http' require 'uri' uri = URI.parse('http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id') response = Net::HTTP.get_response(uri) puts JSON.parse(response.body) ``` ```Go package main import ( "encoding/json" "fmt" "net/http" ) func main() { url := "http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id" resp, err := http.Get(url) if err != nil { fmt.Printf("Error making request: %s\n", err) return } defer resp.Body.Close() var data map[string]interface{} if err := json.NewDecoder(resp.Body).Decode(&data); err != nil { fmt.Printf("Error decoding response: %s\n", err) return } fmt.Println(data) } ``` ```C# using System; using System.Net.Http; using System.Threading.Tasks; public class SplynxApiClient { public static async Task GetPaymentStatementAsync() { using (HttpClient client = new HttpClient()) { string url = "http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id"; HttpResponseMessage response = await client.GetAsync(url); response.EnsureSuccessStatusCode(); string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } } } ``` ```Java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class SplynxApiClient { public static void getPaymentStatement() throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id")) .header("Content-Type", "application/json") .GET() .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` ```Perl use strict; use warnings; use LWP::UserAgent; use JSON; my $ua = LWP::UserAgent->new; my $url = 'http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id'; my $response = $ua->get($url, 'Content-Type' => 'application/json'); if ($response->is_success) { my $data = decode_json($response->decoded_content); use Data::Dumper; print Dumper($data); } else { print "Error: " . $response->status_line . "\n"; } ``` ```Visual Basic Imports System.Net.Http Imports System.Threading.Tasks Public Module SplynxApiClient Public Async Function GetPaymentStatementAsync() Using client As New HttpClient() Dim url As String = "http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id" Dim response As HttpResponseMessage = Await client.GetAsync(url) response.EnsureSuccessStatusCode() Dim responseBody As String = Await response.Content.ReadAsStringAsync() Console.WriteLine(responseBody) End Using End Function End Module ``` ```Groovy import groovy.json.JsonSlurper import java.net.URL @Field def url = new URL("http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id") def connection = url.openConnection() as HttpURLConnection connection.setRequestMethod("GET") connection.setRequestProperty("Content-Type", "application/json") def responseCode = connection.getResponseCode() def inputStream = connection.getInputStream() def reader = new InputStreamReader(inputStream) def jsonSlurper = new JsonSlurper() def result = jsonSlurper.parse(reader) println(result) ``` ```Objective-C #import NSURL *url = [NSURL URLWithString:@"http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod:@"GET"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"Error: %@\n", error.localizedDescription); return; } NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSLog(@"%@\n", responseString); }]; [task resume]; ``` ```Swift import Foundation let url = URL(string: "http://demo.splynx.com/api/2.0/admin/finance/bank-statements/id")! var request = URLRequest(url: url) request.httpMethod = "GET" request.setValue("application/json", forHTTPHeaderField: "Content-Type") let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error.localizedDescription)\n") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print("\(responseString)\n") } } task.resume() ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/introduction/how-to-upload-files Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Start Recurring Service (Ruby) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service Ruby code example for making a PUT request to the Splynx API to start a recurring service. ```ruby # Ruby example for starting a recurring service using Net::HTTP # require 'net/http' # require 'uri' # # uri = URI.parse("http://demo.splynx.com/api/2.0/admin/customers/customer/customer_id/recurring-services--service_id?action=start") # http = Net::HTTP.new(uri.host, uri.port) # request = Net::HTTP::Put.new(uri.request_uri) # request['Content-Type'] = 'application/json' # request.body = "{}" # response = http.request(request) # # Process response... ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/services/internet-services/start-internet-service Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Start Recurring Service (PHP) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service PHP example demonstrating how to start a recurring service using cURL to interact with the Splynx API. ```php ``` -------------------------------- ### Start Recurring Service (Swift) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service Swift code example for making an HTTP PUT request to the Splynx API to start a recurring service. ```swift // Swift example for starting a recurring service using URLSession // import Foundation // // func startRecurringService(customerId: String, serviceId: String) { // guard let url = URL(string: "http://demo.splynx.com/api/2.0/admin/customers/customer/(customerId)/recurring-services--service_id?action=start") else { return } // // var request = URLRequest(url: url) // request.httpMethod = "PUT" // request.setValue("application/json", forHTTPHeaderField: "Content-Type") // request.httpBody = "{}".data(using: .utf8) // // let task = URLSession.shared.dataTask(with: request) { data, response, error in // if let error = error { // print("Error: \(error.localizedDescription)\n") // return // } // // Process response... // if let httpResponse = response as? HTTPURLResponse { // print("Status code: \(httpResponse.statusCode)\n") // } // if let data = data, let responseString = String(data: data, encoding: .utf8) { // print("Response: \(responseString)\n") // } // } // task.resume() // } ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/introduction/how-to-upload-files/examples Retrieves a list of all configured CPE Quality of Service settings. This provides an overview of QoS configurations for CPEs. ```HTTP GET /api/v2/cpe_qos ``` -------------------------------- ### Start Recurring Service (Objective-C) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service Objective-C code example for making an HTTP PUT request to the Splynx API to start a recurring service. ```objectivec // Objective-C example for starting a recurring service using NSURLSession // #import // // - (void)startRecurringServiceWithCustomerId:(NSString *)customerId serviceId:(NSString *)serviceId { // NSString *urlString = [NSString stringWithFormat:@"http://demo.splynx.com/api/2.0/admin/customers/customer/%@/recurring-services--service_id?action=start", customerId]; // NSURL *url = [NSURL URLWithString:urlString]; // NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; // request.HTTPMethod = @"PUT"; // [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; // request.HTTPBody = [@"{}" dataUsingEncoding:NSUTF8StringEncoding]; // // NSURLSession *session = [NSURLSession sharedSession]; // NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { // if (error) { // NSLog(@"Error: %@\n", error.localizedDescription); // return; // } // // Process response... // NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; // NSLog(@"Response: %@\n", responseString); // }]; // [task resume]; // } ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/reference/login/portal-login/retrieve-entry-point Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Start Recurring Service (Groovy) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service Groovy script example for making an HTTP PUT request to the Splynx API to start a recurring service. ```groovy // Groovy example for starting a recurring service using HTTPBuilder // import groovy.json.JsonOutput // import groovy.util.slurpersupport.GPathResult // import static groovy.json.JsonBuilder // // def startRecurringService(customerId, serviceId) { // def url = "http://demo.splynx.com/api/2.0/admin/customers/customer/${customerId}/recurring-services--service_id?action=start" // def http = new HTTPBuilder(url) // http.put(requestContentType: 'application/json') { // uri.path = "" // body = [:] // Empty JSON object // response.success = { resp, json -> // // Process response... // println "Success: ${json}" // } // response.failure = { // println "Failure: ${resp.statusLine}" // } // } // } ``` -------------------------------- ### List all Cpe Source: https://splynx.docs.apiary.io/introduction/how-to-upload-files/examples Retrieves a list of all configured CPE devices. This provides an overview of all managed CPEs. ```HTTP GET /api/v2/cpe ``` -------------------------------- ### List all CpeQos (Go) Source: https://splynx.docs.apiary.io/reference/networking/cpeqos-collection/list-all-cpeqos Example of how to list all CpeQos using Go. ```go package main import ( "fmt" "io/ioutil" "net/http" ) func main() { url := "http://demo.splynx.com/api/2.0/admin/networking/cpe-qos" client := &http.Client{} req, err := http.NewRequest("GET", url, nil) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println("Error reading response body:", err) return } fmt.Println(string(body)) } ``` -------------------------------- ### Start Recurring Service (C#) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service C# code example for making an HTTP PUT request to the Splynx API to start a recurring service. ```csharp // C# example for starting a recurring service using HttpClient // using System.Net.Http; // using System.Text; // using System.Threading.Tasks; // // public async Task StartRecurringServiceAsync(string customerId, string serviceId) // { // using (var client = new HttpClient()) // { // var url = $"http://demo.splynx.com/api/2.0/admin/customers/customer/{customerId}/recurring-services--service_id?action=start"; // var content = new StringContent("{}", Encoding.UTF8, "application/json"); // var response = await client.PutAsync(url, content); // // Process response... // return await response.Content.ReadAsStringAsync(); // } // } ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/reference/services/voice-services/start-voice-service Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Get Task Checklist (Objective-C) Source: https://splynx.docs.apiary.io/reference/scheduling/tasks-checklist/get-task-checklist Example Objective-C code for making an HTTP request to the Splynx API to get task checklist details. ```objectivec // Example Objective-C code snippet using NSURLSession // #import // - (void)getTaskChecklist:(NSInteger)taskId { // NSString *urlString = [NSString stringWithFormat:@"http://demo.splynx.com/api/2.0/admin/scheduling/tasks-checklist/%ld", (long)taskId]; // NSURL *url = [NSURL URLWithString:urlString]; // NSURLSession *session = [NSURLSession sharedSession]; // NSURLSessionDataTask *task = [session dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { // if (data) { // NSString *jsonString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; // NSLog(@"%@", jsonString); // } else { // NSLog(@"Error: %@", error.localizedDescription); // } // }]; // [task resume]; // } ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/reference/networking/ipv6-networks-collection/create-a-ipv6-network Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Start Recurring Service (Perl) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service Perl script example for interacting with the Splynx API to start a recurring service, utilizing HTTP PUT requests. ```perl # Perl example for starting a recurring service using LWP::UserAgent # use LWP::UserAgent; # my $ua = LWP::UserAgent->new; # my $url = "http://demo.splynx.com/api/2.0/admin/customers/customer/customer_id/recurring-services--service_id?action=start"; # my $response = $ua->put($url, { # 'Content-Type' => 'application/json' # }, '{}'); # # Process response... ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/introduction/how-to-upload-files/main-rules Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Start Recurring Service (Node.js) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service Node.js example for making a PUT request to start a recurring service, including setting headers and the request body. ```nodejs // Node.js example for starting a recurring service using 'axios' // const axios = require('axios'); // async function startRecurringService(customerId, serviceId) { // const url = `http://demo.splynx.com/api/2.0/admin/customers/customer/${customerId}/recurring-services--service_id?action=start`; // try { // const response = await axios.put(url, {}, { // headers: { // 'Content-Type': 'application/json' // } // }); // // Process response... // } catch (error) { // // Handle error... // } // } ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/reference/services/internet-services/start-internet-service Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Get Task Checklist (Go) Source: https://splynx.docs.apiary.io/reference/scheduling/tasks-checklist/get-task-checklist Example Go code for making an HTTP GET request to the Splynx API to fetch task checklist data. ```go // Example Go code snippet // package main // import ( // "fmt" // "io/ioutil" // "net/http" // ) // func main() { // resp, err := http.Get("http://demo.splynx.com/api/2.0/admin/scheduling/tasks-checklist/1") // if err != nil { // fmt.Println("Error making request:", err) // return // } // defer resp.Body.Close() // body, err := ioutil.ReadAll(resp.Body) // if err != nil { // fmt.Println("Error reading response body:", err) // return // } // fmt.Println(string(body)) // } ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/config/entry-points-collection/create-api Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Get Task Checklist (PHP) Source: https://splynx.docs.apiary.io/reference/scheduling/tasks-checklist/get-task-checklist Example PHP code for making an API request to get the task checklist. This might use cURL or file_get_contents. ```php // Example PHP code snippet using file_get_contents // $taskId = 1; // $url = "http://demo.splynx.com/api/2.0/admin/scheduling/tasks-checklist/{$taskId}"; // $response = file_get_contents($url); // if ($response) { // echo $response; // } else { // echo "Error fetching data"; // } ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/introduction/how-to-upload-files Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Retrieve Voice Service PHP Example Source: https://splynx.docs.apiary.io/reference/services/voice-services/retrieve-voice-service Example of how to retrieve a voice service using PHP. This demonstrates making a GET request to the Splynx API. ```PHP ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/config/entry-points-collection Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Retrieve Internet Service cURL Example Source: https://splynx.docs.apiary.io/reference/services/internet-services/retrieve-internet-service Example of how to retrieve an internet service using cURL, demonstrating the HTTP GET request with necessary headers. ```cURL curl -X GET \ http://demo.splynx.com/api/2.0/admin/customers/customer/customer_id/internet-services--service_id \ -H 'Content-Type: application/json' ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/introduction/authentication/basic-authentication Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Start Recurring Service (cURL) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service Example of starting a recurring service using cURL, demonstrating the HTTP method, URL, headers, and an empty JSON body. ```bash curl -X PUT "http://demo.splynx.com/api/2.0/admin/customers/customer/customer_id/recurring-services--service_id?action=start" -H "Content-Type: application/json" -d "{}" ``` -------------------------------- ### Get All Invoice Relations (PHP) Source: https://splynx.docs.apiary.io/reference/finance/invoice-relations/get-all-invoices-relations Example of retrieving all invoice relations using PHP. This snippet demonstrates using cURL to make the HTTP GET request. ```PHP $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "http://demo.splynx.com/api/2.0/admin/finance/invoice-relations"); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/json')); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); curl_close($curl); echo $response; ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/auth/sessions/create-session Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/introduction/create-an-api-key Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Get All Invoice Relations (JavaScript) Source: https://splynx.docs.apiary.io/reference/finance/invoice-relations/get-all-invoices-relations Example of retrieving all invoice relations using JavaScript. This snippet shows how to use the fetch API to make a GET request. ```JavaScript fetch('http://demo.splynx.com/api/2.0/admin/finance/invoice-relations', { method: 'GET', headers: { 'accept': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)); ``` -------------------------------- ### Objective-C Example: API Call for Recurring Services Source: https://splynx.docs.apiary.io/reference/services/search-recurring-services/list-recurring-services-by-parameters Shows an Objective-C example for making an API request to get recurring services, typically using NSURLSession. ```objective-c // Example Objective-C code using NSURLSession (conceptual) // NSURL *url = [NSURL URLWithString:@"http://demo.splynx.com/api/2.0/admin/customers/customer/0/recurring-services?params"]; // NSURLSession *session = [NSURLSession sharedSession]; // // NSURLSessionDataTask *task = [session dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { // if (error) { // NSLog(@"Error: %@\n", error.localizedDescription); // } else { // NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; // NSLog(@"%@\n", responseString); // } // }]; // // [task resume]; ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/customers/create-customer-document Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/config/cdr-import/create-api Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Customer Statistics Swift Example Source: https://splynx.docs.apiary.io/reference/customers/customers-statistics/total-customer-statistics Example of how to retrieve customer statistics using Swift. This snippet demonstrates making an HTTP GET request using URLSession. ```Swift /* Swift code example for retrieving customer statistics would go here. */ // Example using URLSession: // import Foundation // let url = URL(string: "http://demo.splynx.com/api/2.0/admin/customers/customer-statistics") // var request = URLRequest(url: url!) // request.httpMethod = "GET" // request.setValue("application/json", forHTTPHeaderField: "Content-Type") // let task = URLSession.shared.dataTask(with: request) { data, response, error in // if let error = error { // print("Error: \(error.localizedDescription)\n") // } else if let httpResponse = response as? HTTPURLResponse { // if httpResponse.statusCode == 200 { // if let responseData = data, let responseString = String(data: responseData, encoding: .utf8) { // print("Response: \(responseString)\n") // } // } // } // } // task.resume() ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/crm/leads-collection/create-a-lead Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Customer Statistics Objective-C Example Source: https://splynx.docs.apiary.io/reference/customers/customers-statistics/total-customer-statistics Example of how to retrieve customer statistics using Objective-C. This snippet demonstrates making an HTTP GET request using NSURLSession. ```Objective-C /* Objective-C code example for retrieving customer statistics would go here. */ // Example using NSURLSession: // NSURLSession *session = [NSURLSession sharedSession]; // NSURL *url = [NSURL URLWithString:@"http://demo.splynx.com/api/2.0/admin/customers/customer-statistics"]; // NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; // [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; // request.HTTPMethod = @"GET"; // NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { // if (error) { // NSLog(@"Error: %@\n", error.localizedDescription); // } else { // NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; // NSLog(@"%@\n", responseString); // } // }]; // [dataTask resume]; ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/customers/download-customer-document/download-customer-documents Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Customer Statistics C# Example Source: https://splynx.docs.apiary.io/reference/customers/customers-statistics/total-customer-statistics Example of how to retrieve customer statistics using C#. This snippet shows how to make an HTTP GET request using HttpClient. ```C# /* C# code example for retrieving customer statistics would go here. */ // Example using HttpClient: // using System; // using System.Net.Http; // using System.Threading.Tasks; // public class Example { // public static async Task GetCustomerStats() { // using (var client = new HttpClient()) { // var response = await client.GetAsync("http://demo.splynx.com/api/2.0/admin/customers/customer-statistics"); // response.EnsureSuccessStatusCode(); // var responseBody = await response.Content.ReadAsStringAsync(); // Console.WriteLine(responseBody); // } // } // } ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/introduction/media-types Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Customer Statistics PHP Example Source: https://splynx.docs.apiary.io/reference/customers/customers-statistics/total-customer-statistics Example of how to retrieve customer statistics using PHP. This snippet demonstrates making an HTTP GET request using cURL. ```PHP /* PHP code example for retrieving customer statistics would go here. */ // Example using cURL: // $url = 'http://demo.splynx.com/api/2.0/admin/customers/customer-statistics'; // $ch = curl_init($url); // curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); // $response = curl_exec($ch); // if (curl_errno($ch)) { // echo 'Error:' . curl_error($ch); // } else { // echo $response; // } // curl_close($ch); ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/administration/administrators-collection/create-an-administrator Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Start Recurring Service (Java) Source: https://splynx.docs.apiary.io/reference/services/recurring-services/start-recurring-service Java code example for starting a recurring service via the Splynx API, using a PUT request with appropriate headers and body. ```java // Java example for starting a recurring service // Requires appropriate HTTP client library (e.g., Apache HttpClient, OkHttp) // Example structure: // CloseableHttpClient client = HttpClients.createDefault(); // HttpPut request = new HttpPut("http://demo.splynx.com/api/2.0/admin/customers/customer/customer_id/recurring-services--service_id?action=start"); // request.setHeader("Content-Type", "application/json"); // StringEntity entity = new StringEntity("{}"); // request.setEntity(entity); // CloseableHttpResponse response = client.execute(request); // // Process response... ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/introduction/how-to-upload-files/allowed-files-types Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Retrieve Project using Python Source: https://splynx.docs.apiary.io/reference/scheduling/project/retrieve-project Provides a Python example using the `requests` library to get project information. It sends a GET request to the specified API endpoint. ```Python import requests url = "http://demo.splynx.com/api/2.0/admin/scheduling/projects/id" params = { "id": 1 } headers = { "Content-Type": "application/json" } response = requests.get(url, params=params, headers=headers) print(response.json()) ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/introduction/create-an-api-key Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Get All Invoice Relations (Java) Source: https://splynx.docs.apiary.io/reference/finance/invoice-relations/get-all-invoices-relations Example of retrieving all invoice relations using Java. This snippet demonstrates how to make an HTTP GET request and handle the JSON response. ```Java String url = "http://demo.splynx.com/api/2.0/admin/finance/invoice-relations"; // Add code here to make the GET request and process the response. ``` -------------------------------- ### List Network Monitoring Data (Go) Source: https://splynx.docs.apiary.io/reference/networking/monitoring-collection/list-all-monitoring Example of how to list all network monitoring entries using Go. ```go package main import ( "fmt" "io/ioutil" "net/http" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "http://demo.splynx.com/api/2.0/admin/networking/monitoring", nil) if err != nil { fmt.Println(err) return } req.Header.Add("Content-Type", "application/json") resp, err := client.Do(req) if err != nil { fmt.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) } ``` -------------------------------- ### Retrieve Voice Service Swift Example Source: https://splynx.docs.apiary.io/reference/services/voice-services/retrieve-voice-service Example of how to retrieve a voice service using Swift's URLSession. This demonstrates making a GET request to the Splynx API. ```Swift import Foundation let url = URL(string: "http://demo.splynx.com/api/2.0/admin/customers/1/voice-services/1") var request = URLRequest(url: url!) request.httpMethod = "GET" request.setValue("application/json", forHTTPHeaderField: "Content-Type") let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error.localizedDescription)\n") } else if let httpResponse = response as? HTTPURLResponse { if let responseString = String(data: data!, encoding: .utf8) { print("\(responseString)\n") } } } task.resume() ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/networking/ipv6-networks-collection/create-a-ipv6-network Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Retrieve Voice Service Objective-C Example Source: https://splynx.docs.apiary.io/reference/services/voice-services/retrieve-voice-service Example of how to retrieve a voice service using Objective-C's NSURLSession. This demonstrates making a GET request to the Splynx API. ```Objective-C #import int main(int argc, const char * argv[]) { @autoreleasepool { NSURL *url = [NSURL URLWithString:@"http://demo.splynx.com/api/2.0/admin/customers/1/voice-services/1"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod:@"GET"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"Error: %@\n", error.localizedDescription); } else { NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSLog(@"%@\n", responseString); } }]; [task resume]; } return 0; } ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/config/entry-points-collection/list-all-entry-points Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Retrieve Voice Service Groovy Example Source: https://splynx.docs.apiary.io/reference/services/voice-services/retrieve-voice-service Example of how to retrieve a voice service using Groovy's HTTPBuilder. This demonstrates making a GET request to the Splynx API. ```Groovy import groovy.json.JsonOutput import groovy.json.JsonSlurper import groovy.util.logging.Log import org.apache.http.client.methods.HttpGet import org.apache.http.entity.StringEntity import org.apache.http.impl.client.DefaultHttpClient def client = new DefaultHttpClient() def request = new HttpGet('http://demo.splynx.com/api/2.0/admin/customers/1/voice-services/1') request.addHeader('Content-Type', 'application/json') def response = client.execute(request) def entity = response.getEntity() def responseString = EntityUtils.toString(entity, 'UTF-8') println responseString ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/reference/config/entry-points-collection Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Retrieve Voice Service C# Example Source: https://splynx.docs.apiary.io/reference/services/voice-services/retrieve-voice-service Example of how to retrieve a voice service using C#'s HttpClient. This demonstrates making a GET request to the Splynx API. ```C# using System; using System.Net.Http; using System.Threading.Tasks; public class GetVoiceService { public static async Task Main(string[] args) { using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage response = await client.GetAsync("http://demo.splynx.com/api/2.0/admin/customers/1/voice-services/1"); response.EnsureSuccessStatusCode(); string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } } } ``` -------------------------------- ### List all CpeAp Source: https://splynx.docs.apiary.io/reference/customers/create-customer-document Returns a list of all configured CpeAp devices. This allows retrieval of all registered CpeAps. ```bash GET /api/v2/cpe_aps ``` -------------------------------- ### Retrieve Voice Service Java Example Source: https://splynx.docs.apiary.io/reference/services/voice-services/retrieve-voice-service Example of how to retrieve a voice service using Java's HttpClient. This demonstrates making a GET request to the Splynx API. ```Java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class GetVoiceService { public static void main(String[] args) throws Exception { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://demo.splynx.com/api/2.0/admin/customers/1/voice-services/1")) .header("Content-Type", "application/json") .GET() .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/config/modules-collection/create-a-module Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ``` -------------------------------- ### Perl Example: API Call for Recurring Services Source: https://splynx.docs.apiary.io/reference/services/search-recurring-services/list-recurring-services-by-parameters Shows a Perl example for making an API request to get recurring services using the LWP::UserAgent module. ```perl # Example Perl code using LWP::UserAgent (conceptual) # use strict; # use warnings; # use LWP::UserAgent; # # my $ua = LWP::UserAgent->new; # my $url = "http://demo.splynx.com/api/2.0/admin/customers/customer/0/recurring-services?params"; # # my $response = $ua->get($url, 'Content-Type' => 'application/json'); # # if ($response->is_success) { # print $response->decoded_content; # } else { # print $response->status_line; # } ``` -------------------------------- ### List all Monitoring Source: https://splynx.docs.apiary.io/reference/config/entry-points-collection/create-api Returns a list of all configured monitoring resources. This allows retrieval of all monitoring setups. ```bash GET /api/v2/monitoring ``` -------------------------------- ### Ruby Example: API Call for Recurring Services Source: https://splynx.docs.apiary.io/reference/services/search-recurring-services/list-recurring-services-by-parameters Provides a Ruby example for making an API request to get recurring services, utilizing the Net::HTTP library. ```ruby # Example Ruby code using Net::HTTP (conceptual) # require 'net/http' # require 'uri' # # uri = URI.parse("http://demo.splynx.com/api/2.0/admin/customers/customer/0/recurring-services?params") # http = Net::HTTP.new(uri.host, uri.port) # request = Net::HTTP::Get.new(uri.request_uri) # request['Content-Type'] = 'application/json' # # response = http.request(request) # puts response.body ``` -------------------------------- ### List all CpeQos Source: https://splynx.docs.apiary.io/reference/login Returns a list of all configured CpeQos settings. This allows retrieval of all QoS configurations for CPEs. ```bash GET /api/v2/cpe_qos ```