addPeople
Add a new people
create new people
/people
Usage and SDK Samples
curl -X post "http://127.0.0.1:8080/api/v1/people"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PeopleApi;
import java.io.File;
import java.util.*;
public class PeopleApiExample {
public static void main(String[] args) {
PeopleApi apiInstance = new PeopleApi();
NewPeople body = ; // NewPeople | People object that needs to be added
try {
people result = apiInstance.addPeople(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PeopleApi#addPeople");
e.printStackTrace();
}
}
}
import io.swagger.client.api.PeopleApi;
public class PeopleApiExample {
public static void main(String[] args) {
PeopleApi apiInstance = new PeopleApi();
NewPeople body = ; // NewPeople | People object that needs to be added
try {
people result = apiInstance.addPeople(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PeopleApi#addPeople");
e.printStackTrace();
}
}
}
NewPeople *body = ; // People object that needs to be added (optional)
PeopleApi *apiInstance = [[PeopleApi alloc] init];
// Add a new people
[apiInstance addPeopleWith:body
completionHandler: ^(people output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ManagementPeopleForAngular = require('management_people_for_angular');
var api = new ManagementPeopleForAngular.PeopleApi()
var opts = {
'body': // {NewPeople} People object that needs to be added
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.addPeople(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class addPeopleExample
{
public void main()
{
var apiInstance = new PeopleApi();
var body = new NewPeople(); // NewPeople | People object that needs to be added (optional)
try
{
// Add a new people
people result = apiInstance.addPeople(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PeopleApi.addPeople: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\PeopleApi();
$body = ; // NewPeople | People object that needs to be added
try {
$result = $api_instance->addPeople($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PeopleApi->addPeople: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PeopleApi;
my $api_instance = WWW::SwaggerClient::PeopleApi->new();
my $body = WWW::SwaggerClient::Object::NewPeople->new(); # NewPeople | People object that needs to be added
eval {
my $result = $api_instance->addPeople(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling PeopleApi->addPeople: $@\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.PeopleApi()
body = # NewPeople | People object that needs to be added (optional)
try:
# Add a new people
api_response = api_instance.addPeople(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling PeopleApi->addPeople: %s\n" % e)
Parameters
Body parameters
Name | Description |
---|---|
body |