getOrganizationById
Retrieve an organization by id.
/organizations/{id}
Usage and SDK Samples
curl -X GET "https://api.ringgold.com/identify/rest/organizations/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationsApi;
import java.io.File;
import java.util.*;
public class OrganizationsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
OrganizationsApi apiInstance = new OrganizationsApi();
Integer id = 56; // Integer | Numeric ID of the organization to get
try {
Organization result = apiInstance.getOrganizationById(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OrganizationsApi#getOrganizationById");
e.printStackTrace();
}
}
}
import io.swagger.client.api.OrganizationsApi;
public class OrganizationsApiExample {
public static void main(String[] args) {
OrganizationsApi apiInstance = new OrganizationsApi();
Integer id = 56; // Integer | Numeric ID of the organization to get
try {
Organization result = apiInstance.getOrganizationById(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OrganizationsApi#getOrganizationById");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"key"];
Integer *id = 56; // Numeric ID of the organization to get
OrganizationsApi *apiInstance = [[OrganizationsApi alloc] init];
// Retrieve an organization by id.
[apiInstance getOrganizationByIdWithCompletionHandler: :id
^(Organization output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var RinggoldIdentifyRestApi = require('ringgold_identify_rest_api');
var defaultClient = RinggoldIdentifyRestApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['key'] = "Token"
var api = new RinggoldIdentifyRestApi.OrganizationsApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getOrganizationById(idcallback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getOrganizationByIdExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.ApiKey.Add("key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("key", "Bearer");
var apiInstance = new OrganizationsApi();
var id = 56; // Integer | Numeric ID of the organization to get
try
{
// Retrieve an organization by id.
Organization result = apiInstance.getOrganizationById(id);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrganizationsApi.getOrganizationById: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');
$api_instance = new Swagger\Client\Api{{classname}}();
$id = 56; // Integer | Numeric ID of the organization to get
try {
$result = $api_instance->getOrganizationById($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->getOrganizationById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationsApi;
# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::OrganizationsApi->new();
my $id = [56]; # Integer | Numeric ID of the organization to get
eval {
my $result = $api_instance->getOrganizationById(id => $id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling OrganizationsApi->getOrganizationById: $@\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: ApiKeyAuth
swagger_client.configuration.api_key['key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.OrganizationsApi()
id = 56 # Integer | Numeric ID of the organization to get
try:
# Retrieve an organization by id.
api_response = api_instance.get_organization_by_id(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->getOrganizationById: %s\n" % e)
Parameters
Path parameters
Name | Description |
---|---|
id* |
Integer
(int32)
Numeric ID of the organization to get
Required
|