addOrganization
Add a new organization in Educator Portal
/organizations
Usage and SDK Samples
curl -X POST -H "X-API-KEY: [[apiKey]]" -H "X-APP-ID: [[apiKey]]" "https://educator-pltw.kiteaai.org/AART/api/organizations"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationApi;
import java.io.File;
import java.util.*;
public class OrganizationApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("apiKey");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: appId
ApiKeyAuth appId = (ApiKeyAuth) defaultClient.getAuthentication("appId");
appId.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//appId.setApiKeyPrefix("Token");
OrganizationApi apiInstance = new OrganizationApi();
Organization body = ; // Organization | Organization object that needs to be added to the Educator Portal
String xChecksum = xChecksum_example; // String | SHA256 hash
try {
APIResponse result = apiInstance.addOrganization(body, xChecksum);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OrganizationApi#addOrganization");
e.printStackTrace();
}
}
}
import io.swagger.client.api.OrganizationApi;
public class OrganizationApiExample {
public static void main(String[] args) {
OrganizationApi apiInstance = new OrganizationApi();
Organization body = ; // Organization | Organization object that needs to be added to the Educator Portal
String xChecksum = xChecksum_example; // String | SHA256 hash
try {
APIResponse result = apiInstance.addOrganization(body, xChecksum);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OrganizationApi#addOrganization");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-KEY"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-KEY"];
// Configure API key authorization: (authentication scheme: appId)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-APP-ID"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-APP-ID"];
Organization *body = ; // Organization object that needs to be added to the Educator Portal
String *xChecksum = xChecksum_example; // SHA256 hash
OrganizationApi *apiInstance = [[OrganizationApi alloc] init];
// Add a new organization in Educator Portal
[apiInstance addOrganizationWith:body
xChecksum:xChecksum
completionHandler: ^(APIResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var KiteEducatorPortal = require('kite_educator_portal');
var defaultClient = KiteEducatorPortal.ApiClient.instance;
// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix['X-API-KEY'] = "Token"
// Configure API key authorization: appId
var appId = defaultClient.authentications['appId'];
appId.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//appId.apiKeyPrefix['X-APP-ID'] = "Token"
var api = new KiteEducatorPortal.OrganizationApi()
var body = ; // {Organization} Organization object that needs to be added to the Educator Portal
var xChecksum = xChecksum_example; // {String} SHA256 hash
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.addOrganization(body, xChecksum, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class addOrganizationExample
{
public void main()
{
// Configure API key authorization: apiKey
Configuration.Default.ApiKey.Add("X-API-KEY", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-API-KEY", "Bearer");
// Configure API key authorization: appId
Configuration.Default.ApiKey.Add("X-APP-ID", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-APP-ID", "Bearer");
var apiInstance = new OrganizationApi();
var body = new Organization(); // Organization | Organization object that needs to be added to the Educator Portal
var xChecksum = xChecksum_example; // String | SHA256 hash
try
{
// Add a new organization in Educator Portal
APIResponse result = apiInstance.addOrganization(body, xChecksum);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrganizationApi.addOrganization: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: appId
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-APP-ID', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-APP-ID', 'Bearer');
$api_instance = new Swagger\Client\Api\OrganizationApi();
$body = ; // Organization | Organization object that needs to be added to the Educator Portal
$xChecksum = xChecksum_example; // String | SHA256 hash
try {
$result = $api_instance->addOrganization($body, $xChecksum);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationApi->addOrganization: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationApi;
# Configure API key authorization: apiKey
$WWW::SwaggerClient::Configuration::api_key->{'X-API-KEY'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-KEY'} = "Bearer";
# Configure API key authorization: appId
$WWW::SwaggerClient::Configuration::api_key->{'X-APP-ID'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-APP-ID'} = "Bearer";
my $api_instance = WWW::SwaggerClient::OrganizationApi->new();
my $body = WWW::SwaggerClient::Object::Organization->new(); # Organization | Organization object that needs to be added to the Educator Portal
my $xChecksum = xChecksum_example; # String | SHA256 hash
eval {
my $result = $api_instance->addOrganization(body => $body, xChecksum => $xChecksum);
print Dumper($result);
};
if ($@) {
warn "Exception when calling OrganizationApi->addOrganization: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiKey
swagger_client.configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# Configure API key authorization: appId
swagger_client.configuration.api_key['X-APP-ID'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-APP-ID'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.OrganizationApi()
body = # Organization | Organization object that needs to be added to the Educator Portal
xChecksum = xChecksum_example # String | SHA256 hash
try:
# Add a new organization in Educator Portal
api_response = api_instance.add_organization(body, xChecksum)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->addOrganization: %s\n" % e)
Parameters
Header parameters
Name | Description |
---|---|
X-Checksum* |
String
SHA256 hash
Required
|
Body parameters
Name | Description |
---|---|
body * |