agencies
The purpose of this resource is to allow users to query for agency IDs by jurisdiction, document type, and clustering topic. The agency ID list can be then used to narrow data queries. This resource supports parameters for jurisdiction, documenttype, and cluster. The default values are 38, 1, and all, respectively.
/agencies
Usage and SDK Samples
curl -X GET "https://64gzqlrrd2.execute-api.us-east-1.amazonaws.com/dev/agencies?documenttype=&jurisdiction=&cluster="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String documenttype = documenttype_example; // String | Default is 1.
String jurisdiction = jurisdiction_example; // String | Default is 38.
String cluster = cluster_example; // String | Default is all.
try {
Empty result = apiInstance.agenciesGet(documenttype, jurisdiction, cluster);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#agenciesGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String documenttype = documenttype_example; // String | Default is 1.
String jurisdiction = jurisdiction_example; // String | Default is 38.
String cluster = cluster_example; // String | Default is all.
try {
Empty result = apiInstance.agenciesGet(documenttype, jurisdiction, cluster);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#agenciesGet");
e.printStackTrace();
}
}
}
String *documenttype = documenttype_example; // Default is 1. (optional)
String *jurisdiction = jurisdiction_example; // Default is 38. (optional)
String *cluster = cluster_example; // Default is all. (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
[apiInstance agenciesGetWith:documenttype
jurisdiction:jurisdiction
cluster:cluster
completionHandler: ^(Empty output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var RegcensusApi = require('regcensus_api');
var api = new RegcensusApi.DefaultApi()
var opts = {
'documenttype': documenttype_example, // {String} Default is 1.
'jurisdiction': jurisdiction_example, // {String} Default is 38.
'cluster': cluster_example // {String} Default is all.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.agenciesGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class agenciesGetExample
{
public void main()
{
var apiInstance = new DefaultApi();
var documenttype = documenttype_example; // String | Default is 1. (optional)
var jurisdiction = jurisdiction_example; // String | Default is 38. (optional)
var cluster = cluster_example; // String | Default is all. (optional)
try
{
Empty result = apiInstance.agenciesGet(documenttype, jurisdiction, cluster);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.agenciesGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$documenttype = documenttype_example; // String | Default is 1.
$jurisdiction = jurisdiction_example; // String | Default is 38.
$cluster = cluster_example; // String | Default is all.
try {
$result = $api_instance->agenciesGet($documenttype, $jurisdiction, $cluster);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->agenciesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $documenttype = documenttype_example; # String | Default is 1.
my $jurisdiction = jurisdiction_example; # String | Default is 38.
my $cluster = cluster_example; # String | Default is all.
eval {
my $result = $api_instance->agenciesGet(documenttype => $documenttype, jurisdiction => $jurisdiction, cluster => $cluster);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->agenciesGet: $@\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.DefaultApi()
documenttype = documenttype_example # String | Default is 1. (optional)
jurisdiction = jurisdiction_example # String | Default is 38. (optional)
cluster = cluster_example # String | Default is all. (optional)
try:
api_response = api_instance.agencies_get(documenttype=documenttype, jurisdiction=jurisdiction, cluster=cluster)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->agenciesGet: %s\n" % e)
Parameters
Name | Description |
---|---|
documenttype |
Integer, list
Default is 1.
|
jurisdiction |
Integer, list
Default is 38.
|
cluster |
Integer, list
Default is all.
|