addCard
Create or update a card on a board
Posts a new card to the board. The format of this post is a JSON object that contacts key/value pairs where the key is the NAME of the field (not the UUID), and the value is the value you wish to post. If an _id parameter is provided, Aptly will update the existing card that matches the given _id. Note that the JSON key for the field is the name of the field in this endpoint, not the uuid that you can retrieve in the schema. This may be changed in the future.
/aptlet/:boardId
Usage and SDK Samples
curl -X POST "https://app.getaptly.com/api/aptlet/:boardId?x-token="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BoardsApi;
import java.io.File;
import java.util.*;
public class BoardsApiExample {
public static void main(String[] args) {
BoardsApi apiInstance = new BoardsApi();
String xToken = xToken_example; // String | Your Aptly API Token
CardPost data = ; // CardPost | Data for the card to post
try {
apiInstance.addCard(xToken, data);
} catch (ApiException e) {
System.err.println("Exception when calling BoardsApi#addCard");
e.printStackTrace();
}
}
}
import io.swagger.client.api.BoardsApi;
public class BoardsApiExample {
public static void main(String[] args) {
BoardsApi apiInstance = new BoardsApi();
String xToken = xToken_example; // String | Your Aptly API Token
CardPost data = ; // CardPost | Data for the card to post
try {
apiInstance.addCard(xToken, data);
} catch (ApiException e) {
System.err.println("Exception when calling BoardsApi#addCard");
e.printStackTrace();
}
}
}
String *xToken = xToken_example; // Your Aptly API Token
CardPost *data = ; // Data for the card to post (optional)
BoardsApi *apiInstance = [[BoardsApi alloc] init];
// Create or update a card on a board
[apiInstance addCardWith:xToken
data:data
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var AptlyApi = require('aptly_api');
var api = new AptlyApi.BoardsApi()
var xToken = xToken_example; // {String} Your Aptly API Token
var opts = {
'data': // {CardPost} Data for the card to post
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.addCard(xToken, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class addCardExample
{
public void main()
{
var apiInstance = new BoardsApi();
var xToken = xToken_example; // String | Your Aptly API Token
var data = new CardPost(); // CardPost | Data for the card to post (optional)
try
{
// Create or update a card on a board
apiInstance.addCard(xToken, data);
}
catch (Exception e)
{
Debug.Print("Exception when calling BoardsApi.addCard: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\BoardsApi();
$xToken = xToken_example; // String | Your Aptly API Token
$data = ; // CardPost | Data for the card to post
try {
$api_instance->addCard($xToken, $data);
} catch (Exception $e) {
echo 'Exception when calling BoardsApi->addCard: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::BoardsApi;
my $api_instance = WWW::SwaggerClient::BoardsApi->new();
my $xToken = xToken_example; # String | Your Aptly API Token
my $data = WWW::SwaggerClient::Object::CardPost->new(); # CardPost | Data for the card to post
eval {
$api_instance->addCard(xToken => $xToken, data => $data);
};
if ($@) {
warn "Exception when calling BoardsApi->addCard: $@\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.BoardsApi()
xToken = xToken_example # String | Your Aptly API Token
data = # CardPost | Data for the card to post (optional)
try:
# Create or update a card on a board
api_instance.add_card(xToken, data=data)
except ApiException as e:
print("Exception when calling BoardsApi->addCard: %s\n" % e)
Parameters
Name | Description |
---|---|
data |
Name | Description |
---|---|
x-token* |
String
Your Aptly API Token
Required
|