listMDSGeographies
Get a list of all MDS Geographies matching an optional filter (these are referenced by MDS Policies).
/mds/geographies
Usage and SDK Samples
curl -X GET \
-H "X-API-KEY: [[apiKey]]" \
-H "Accept: application/json" \
"https://api.populus.ai/v1/mds/geographies?region_id=regionId_example&policy_category=policyCategory_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MDSApi;
import java.io.File;
import java.util.*;
public class MDSApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Create an instance of the API class
MDSApi apiInstance = new MDSApi();
String regionId = regionId_example; // String | (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
String policyCategory = policyCategory_example; // String | (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
try {
array[MDSGeographies] result = apiInstance.listMDSGeographies(regionId, policyCategory);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MDSApi#listMDSGeographies");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String regionId = new String(); // String | (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
final String policyCategory = new String(); // String | (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
try {
final result = await api_instance.listMDSGeographies(regionId, policyCategory);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->listMDSGeographies: $e\n');
}
import org.openapitools.client.api.MDSApi;
public class MDSApiExample {
public static void main(String[] args) {
MDSApi apiInstance = new MDSApi();
String regionId = regionId_example; // String | (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
String policyCategory = policyCategory_example; // String | (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
try {
array[MDSGeographies] result = apiInstance.listMDSGeographies(regionId, policyCategory);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MDSApi#listMDSGeographies");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[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"];
// Create an instance of the API class
MDSApi *apiInstance = [[MDSApi alloc] init];
String *regionId = regionId_example; // (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
(optional) (default to null)
String *policyCategory = policyCategory_example; // (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
(optional) (default to null)
// Get a list of all MDS Geographies matching an optional filter (these are referenced by MDS Policies).
[apiInstance listMDSGeographiesWith:regionId
policyCategory:policyCategory
completionHandler: ^(array[MDSGeographies] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var PopulusApi = require('populus_api');
var defaultClient = PopulusApi.ApiClient.instance;
// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['X-API-KEY'] = "Token";
// Create an instance of the API class
var api = new PopulusApi.MDSApi()
var opts = {
'regionId': regionId_example, // {String} (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
'policyCategory': policyCategory_example // {String} (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.listMDSGeographies(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class listMDSGeographiesExample
{
public void main()
{
// Configure API key authorization: api_key
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");
// Create an instance of the API class
var apiInstance = new MDSApi();
var regionId = regionId_example; // String | (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
(optional) (default to null)
var policyCategory = policyCategory_example; // String | (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
(optional) (default to null)
try {
// Get a list of all MDS Geographies matching an optional filter (these are referenced by MDS Policies).
array[MDSGeographies] result = apiInstance.listMDSGeographies(regionId, policyCategory);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling MDSApi.listMDSGeographies: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MDSApi();
$regionId = regionId_example; // String | (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
$policyCategory = policyCategory_example; // String | (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
try {
$result = $api_instance->listMDSGeographies($regionId, $policyCategory);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MDSApi->listMDSGeographies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MDSApi;
# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-KEY'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-KEY'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MDSApi->new();
my $regionId = regionId_example; # String | (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
my $policyCategory = policyCategory_example; # String | (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
eval {
my $result = $api_instance->listMDSGeographies(regionId => $regionId, policyCategory => $policyCategory);
print Dumper($result);
};
if ($@) {
warn "Exception when calling MDSApi->listMDSGeographies: $@\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: api_key
openapi_client.configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.MDSApi()
regionId = regionId_example # String | (optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
(optional) (default to null)
policyCategory = policyCategory_example # String | (optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
(optional) (default to null)
try:
# Get a list of all MDS Geographies matching an optional filter (these are referenced by MDS Policies).
api_response = api_instance.list_mds_geographies(regionId=regionId, policyCategory=policyCategory)
pprint(api_response)
except ApiException as e:
print("Exception when calling MDSApi->listMDSGeographies: %s\n" % e)
extern crate MDSApi;
pub fn main() {
let regionId = regionId_example; // String
let policyCategory = policyCategory_example; // String
let mut context = MDSApi::Context::default();
let result = client.listMDSGeographies(regionId, policyCategory, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Query parameters
| Name | Description |
|---|---|
| region_id |
String
(optional)
Only return MDS Geographies which exist in the given region.
Please email your account manager for a list of valid region IDs.
|
| policy_category |
String
(optional)
Only return MDS Geographies associated with a specific type of policy. By default, geographies associated with "mobility" policies will be returned. The other valid value is to pass "curb_rules" in order to fetch only geographies associated with curb rules.
|