customerAcarsPost
Add customer-specific ACARS message to FPO Cloud
/{customer}/acars
Usage and SDK Samples
curl -X POST "https://api.fpocloud-trial.com/v1/{customer}/acars?id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AvionicsApi;
import java.io.File;
import java.util.*;
public class AvionicsApiExample {
public static void main(String[] args) {
AvionicsApi apiInstance = new AvionicsApi();
String body = ; // String | ACARS message in customer specific format
String xApiKey = xApiKey_example; // String | customer specific API key
String customer = customer_example; // String | customer id, all lower case
String id = id_example; // String | optional id for this object, generated if not given
try {
'String' result = apiInstance.customerAcarsPost(body, xApiKey, customer, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AvionicsApi#customerAcarsPost");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AvionicsApi;
public class AvionicsApiExample {
public static void main(String[] args) {
AvionicsApi apiInstance = new AvionicsApi();
String body = ; // String | ACARS message in customer specific format
String xApiKey = xApiKey_example; // String | customer specific API key
String customer = customer_example; // String | customer id, all lower case
String id = id_example; // String | optional id for this object, generated if not given
try {
'String' result = apiInstance.customerAcarsPost(body, xApiKey, customer, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AvionicsApi#customerAcarsPost");
e.printStackTrace();
}
}
}
String *body = ; // ACARS message in customer specific format
String *xApiKey = xApiKey_example; // customer specific API key
String *customer = customer_example; // customer id, all lower case
String *id = id_example; // optional id for this object, generated if not given (optional)
AvionicsApi *apiInstance = [[AvionicsApi alloc] init];
// Add customer-specific ACARS message to FPO Cloud
[apiInstance customerAcarsPostWith:body
xApiKey:xApiKey
customer:customer
id:id
completionHandler: ^('String' output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var FpoCloudWebApi = require('fpo_cloud_web_api');
var api = new FpoCloudWebApi.AvionicsApi()
var body = ; // {{String}} ACARS message in customer specific format
var xApiKey = xApiKey_example; // {{String}} customer specific API key
var customer = customer_example; // {{String}} customer id, all lower case
var opts = {
'id': id_example // {{String}} optional id for this object, generated if not given
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.customerAcarsPost(bodyxApiKeycustomer, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class customerAcarsPostExample
{
public void main()
{
var apiInstance = new AvionicsApi();
var body = new String(); // String | ACARS message in customer specific format
var xApiKey = xApiKey_example; // String | customer specific API key
var customer = customer_example; // String | customer id, all lower case
var id = id_example; // String | optional id for this object, generated if not given (optional)
try
{
// Add customer-specific ACARS message to FPO Cloud
'String' result = apiInstance.customerAcarsPost(body, xApiKey, customer, id);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AvionicsApi.customerAcarsPost: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAvionicsApi();
$body = ; // String | ACARS message in customer specific format
$xApiKey = xApiKey_example; // String | customer specific API key
$customer = customer_example; // String | customer id, all lower case
$id = id_example; // String | optional id for this object, generated if not given
try {
$result = $api_instance->customerAcarsPost($body, $xApiKey, $customer, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AvionicsApi->customerAcarsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AvionicsApi;
my $api_instance = WWW::SwaggerClient::AvionicsApi->new();
my $body = WWW::SwaggerClient::Object::String->new(); # String | ACARS message in customer specific format
my $xApiKey = xApiKey_example; # String | customer specific API key
my $customer = customer_example; # String | customer id, all lower case
my $id = id_example; # String | optional id for this object, generated if not given
eval {
my $result = $api_instance->customerAcarsPost(body => $body, xApiKey => $xApiKey, customer => $customer, id => $id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AvionicsApi->customerAcarsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AvionicsApi()
body = # String | ACARS message in customer specific format
xApiKey = xApiKey_example # String | customer specific API key
customer = customer_example # String | customer id, all lower case
id = id_example # String | optional id for this object, generated if not given (optional)
try:
# Add customer-specific ACARS message to FPO Cloud
api_response = api_instance.customer_acars_post(body, xApiKey, customer, id=id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AvionicsApi->customerAcarsPost: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| customer* |
String
customer id, all lower case
Required
|
| Name | Description |
|---|---|
| x-api-key* |
String
customer specific API key
Required
|
| Name | Description |
|---|---|
| body * |
| Name | Description |
|---|---|
| id |
String
optional id for this object, generated if not given
|
Responses
Status: 202 - The data was accepted but not yet processed. Returns id of created object
Status: 400 - The request data was malformed
Status: 401 - Missing, wrong or expired API key
| Name | Type | Format | Description |
|---|---|---|---|
| WWW_Authenticate | String |