addMember
Adds a new member to a board
/boards/{boardID}/members
Usage and SDK Samples
curl -X POST \
-H "Authorization: [[apiKey]]" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"http://localhost/api/v2/boards/{boardID}/members" \
-d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: BearerAuth
ApiKeyAuth BearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("BearerAuth");
BearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//BearerAuth.setApiKeyPrefix("Token");
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
String boardID = boardID_example; // String | Board ID
Object body = Object; // Object |
try {
Object result = apiInstance.addMember(boardID, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#addMember");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String boardID = boardID_example; // String | Board ID
Object body = Object; // Object |
try {
Object result = apiInstance.addMember(boardID, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#addMember");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: BearerAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *boardID = boardID_example; // Board ID (default to null)
Object *body = Object; //
[apiInstance addMemberWith:boardID
body:body
completionHandler: ^(Object output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var FocalboardServer = require('focalboard_server');
var defaultClient = FocalboardServer.ApiClient.instance;
// Configure API key authorization: BearerAuth
var BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//BearerAuth.apiKeyPrefix['Authorization'] = "Token";
// Create an instance of the API class
var api = new FocalboardServer.DefaultApi()
var boardID = boardID_example; // {String} Board ID
var body = Object; // {Object}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.addMember(boardID, body, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class addMemberExample
{
public void main()
{
// Configure API key authorization: BearerAuth
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
// Create an instance of the API class
var apiInstance = new DefaultApi();
var boardID = boardID_example; // String | Board ID (default to null)
var body = Object; // Object |
try {
Object result = apiInstance.addMember(boardID, body);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.addMember: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: BearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$boardID = boardID_example; // String | Board ID
$body = Object; // Object |
try {
$result = $api_instance->addMember($boardID, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->addMember: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure API key authorization: BearerAuth
$WWW::OPenAPIClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $boardID = boardID_example; # String | Board ID
my $body = WWW::OPenAPIClient::Object::Object->new(); # Object |
eval {
my $result = $api_instance->addMember(boardID => $boardID, body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->addMember: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: BearerAuth
openapi_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
boardID = boardID_example # String | Board ID (default to null)
body = Object # Object |
try:
api_response = api_instance.add_member(boardID, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->addMember: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let boardID = boardID_example; // String
let body = Object; // Object
let mut context = DefaultApi::Context::default();
let result = client.addMember(boardID, body, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
boardID* |
String
Board ID
Required
|
Name | Description |
---|---|
body * |
membership to replace the current one with |