addAgent
Agent endpoint: Add a agent
/api/agents
Usage and SDK Samples
curl -X POST \
-H "Authorization: Bearer [[accessToken]]" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"http://localhost:3000/api/agents" \
-d '{
"name" : "BamBirds",
"source" : "https://sme.uni-bamberg.de/bambirds/bambirds",
"maintainer" : "Diedrich Wolter",
"docker_image" : "registry.sme.uni-bamberg.de/bambirds/bambirds"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AgentApi;
import java.io.File;
import java.util.*;
public class AgentApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure Bearer (JWT) access token for authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
// Create an instance of the API class
AgentApi apiInstance = new AgentApi();
InputAgent inputAgent = ; // InputAgent |
try {
Agent result = apiInstance.addAgent(inputAgent);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#addAgent");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.AgentApi;
public class AgentApiExample {
public static void main(String[] args) {
AgentApi apiInstance = new AgentApi();
InputAgent inputAgent = ; // InputAgent |
try {
Agent result = apiInstance.addAgent(inputAgent);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#addAgent");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Create an instance of the API class
AgentApi *apiInstance = [[AgentApi alloc] init];
InputAgent *inputAgent = ; // (optional)
// Agent endpoint: Add a agent
[apiInstance addAgentWith:inputAgent
completionHandler: ^(Agent output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var BamBirds = require('bam_birds');
var defaultClient = BamBirds.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";
// Create an instance of the API class
var api = new BamBirds.AgentApi()
var opts = {
'inputAgent': // {InputAgent}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.addAgent(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class addAgentExample
{
public void main()
{
// Configure Bearer (JWT) access token for authorization: bearerAuth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Create an instance of the API class
var apiInstance = new AgentApi();
var inputAgent = new InputAgent(); // InputAgent | (optional)
try {
// Agent endpoint: Add a agent
Agent result = apiInstance.addAgent(inputAgent);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling AgentApi.addAgent: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AgentApi();
$inputAgent = ; // InputAgent |
try {
$result = $api_instance->addAgent($inputAgent);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AgentApi->addAgent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AgentApi;
# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AgentApi->new();
my $inputAgent = WWW::OPenAPIClient::Object::InputAgent->new(); # InputAgent |
eval {
my $result = $api_instance->addAgent(inputAgent => $inputAgent);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AgentApi->addAgent: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Create an instance of the API class
api_instance = openapi_client.AgentApi()
inputAgent = # InputAgent | (optional)
try:
# Agent endpoint: Add a agent
api_response = api_instance.add_agent(inputAgent=inputAgent)
pprint(api_response)
except ApiException as e:
print("Exception when calling AgentApi->addAgent: %s\n" % e)
extern crate AgentApi;
pub fn main() {
let inputAgent = ; // InputAgent
let mut context = AgentApi::Context::default();
let result = client.addAgent(inputAgent, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
inputAgent |