Refugee Statistics API

Default

asylumApplications

Asylum Applications

Asylum claims submitted by year and countries of asylum and origin. Claims are submitted by asylum applicants and are applications for international protection.


/asylum-applications/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/asylum-applications/?limit=&page=&yearFrom=&yearTo=&year=&download=&coo=&coa=&coo_all=&coa_all=&cf_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            AsylumApplicationsPagination result = apiInstance.asylumApplications(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#asylumApplications");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            AsylumApplicationsPagination result = apiInstance.asylumApplications(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#asylumApplications");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
Integer *yearFrom = 56; // The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
Integer *yearTo = 56; // The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
array[Integer] *year = ; // Send array of years. (optional) (default to null)
Boolean *download = true; // Get the result as a CSV file. (optional) (default to null)
String *coo = coo_example; // Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
String *coa = coa_example; // Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
Boolean *cooAll = true; // Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
Boolean *coaAll = true; // Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
String *cfType = cfType_example; // If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

// Asylum Applications
[apiInstance asylumApplicationsWith:limit
    page:page
    yearFrom:yearFrom
    yearTo:yearTo
    year:year
    download:download
    coo:coo
    coa:coa
    cooAll:cooAll
    coaAll:coaAll
    cfType:cfType
              completionHandler: ^(AsylumApplicationsPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'limit': 56, // {Integer} The numbers of items to return.
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'yearFrom': 56, // {Integer} The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
  'yearTo': 56, // {Integer} The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
  'year': , // {array[Integer]} Send array of years.
  'download': true, // {Boolean} Get the result as a CSV file.
  'coo': coo_example, // {String} Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'coa': coa_example, // {String} Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'cooAll': true, // {Boolean} Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
  'coaAll': true, // {Boolean} Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
  'cfType': cfType_example // {String} If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.asylumApplications(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class asylumApplicationsExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var yearFrom = 56;  // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional)  (default to null)
            var yearTo = 56;  // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional)  (default to null)
            var year = new array[Integer](); // array[Integer] | Send array of years. (optional)  (default to null)
            var download = true;  // Boolean | Get the result as a CSV file. (optional)  (default to null)
            var coo = coo_example;  // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var coa = coa_example;  // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var cooAll = true;  // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional)  (default to null)
            var coaAll = true;  // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional)  (default to null)
            var cfType = cfType_example;  // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional)  (default to null)

            try {
                // Asylum Applications
                AsylumApplicationsPagination result = apiInstance.asylumApplications(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.asylumApplications: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$limit = 56; // Integer | The numbers of items to return.
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
$yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
$year = ; // array[Integer] | Send array of years.
$download = true; // Boolean | Get the result as a CSV file.
$coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
$coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
$cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

try {
    $result = $api_instance->asylumApplications($limit, $page, $yearFrom, $yearTo, $year, $download, $coo, $coa, $cooAll, $coaAll, $cfType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->asylumApplications: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $limit = 56; # Integer | The numbers of items to return.
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $yearFrom = 56; # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
my $yearTo = 56; # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
my $year = []; # array[Integer] | Send array of years.
my $download = true; # Boolean | Get the result as a CSV file.
my $coo = coo_example; # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $coa = coa_example; # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $cooAll = true; # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
my $coaAll = true; # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
my $cfType = cfType_example; # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

eval { 
    my $result = $api_instance->asylumApplications(limit => $limit, page => $page, yearFrom => $yearFrom, yearTo => $yearTo, year => $year, download => $download, coo => $coo, coa => $coa, cooAll => $cooAll, coaAll => $coaAll, cfType => $cfType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->asylumApplications: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
yearFrom = 56 # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
yearTo = 56 # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
year =  # array[Integer] | Send array of years. (optional) (default to null)
download = true # Boolean | Get the result as a CSV file. (optional) (default to null)
coo = coo_example # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
coa = coa_example # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
cooAll = true # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
coaAll = true # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
cfType = cfType_example # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

try: 
    # Asylum Applications
    api_response = api_instance.asylum_applications(limit=limit, page=page, yearFrom=yearFrom, yearTo=yearTo, year=year, download=download, coo=coo, coa=coa, cooAll=cooAll, coaAll=coaAll, cfType=cfType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->asylumApplications: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let limit = 56; // Integer
    let page = 56; // Integer
    let yearFrom = 56; // Integer
    let yearTo = 56; // Integer
    let year = ; // array[Integer]
    let download = true; // Boolean
    let coo = coo_example; // String
    let coa = coa_example; // String
    let cooAll = true; // Boolean
    let coaAll = true; // Boolean
    let cfType = cfType_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.asylumApplications(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
limit
Integer
The numbers of items to return.
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
yearFrom
Integer (int32)
The start year from which results will be filtered. The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
yearTo
Integer (int32)
The end year up to which results will be filtered. The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
year
array[Integer]
Send array of years.
download
Boolean
Get the result as a CSV file.
coo
String
Filter the data to one or more countries of origin. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coa
String
Filter the data to one or more countries of asylum. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coo_all
Boolean
Automatically includes all countries of origin in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoO.
coa_all
Boolean
Automatically includes all countries of asylum in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoA.
cf_type
String
If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes. See the summary lookup table between UNHCR and ISO codes.

Responses


asylumDecisions

Asylum Decisions

Decisions taken on asylum claims by year and countries of asylum and origin. . Asylum claims are applications for international protection and decisions on asylum claims can be positive, negative or otherwise closed.


/asylum-decisions/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/asylum-decisions/?page=&limit=&yearFrom=&yearTo=&year=&download=&coo=&coa=&coo_all=&coa_all=&cf_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            AsylumDecisionsPagination result = apiInstance.asylumDecisions(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#asylumDecisions");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            AsylumDecisionsPagination result = apiInstance.asylumDecisions(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#asylumDecisions");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *yearFrom = 56; // The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
Integer *yearTo = 56; // The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
array[Integer] *year = ; // Send array of years. (optional) (default to null)
Boolean *download = true; // Get the result as a CSV file. (optional) (default to null)
String *coo = coo_example; // Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
String *coa = coa_example; // Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
Boolean *cooAll = true; // Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
Boolean *coaAll = true; // Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
String *cfType = cfType_example; // If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

// Asylum Decisions
[apiInstance asylumDecisionsWith:page
    limit:limit
    yearFrom:yearFrom
    yearTo:yearTo
    year:year
    download:download
    coo:coo
    coa:coa
    cooAll:cooAll
    coaAll:coaAll
    cfType:cfType
              completionHandler: ^(AsylumDecisionsPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'limit': 56, // {Integer} The numbers of items to return.
  'yearFrom': 56, // {Integer} The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
  'yearTo': 56, // {Integer} The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
  'year': , // {array[Integer]} Send array of years.
  'download': true, // {Boolean} Get the result as a CSV file.
  'coo': coo_example, // {String} Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'coa': coa_example, // {String} Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'cooAll': true, // {Boolean} Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
  'coaAll': true, // {Boolean} Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
  'cfType': cfType_example // {String} If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.asylumDecisions(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class asylumDecisionsExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var yearFrom = 56;  // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional)  (default to null)
            var yearTo = 56;  // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional)  (default to null)
            var year = new array[Integer](); // array[Integer] | Send array of years. (optional)  (default to null)
            var download = true;  // Boolean | Get the result as a CSV file. (optional)  (default to null)
            var coo = coo_example;  // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var coa = coa_example;  // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var cooAll = true;  // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional)  (default to null)
            var coaAll = true;  // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional)  (default to null)
            var cfType = cfType_example;  // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional)  (default to null)

            try {
                // Asylum Decisions
                AsylumDecisionsPagination result = apiInstance.asylumDecisions(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.asylumDecisions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$limit = 56; // Integer | The numbers of items to return.
$yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
$yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
$year = ; // array[Integer] | Send array of years.
$download = true; // Boolean | Get the result as a CSV file.
$coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
$coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
$cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

try {
    $result = $api_instance->asylumDecisions($page, $limit, $yearFrom, $yearTo, $year, $download, $coo, $coa, $cooAll, $coaAll, $cfType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->asylumDecisions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $limit = 56; # Integer | The numbers of items to return.
my $yearFrom = 56; # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
my $yearTo = 56; # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
my $year = []; # array[Integer] | Send array of years.
my $download = true; # Boolean | Get the result as a CSV file.
my $coo = coo_example; # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $coa = coa_example; # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $cooAll = true; # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
my $coaAll = true; # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
my $cfType = cfType_example; # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

eval { 
    my $result = $api_instance->asylumDecisions(page => $page, limit => $limit, yearFrom => $yearFrom, yearTo => $yearTo, year => $year, download => $download, coo => $coo, coa => $coa, cooAll => $cooAll, coaAll => $coaAll, cfType => $cfType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->asylumDecisions: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
yearFrom = 56 # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
yearTo = 56 # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
year =  # array[Integer] | Send array of years. (optional) (default to null)
download = true # Boolean | Get the result as a CSV file. (optional) (default to null)
coo = coo_example # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
coa = coa_example # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
cooAll = true # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
coaAll = true # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
cfType = cfType_example # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

try: 
    # Asylum Decisions
    api_response = api_instance.asylum_decisions(page=page, limit=limit, yearFrom=yearFrom, yearTo=yearTo, year=year, download=download, coo=coo, coa=coa, cooAll=cooAll, coaAll=coaAll, cfType=cfType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->asylumDecisions: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let page = 56; // Integer
    let limit = 56; // Integer
    let yearFrom = 56; // Integer
    let yearTo = 56; // Integer
    let year = ; // array[Integer]
    let download = true; // Boolean
    let coo = coo_example; // String
    let coa = coa_example; // String
    let cooAll = true; // Boolean
    let coaAll = true; // Boolean
    let cfType = cfType_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.asylumDecisions(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
limit
Integer
The numbers of items to return.
yearFrom
Integer (int32)
The start year from which results will be filtered. The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
yearTo
Integer (int32)
The end year up to which results will be filtered. The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
year
array[Integer]
Send array of years.
download
Boolean
Get the result as a CSV file.
coo
String
Filter the data to one or more countries of origin. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coa
String
Filter the data to one or more countries of asylum. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coo_all
Boolean
Automatically includes all countries of origin in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoO.
coa_all
Boolean
Automatically includes all countries of asylum in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoA.
cf_type
String
If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes. See the summary lookup table between UNHCR and ISO codes.

Responses


countries

Countries

Returns the list of countries together with their codes, names and regions. See also the full list of countries, UNHCR and UNSD regions


/countries/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/countries/?limit=&page=®ion=&unhcr_region="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        String region = region_example; // String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
        Integer unhcrRegion = 56; // Integer | The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
        
        try {
            CountryPagination result = apiInstance.countries(limit, page, region, unhcrRegion);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#countries");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        String region = region_example; // String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
        Integer unhcrRegion = 56; // Integer | The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
        
        try {
            CountryPagination result = apiInstance.countries(limit, page, region, unhcrRegion);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#countries");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
String *region = region_example; // The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional) (default to null)
Integer *unhcrRegion = 56; // The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional) (default to null)

// Countries
[apiInstance countriesWith:limit
    page:page
    region:region
    unhcrRegion:unhcrRegion
              completionHandler: ^(CountryPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'limit': 56, // {Integer} The numbers of items to return.
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'region': region_example, // {String} The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
  'unhcrRegion': 56 // {Integer} The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.countries(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class countriesExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var region = region_example;  // String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional)  (default to null)
            var unhcrRegion = 56;  // Integer | The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional)  (default to null)

            try {
                // Countries
                CountryPagination result = apiInstance.countries(limit, page, region, unhcrRegion);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.countries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$limit = 56; // Integer | The numbers of items to return.
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$region = region_example; // String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
$unhcrRegion = 56; // Integer | The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)

try {
    $result = $api_instance->countries($limit, $page, $region, $unhcrRegion);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->countries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $limit = 56; # Integer | The numbers of items to return.
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $region = region_example; # String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
my $unhcrRegion = 56; # Integer | The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)

eval { 
    my $result = $api_instance->countries(limit => $limit, page => $page, region => $region, unhcrRegion => $unhcrRegion);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->countries: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
region = region_example # String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional) (default to null)
unhcrRegion = 56 # Integer | The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional) (default to null)

try: 
    # Countries
    api_response = api_instance.countries(limit=limit, page=page, region=region, unhcrRegion=unhcrRegion)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->countries: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let limit = 56; // Integer
    let page = 56; // Integer
    let region = region_example; // String
    let unhcrRegion = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.countries(limit, page, region, unhcrRegion, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
limit
Integer
The numbers of items to return.
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
region
String
The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa&region[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
unhcr_region
Integer
The UNHCR region ID (see the regions endpoint). To retrieve data for an array of UNHCR regions use the array notation e.g. 'unhcr_region[]=2&unhcr_region[]=3' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)

Responses


demographics

Population figures

Retrieves demographic and sub-national data, where such disaggregation is available. UNHCR collects this information for all population types, as well as two durable solutions (returned IDPs and refugees). Demographics are also available for IDMC and UNRWA datasets. See the notes on the data structure in the [methodology](https://www.unhcr.org/refugee-statistics/methodology/) pages for more details. Example query: https://api.unhcr.org//population/v1/demographics/?pop_type=IDP&year=2015&coo=SYR&coa_all=true


/population/v1/demographics/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/population/v1/demographics/?limit=&page=&yearFrom=&yearTo=&year=&download=&coo=&coa=&coo_all=&coa_all=&cf_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            PopulationDemographicsPagination result = apiInstance.demographics(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#demographics");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            PopulationDemographicsPagination result = apiInstance.demographics(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#demographics");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
Integer *yearFrom = 56; // The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
Integer *yearTo = 56; // The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
array[Integer] *year = ; // Send array of years. (optional) (default to null)
Boolean *download = true; // Get the result as a CSV file. (optional) (default to null)
String *coo = coo_example; // Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
String *coa = coa_example; // Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
Boolean *cooAll = true; // Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
Boolean *coaAll = true; // Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
String *cfType = cfType_example; // If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

// Population figures
[apiInstance demographicsWith:limit
    page:page
    yearFrom:yearFrom
    yearTo:yearTo
    year:year
    download:download
    coo:coo
    coa:coa
    cooAll:cooAll
    coaAll:coaAll
    cfType:cfType
              completionHandler: ^(PopulationDemographicsPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'limit': 56, // {Integer} The numbers of items to return.
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'yearFrom': 56, // {Integer} The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
  'yearTo': 56, // {Integer} The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
  'year': , // {array[Integer]} Send array of years.
  'download': true, // {Boolean} Get the result as a CSV file.
  'coo': coo_example, // {String} Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'coa': coa_example, // {String} Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'cooAll': true, // {Boolean} Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
  'coaAll': true, // {Boolean} Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
  'cfType': cfType_example // {String} If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.demographics(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class demographicsExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var yearFrom = 56;  // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional)  (default to null)
            var yearTo = 56;  // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional)  (default to null)
            var year = new array[Integer](); // array[Integer] | Send array of years. (optional)  (default to null)
            var download = true;  // Boolean | Get the result as a CSV file. (optional)  (default to null)
            var coo = coo_example;  // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var coa = coa_example;  // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var cooAll = true;  // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional)  (default to null)
            var coaAll = true;  // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional)  (default to null)
            var cfType = cfType_example;  // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional)  (default to null)

            try {
                // Population figures
                PopulationDemographicsPagination result = apiInstance.demographics(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.demographics: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$limit = 56; // Integer | The numbers of items to return.
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
$yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
$year = ; // array[Integer] | Send array of years.
$download = true; // Boolean | Get the result as a CSV file.
$coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
$coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
$cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

try {
    $result = $api_instance->demographics($limit, $page, $yearFrom, $yearTo, $year, $download, $coo, $coa, $cooAll, $coaAll, $cfType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->demographics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $limit = 56; # Integer | The numbers of items to return.
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $yearFrom = 56; # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
my $yearTo = 56; # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
my $year = []; # array[Integer] | Send array of years.
my $download = true; # Boolean | Get the result as a CSV file.
my $coo = coo_example; # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $coa = coa_example; # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $cooAll = true; # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
my $coaAll = true; # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
my $cfType = cfType_example; # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

eval { 
    my $result = $api_instance->demographics(limit => $limit, page => $page, yearFrom => $yearFrom, yearTo => $yearTo, year => $year, download => $download, coo => $coo, coa => $coa, cooAll => $cooAll, coaAll => $coaAll, cfType => $cfType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->demographics: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
yearFrom = 56 # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
yearTo = 56 # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
year =  # array[Integer] | Send array of years. (optional) (default to null)
download = true # Boolean | Get the result as a CSV file. (optional) (default to null)
coo = coo_example # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
coa = coa_example # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
cooAll = true # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
coaAll = true # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
cfType = cfType_example # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

try: 
    # Population figures
    api_response = api_instance.demographics(limit=limit, page=page, yearFrom=yearFrom, yearTo=yearTo, year=year, download=download, coo=coo, coa=coa, cooAll=cooAll, coaAll=coaAll, cfType=cfType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->demographics: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let limit = 56; // Integer
    let page = 56; // Integer
    let yearFrom = 56; // Integer
    let yearTo = 56; // Integer
    let year = ; // array[Integer]
    let download = true; // Boolean
    let coo = coo_example; // String
    let coa = coa_example; // String
    let cooAll = true; // Boolean
    let coaAll = true; // Boolean
    let cfType = cfType_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.demographics(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
limit
Integer
The numbers of items to return.
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
yearFrom
Integer (int32)
The start year from which results will be filtered. The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
yearTo
Integer (int32)
The end year up to which results will be filtered. The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
year
array[Integer]
Send array of years.
download
Boolean
Get the result as a CSV file.
coo
String
Filter the data to one or more countries of origin. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coa
String
Filter the data to one or more countries of asylum. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coo_all
Boolean
Automatically includes all countries of origin in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoO.
coa_all
Boolean
Automatically includes all countries of asylum in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoA.
cf_type
String
If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes. See the summary lookup table between UNHCR and ISO codes.

Responses


footnotes

Retrieves the footnotes for the specified data. The footnotes provide additional details, data collection issues and relevant qualifications to represent the data appropriately.

This endpoint should receive an identical API query as the other API endpoints for specific datasets. The resulting data will contain all relevant footnotes for the data returned in the dataset query.


/footnotes/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/footnotes/?page=&limit=&yearFrom=&yearTo=&year=&download=&coo=&coa=&coo_all=&coa_all=&cf_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            FootnotesPagination result = apiInstance.footnotes(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#footnotes");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            FootnotesPagination result = apiInstance.footnotes(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#footnotes");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *yearFrom = 56; // The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
Integer *yearTo = 56; // The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
array[Integer] *year = ; // Send array of years. (optional) (default to null)
Boolean *download = true; // Get the result as a CSV file. (optional) (default to null)
String *coo = coo_example; // Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
String *coa = coa_example; // Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
Boolean *cooAll = true; // Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
Boolean *coaAll = true; // Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
String *cfType = cfType_example; // If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

// Retrieves the footnotes for the specified data.  The footnotes provide additional details, data collection issues and relevant qualifications to represent the data appropriately.
[apiInstance footnotesWith:page
    limit:limit
    yearFrom:yearFrom
    yearTo:yearTo
    year:year
    download:download
    coo:coo
    coa:coa
    cooAll:cooAll
    coaAll:coaAll
    cfType:cfType
              completionHandler: ^(FootnotesPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'limit': 56, // {Integer} The numbers of items to return.
  'yearFrom': 56, // {Integer} The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
  'yearTo': 56, // {Integer} The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
  'year': , // {array[Integer]} Send array of years.
  'download': true, // {Boolean} Get the result as a CSV file.
  'coo': coo_example, // {String} Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'coa': coa_example, // {String} Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'cooAll': true, // {Boolean} Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
  'coaAll': true, // {Boolean} Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
  'cfType': cfType_example // {String} If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.footnotes(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class footnotesExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var yearFrom = 56;  // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional)  (default to null)
            var yearTo = 56;  // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional)  (default to null)
            var year = new array[Integer](); // array[Integer] | Send array of years. (optional)  (default to null)
            var download = true;  // Boolean | Get the result as a CSV file. (optional)  (default to null)
            var coo = coo_example;  // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var coa = coa_example;  // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var cooAll = true;  // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional)  (default to null)
            var coaAll = true;  // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional)  (default to null)
            var cfType = cfType_example;  // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional)  (default to null)

            try {
                // Retrieves the footnotes for the specified data.  The footnotes provide additional details, data collection issues and relevant qualifications to represent the data appropriately.
                FootnotesPagination result = apiInstance.footnotes(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.footnotes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$limit = 56; // Integer | The numbers of items to return.
$yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
$yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
$year = ; // array[Integer] | Send array of years.
$download = true; // Boolean | Get the result as a CSV file.
$coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
$coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
$cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

try {
    $result = $api_instance->footnotes($page, $limit, $yearFrom, $yearTo, $year, $download, $coo, $coa, $cooAll, $coaAll, $cfType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->footnotes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $limit = 56; # Integer | The numbers of items to return.
my $yearFrom = 56; # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
my $yearTo = 56; # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
my $year = []; # array[Integer] | Send array of years.
my $download = true; # Boolean | Get the result as a CSV file.
my $coo = coo_example; # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $coa = coa_example; # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $cooAll = true; # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
my $coaAll = true; # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
my $cfType = cfType_example; # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

eval { 
    my $result = $api_instance->footnotes(page => $page, limit => $limit, yearFrom => $yearFrom, yearTo => $yearTo, year => $year, download => $download, coo => $coo, coa => $coa, cooAll => $cooAll, coaAll => $coaAll, cfType => $cfType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->footnotes: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
yearFrom = 56 # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
yearTo = 56 # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
year =  # array[Integer] | Send array of years. (optional) (default to null)
download = true # Boolean | Get the result as a CSV file. (optional) (default to null)
coo = coo_example # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
coa = coa_example # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
cooAll = true # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
coaAll = true # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
cfType = cfType_example # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

try: 
    # Retrieves the footnotes for the specified data.  The footnotes provide additional details, data collection issues and relevant qualifications to represent the data appropriately.
    api_response = api_instance.footnotes(page=page, limit=limit, yearFrom=yearFrom, yearTo=yearTo, year=year, download=download, coo=coo, coa=coa, cooAll=cooAll, coaAll=coaAll, cfType=cfType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->footnotes: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let page = 56; // Integer
    let limit = 56; // Integer
    let yearFrom = 56; // Integer
    let yearTo = 56; // Integer
    let year = ; // array[Integer]
    let download = true; // Boolean
    let coo = coo_example; // String
    let coa = coa_example; // String
    let cooAll = true; // Boolean
    let coaAll = true; // Boolean
    let cfType = cfType_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.footnotes(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
limit
Integer
The numbers of items to return.
yearFrom
Integer (int32)
The start year from which results will be filtered. The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
yearTo
Integer (int32)
The end year up to which results will be filtered. The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
year
array[Integer]
Send array of years.
download
Boolean
Get the result as a CSV file.
coo
String
Filter the data to one or more countries of origin. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coa
String
Filter the data to one or more countries of asylum. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coo_all
Boolean
Automatically includes all countries of origin in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoO.
coa_all
Boolean
Automatically includes all countries of asylum in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoA.
cf_type
String
If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes. See the summary lookup table between UNHCR and ISO codes.

Responses


idmc

IDMC Data

Retrieves the data on Internally displaced persons due to conflict and violence that is produced by the Internal Displacement Monitoring Centre.


/idmc/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/idmc/?page=&limit=&yearFrom=&yearTo=&year=&download=&coo=&coa=&coo_all=&coa_all=&cf_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            IDMCPagination result = apiInstance.idmc(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#idmc");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            IDMCPagination result = apiInstance.idmc(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#idmc");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *yearFrom = 56; // The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
Integer *yearTo = 56; // The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
array[Integer] *year = ; // Send array of years. (optional) (default to null)
Boolean *download = true; // Get the result as a CSV file. (optional) (default to null)
String *coo = coo_example; // Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
String *coa = coa_example; // Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
Boolean *cooAll = true; // Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
Boolean *coaAll = true; // Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
String *cfType = cfType_example; // If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

// IDMC Data
[apiInstance idmcWith:page
    limit:limit
    yearFrom:yearFrom
    yearTo:yearTo
    year:year
    download:download
    coo:coo
    coa:coa
    cooAll:cooAll
    coaAll:coaAll
    cfType:cfType
              completionHandler: ^(IDMCPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'limit': 56, // {Integer} The numbers of items to return.
  'yearFrom': 56, // {Integer} The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
  'yearTo': 56, // {Integer} The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
  'year': , // {array[Integer]} Send array of years.
  'download': true, // {Boolean} Get the result as a CSV file.
  'coo': coo_example, // {String} Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'coa': coa_example, // {String} Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'cooAll': true, // {Boolean} Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
  'coaAll': true, // {Boolean} Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
  'cfType': cfType_example // {String} If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.idmc(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class idmcExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var yearFrom = 56;  // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional)  (default to null)
            var yearTo = 56;  // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional)  (default to null)
            var year = new array[Integer](); // array[Integer] | Send array of years. (optional)  (default to null)
            var download = true;  // Boolean | Get the result as a CSV file. (optional)  (default to null)
            var coo = coo_example;  // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var coa = coa_example;  // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var cooAll = true;  // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional)  (default to null)
            var coaAll = true;  // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional)  (default to null)
            var cfType = cfType_example;  // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional)  (default to null)

            try {
                // IDMC Data
                IDMCPagination result = apiInstance.idmc(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.idmc: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$limit = 56; // Integer | The numbers of items to return.
$yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
$yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
$year = ; // array[Integer] | Send array of years.
$download = true; // Boolean | Get the result as a CSV file.
$coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
$coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
$cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

try {
    $result = $api_instance->idmc($page, $limit, $yearFrom, $yearTo, $year, $download, $coo, $coa, $cooAll, $coaAll, $cfType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->idmc: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $limit = 56; # Integer | The numbers of items to return.
my $yearFrom = 56; # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
my $yearTo = 56; # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
my $year = []; # array[Integer] | Send array of years.
my $download = true; # Boolean | Get the result as a CSV file.
my $coo = coo_example; # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $coa = coa_example; # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $cooAll = true; # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
my $coaAll = true; # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
my $cfType = cfType_example; # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

eval { 
    my $result = $api_instance->idmc(page => $page, limit => $limit, yearFrom => $yearFrom, yearTo => $yearTo, year => $year, download => $download, coo => $coo, coa => $coa, cooAll => $cooAll, coaAll => $coaAll, cfType => $cfType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->idmc: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
yearFrom = 56 # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
yearTo = 56 # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
year =  # array[Integer] | Send array of years. (optional) (default to null)
download = true # Boolean | Get the result as a CSV file. (optional) (default to null)
coo = coo_example # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
coa = coa_example # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
cooAll = true # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
coaAll = true # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
cfType = cfType_example # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

try: 
    # IDMC Data
    api_response = api_instance.idmc(page=page, limit=limit, yearFrom=yearFrom, yearTo=yearTo, year=year, download=download, coo=coo, coa=coa, cooAll=cooAll, coaAll=coaAll, cfType=cfType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->idmc: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let page = 56; // Integer
    let limit = 56; // Integer
    let yearFrom = 56; // Integer
    let yearTo = 56; // Integer
    let year = ; // array[Integer]
    let download = true; // Boolean
    let coo = coo_example; // String
    let coa = coa_example; // String
    let cooAll = true; // Boolean
    let coaAll = true; // Boolean
    let cfType = cfType_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.idmc(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
limit
Integer
The numbers of items to return.
yearFrom
Integer (int32)
The start year from which results will be filtered. The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
yearTo
Integer (int32)
The end year up to which results will be filtered. The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
year
array[Integer]
Send array of years.
download
Boolean
Get the result as a CSV file.
coo
String
Filter the data to one or more countries of origin. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coa
String
Filter the data to one or more countries of asylum. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coo_all
Boolean
Automatically includes all countries of origin in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoO.
coa_all
Boolean
Automatically includes all countries of asylum in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoA.
cf_type
String
If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes. See the summary lookup table between UNHCR and ISO codes.

Responses


population

Population figures

UNHCR data on displacement at the end of the year.


/population/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/population/?limit=&page=&yearFrom=&yearTo=&year=&download=&coo=&coa=&coo_all=&coa_all=&cf_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            PopulationPagination result = apiInstance.population(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#population");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            PopulationPagination result = apiInstance.population(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#population");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
Integer *yearFrom = 56; // The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
Integer *yearTo = 56; // The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
array[Integer] *year = ; // Send array of years. (optional) (default to null)
Boolean *download = true; // Get the result as a CSV file. (optional) (default to null)
String *coo = coo_example; // Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
String *coa = coa_example; // Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
Boolean *cooAll = true; // Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
Boolean *coaAll = true; // Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
String *cfType = cfType_example; // If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

// Population figures
[apiInstance populationWith:limit
    page:page
    yearFrom:yearFrom
    yearTo:yearTo
    year:year
    download:download
    coo:coo
    coa:coa
    cooAll:cooAll
    coaAll:coaAll
    cfType:cfType
              completionHandler: ^(PopulationPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'limit': 56, // {Integer} The numbers of items to return.
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'yearFrom': 56, // {Integer} The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
  'yearTo': 56, // {Integer} The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
  'year': , // {array[Integer]} Send array of years.
  'download': true, // {Boolean} Get the result as a CSV file.
  'coo': coo_example, // {String} Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'coa': coa_example, // {String} Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'cooAll': true, // {Boolean} Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
  'coaAll': true, // {Boolean} Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
  'cfType': cfType_example // {String} If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.population(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class populationExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var yearFrom = 56;  // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional)  (default to null)
            var yearTo = 56;  // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional)  (default to null)
            var year = new array[Integer](); // array[Integer] | Send array of years. (optional)  (default to null)
            var download = true;  // Boolean | Get the result as a CSV file. (optional)  (default to null)
            var coo = coo_example;  // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var coa = coa_example;  // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var cooAll = true;  // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional)  (default to null)
            var coaAll = true;  // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional)  (default to null)
            var cfType = cfType_example;  // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional)  (default to null)

            try {
                // Population figures
                PopulationPagination result = apiInstance.population(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.population: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$limit = 56; // Integer | The numbers of items to return.
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
$yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
$year = ; // array[Integer] | Send array of years.
$download = true; // Boolean | Get the result as a CSV file.
$coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
$coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
$cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

try {
    $result = $api_instance->population($limit, $page, $yearFrom, $yearTo, $year, $download, $coo, $coa, $cooAll, $coaAll, $cfType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->population: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $limit = 56; # Integer | The numbers of items to return.
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $yearFrom = 56; # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
my $yearTo = 56; # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
my $year = []; # array[Integer] | Send array of years.
my $download = true; # Boolean | Get the result as a CSV file.
my $coo = coo_example; # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $coa = coa_example; # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $cooAll = true; # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
my $coaAll = true; # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
my $cfType = cfType_example; # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

eval { 
    my $result = $api_instance->population(limit => $limit, page => $page, yearFrom => $yearFrom, yearTo => $yearTo, year => $year, download => $download, coo => $coo, coa => $coa, cooAll => $cooAll, coaAll => $coaAll, cfType => $cfType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->population: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
yearFrom = 56 # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
yearTo = 56 # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
year =  # array[Integer] | Send array of years. (optional) (default to null)
download = true # Boolean | Get the result as a CSV file. (optional) (default to null)
coo = coo_example # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
coa = coa_example # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
cooAll = true # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
coaAll = true # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
cfType = cfType_example # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

try: 
    # Population figures
    api_response = api_instance.population(limit=limit, page=page, yearFrom=yearFrom, yearTo=yearTo, year=year, download=download, coo=coo, coa=coa, cooAll=cooAll, coaAll=coaAll, cfType=cfType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->population: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let limit = 56; // Integer
    let page = 56; // Integer
    let yearFrom = 56; // Integer
    let yearTo = 56; // Integer
    let year = ; // array[Integer]
    let download = true; // Boolean
    let coo = coo_example; // String
    let coa = coa_example; // String
    let cooAll = true; // Boolean
    let coaAll = true; // Boolean
    let cfType = cfType_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.population(limit, page, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
limit
Integer
The numbers of items to return.
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
yearFrom
Integer (int32)
The start year from which results will be filtered. The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
yearTo
Integer (int32)
The end year up to which results will be filtered. The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
year
array[Integer]
Send array of years.
download
Boolean
Get the result as a CSV file.
coo
String
Filter the data to one or more countries of origin. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coa
String
Filter the data to one or more countries of asylum. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coo_all
Boolean
Automatically includes all countries of origin in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoO.
coa_all
Boolean
Automatically includes all countries of asylum in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoA.
cf_type
String
If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes. See the summary lookup table between UNHCR and ISO codes.

Responses


regions

Regions

Returns the list of UNHCR regions. See also the Countries end point, which includes the UNSD regions in the response by default. See also the full list of countries, UNHCR and UNSD regions.


/regions/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/regions/?limit=&page=®ion=&id="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        String region = region_example; // String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
        Integer id = 56; // Integer | The ID of the UNHCR region.  Valid values are between 1 and 7.
        
        try {
            RegionPagination result = apiInstance.regions(limit, page, region, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#regions");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        String region = region_example; // String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
        Integer id = 56; // Integer | The ID of the UNHCR region.  Valid values are between 1 and 7.
        
        try {
            RegionPagination result = apiInstance.regions(limit, page, region, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#regions");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
String *region = region_example; // The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional) (default to null)
Integer *id = 56; // The ID of the UNHCR region.  Valid values are between 1 and 7. (optional) (default to null)

// Regions
[apiInstance regionsWith:limit
    page:page
    region:region
    id:id
              completionHandler: ^(RegionPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'limit': 56, // {Integer} The numbers of items to return.
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'region': region_example, // {String} The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
  'id': 56 // {Integer} The ID of the UNHCR region.  Valid values are between 1 and 7.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.regions(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class regionsExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var region = region_example;  // String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional)  (default to null)
            var id = 56;  // Integer | The ID of the UNHCR region.  Valid values are between 1 and 7. (optional)  (default to null)

            try {
                // Regions
                RegionPagination result = apiInstance.regions(limit, page, region, id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.regions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$limit = 56; // Integer | The numbers of items to return.
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$region = region_example; // String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
$id = 56; // Integer | The ID of the UNHCR region.  Valid values are between 1 and 7.

try {
    $result = $api_instance->regions($limit, $page, $region, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->regions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $limit = 56; # Integer | The numbers of items to return.
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $region = region_example; # String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
my $id = 56; # Integer | The ID of the UNHCR region.  Valid values are between 1 and 7.

eval { 
    my $result = $api_instance->regions(limit => $limit, page => $page, region => $region, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->regions: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
region = region_example # String | The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa®ion[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx) (optional) (default to null)
id = 56 # Integer | The ID of the UNHCR region.  Valid values are between 1 and 7. (optional) (default to null)

try: 
    # Regions
    api_response = api_instance.regions(limit=limit, page=page, region=region, id=id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->regions: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let limit = 56; // Integer
    let page = 56; // Integer
    let region = region_example; // String
    let id = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.regions(limit, page, region, id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
limit
Integer
The numbers of items to return.
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
region
String
The UNSD sub-region name (see the regions endpoint). To retrieve data for an array of UNSD regions use the array notation e.g. 'region[]=Middle Africa&region[]=Southern Africa' [See also the full list of countries, UNHCR and UNSD regions](https://unhcr-web.github.io/refugee-statistics/0000-Countries/T22.xlsx)
id
Integer
The ID of the UNHCR region. Valid values are between 1 and 7.

Responses


solutions

Solutions

Data on solutions record those refugees and IDPs that have availed a durable solution. See the definitions of each durable solution in the [methodology](https://www.unhcr.org/refugee-statistics/methodology/) pages.


/solutions/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/solutions/?page=&limit=&yearFrom=&yearTo=&year=&download=&coo=&coa=&coo_all=&coa_all=&cf_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            SolutionsPagination result = apiInstance.solutions(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#solutions");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            SolutionsPagination result = apiInstance.solutions(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#solutions");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *yearFrom = 56; // The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
Integer *yearTo = 56; // The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
array[Integer] *year = ; // Send array of years. (optional) (default to null)
Boolean *download = true; // Get the result as a CSV file. (optional) (default to null)
String *coo = coo_example; // Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
String *coa = coa_example; // Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
Boolean *cooAll = true; // Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
Boolean *coaAll = true; // Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
String *cfType = cfType_example; // If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

// Solutions
[apiInstance solutionsWith:page
    limit:limit
    yearFrom:yearFrom
    yearTo:yearTo
    year:year
    download:download
    coo:coo
    coa:coa
    cooAll:cooAll
    coaAll:coaAll
    cfType:cfType
              completionHandler: ^(SolutionsPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'limit': 56, // {Integer} The numbers of items to return.
  'yearFrom': 56, // {Integer} The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
  'yearTo': 56, // {Integer} The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
  'year': , // {array[Integer]} Send array of years.
  'download': true, // {Boolean} Get the result as a CSV file.
  'coo': coo_example, // {String} Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'coa': coa_example, // {String} Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'cooAll': true, // {Boolean} Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
  'coaAll': true, // {Boolean} Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
  'cfType': cfType_example // {String} If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.solutions(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class solutionsExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var yearFrom = 56;  // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional)  (default to null)
            var yearTo = 56;  // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional)  (default to null)
            var year = new array[Integer](); // array[Integer] | Send array of years. (optional)  (default to null)
            var download = true;  // Boolean | Get the result as a CSV file. (optional)  (default to null)
            var coo = coo_example;  // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var coa = coa_example;  // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var cooAll = true;  // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional)  (default to null)
            var coaAll = true;  // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional)  (default to null)
            var cfType = cfType_example;  // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional)  (default to null)

            try {
                // Solutions
                SolutionsPagination result = apiInstance.solutions(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.solutions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$limit = 56; // Integer | The numbers of items to return.
$yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
$yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
$year = ; // array[Integer] | Send array of years.
$download = true; // Boolean | Get the result as a CSV file.
$coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
$coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
$cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

try {
    $result = $api_instance->solutions($page, $limit, $yearFrom, $yearTo, $year, $download, $coo, $coa, $cooAll, $coaAll, $cfType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->solutions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $limit = 56; # Integer | The numbers of items to return.
my $yearFrom = 56; # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
my $yearTo = 56; # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
my $year = []; # array[Integer] | Send array of years.
my $download = true; # Boolean | Get the result as a CSV file.
my $coo = coo_example; # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $coa = coa_example; # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $cooAll = true; # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
my $coaAll = true; # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
my $cfType = cfType_example; # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

eval { 
    my $result = $api_instance->solutions(page => $page, limit => $limit, yearFrom => $yearFrom, yearTo => $yearTo, year => $year, download => $download, coo => $coo, coa => $coa, cooAll => $cooAll, coaAll => $coaAll, cfType => $cfType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->solutions: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
yearFrom = 56 # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
yearTo = 56 # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
year =  # array[Integer] | Send array of years. (optional) (default to null)
download = true # Boolean | Get the result as a CSV file. (optional) (default to null)
coo = coo_example # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
coa = coa_example # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
cooAll = true # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
coaAll = true # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
cfType = cfType_example # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

try: 
    # Solutions
    api_response = api_instance.solutions(page=page, limit=limit, yearFrom=yearFrom, yearTo=yearTo, year=year, download=download, coo=coo, coa=coa, cooAll=cooAll, coaAll=coaAll, cfType=cfType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->solutions: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let page = 56; // Integer
    let limit = 56; // Integer
    let yearFrom = 56; // Integer
    let yearTo = 56; // Integer
    let year = ; // array[Integer]
    let download = true; // Boolean
    let coo = coo_example; // String
    let coa = coa_example; // String
    let cooAll = true; // Boolean
    let coaAll = true; // Boolean
    let cfType = cfType_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.solutions(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
limit
Integer
The numbers of items to return.
yearFrom
Integer (int32)
The start year from which results will be filtered. The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
yearTo
Integer (int32)
The end year up to which results will be filtered. The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
year
array[Integer]
Send array of years.
download
Boolean
Get the result as a CSV file.
coo
String
Filter the data to one or more countries of origin. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coa
String
Filter the data to one or more countries of asylum. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coo_all
Boolean
Automatically includes all countries of origin in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoO.
coa_all
Boolean
Automatically includes all countries of asylum in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoA.
cf_type
String
If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes. See the summary lookup table between UNHCR and ISO codes.

Responses


unrwa

UNRWA data

Retrieves the data on Palestine refugees registered under UNRWA’s mandate.


/unrwa/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/unrwa/?page=&limit=&yearFrom=&yearTo=&year=&download=&coo=&coa=&coo_all=&coa_all=&cf_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            UNRWAPagination result = apiInstance.unrwa(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#unrwa");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
        Integer yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
        array[Integer] year = ; // array[Integer] | Send array of years.
        Boolean download = true; // Boolean | Get the result as a CSV file.
        String coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        String coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
        Boolean cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
        Boolean coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
        String cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
        
        try {
            UNRWAPagination result = apiInstance.unrwa(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#unrwa");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *yearFrom = 56; // The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
Integer *yearTo = 56; // The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
array[Integer] *year = ; // Send array of years. (optional) (default to null)
Boolean *download = true; // Get the result as a CSV file. (optional) (default to null)
String *coo = coo_example; // Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
String *coa = coa_example; // Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
Boolean *cooAll = true; // Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
Boolean *coaAll = true; // Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
String *cfType = cfType_example; // If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

// UNRWA data
[apiInstance unrwaWith:page
    limit:limit
    yearFrom:yearFrom
    yearTo:yearTo
    year:year
    download:download
    coo:coo
    coa:coa
    cooAll:cooAll
    coaAll:coaAll
    cfType:cfType
              completionHandler: ^(UNRWAPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'page': 56, // {Integer} If pagination is available, send the number of page you wish to fetch.
  'limit': 56, // {Integer} The numbers of items to return.
  'yearFrom': 56, // {Integer} The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
  'yearTo': 56, // {Integer} The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
  'year': , // {array[Integer]} Send array of years.
  'download': true, // {Boolean} Get the result as a CSV file.
  'coo': coo_example, // {String} Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'coa': coa_example, // {String} Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
  'cooAll': true, // {Boolean} Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
  'coaAll': true, // {Boolean} Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
  'cfType': cfType_example // {String} If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.unrwa(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class unrwaExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var yearFrom = 56;  // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional)  (default to null)
            var yearTo = 56;  // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional)  (default to null)
            var year = new array[Integer](); // array[Integer] | Send array of years. (optional)  (default to null)
            var download = true;  // Boolean | Get the result as a CSV file. (optional)  (default to null)
            var coo = coo_example;  // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var coa = coa_example;  // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional)  (default to null)
            var cooAll = true;  // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional)  (default to null)
            var coaAll = true;  // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional)  (default to null)
            var cfType = cfType_example;  // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional)  (default to null)

            try {
                // UNRWA data
                UNRWAPagination result = apiInstance.unrwa(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.unrwa: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
$limit = 56; // Integer | The numbers of items to return.
$yearFrom = 56; // Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
$yearTo = 56; // Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
$year = ; // array[Integer] | Send array of years.
$download = true; // Boolean | Get the result as a CSV file.
$coo = coo_example; // String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$coa = coa_example; // String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
$cooAll = true; // Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
$coaAll = true; // Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
$cfType = cfType_example; // String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

try {
    $result = $api_instance->unrwa($page, $limit, $yearFrom, $yearTo, $year, $download, $coo, $coa, $cooAll, $coaAll, $cfType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->unrwa: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.
my $limit = 56; # Integer | The numbers of items to return.
my $yearFrom = 56; # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
my $yearTo = 56; # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
my $year = []; # array[Integer] | Send array of years.
my $download = true; # Boolean | Get the result as a CSV file.
my $coo = coo_example; # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $coa = coa_example; # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
my $cooAll = true; # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO.
my $coaAll = true; # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA.
my $cfType = cfType_example; # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes.

eval { 
    my $result = $api_instance->unrwa(page => $page, limit => $limit, yearFrom => $yearFrom, yearTo => $yearTo, year => $year, download => $download, coo => $coo, coa => $coa, cooAll => $cooAll, coaAll => $coaAll, cfType => $cfType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->unrwa: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
yearFrom = 56 # Integer | The start year from which results will be filtered.  The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo). (optional) (default to null)
yearTo = 56 # Integer | The end year up to which results will be filtered.  The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom). (optional) (default to null)
year =  # array[Integer] | Send array of years. (optional) (default to null)
download = true # Boolean | Get the result as a CSV file. (optional) (default to null)
coo = coo_example # String | Filter the data to one or more countries of origin.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
coa = coa_example # String | Filter the data to one or more countries of asylum.  The countries are specified using the three character country codes (e,g, AFG for Afghanistan).  Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used.  To use three character ISO codes instead, see the cfType parameter.  See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row. (optional) (default to null)
cooAll = true # Boolean | Automatically includes all countries of origin in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoO. (optional) (default to null)
coaAll = true # Boolean | Automatically includes all countries of asylum in the response if set to “true”.  If set, this overrides the specific selection of countries provided to CoA. (optional) (default to null)
cfType = cfType_example # String | If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes.  See the summary lookup table between UNHCR and ISO codes. (optional) (default to null)

try: 
    # UNRWA data
    api_response = api_instance.unrwa(page=page, limit=limit, yearFrom=yearFrom, yearTo=yearTo, year=year, download=download, coo=coo, coa=coa, cooAll=cooAll, coaAll=coaAll, cfType=cfType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->unrwa: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let page = 56; // Integer
    let limit = 56; // Integer
    let yearFrom = 56; // Integer
    let yearTo = 56; // Integer
    let year = ; // array[Integer]
    let download = true; // Boolean
    let coo = coo_example; // String
    let coa = coa_example; // String
    let cooAll = true; // Boolean
    let coaAll = true; // Boolean
    let cfType = cfType_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.unrwa(page, limit, yearFrom, yearTo, year, download, coo, coa, cooAll, coaAll, cfType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.
limit
Integer
The numbers of items to return.
yearFrom
Integer (int32)
The start year from which results will be filtered. The data results are inclusive of the given year (e.g. 2010 would result in data from and including 2010 up until the latest year, or the year specified in yearTo).
yearTo
Integer (int32)
The end year up to which results will be filtered. The data results are inclusive of the given year (e.g. 2015 would result in data up to and including 2015 back through the available data, or the year specified in yearFrom).
year
array[Integer]
Send array of years.
download
Boolean
Get the result as a CSV file.
coo
String
Filter the data to one or more countries of origin. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coa
String
Filter the data to one or more countries of asylum. The countries are specified using the three character country codes (e,g, AFG for Afghanistan). Use a comma separated list to filter to multiple countries (e.g. “AFG,PAK”) or use the array notation e.g. “coo[]=AFG&coo[]=PAK”. By default, UNHCR’s country codes are used. To use three character ISO codes instead, see the cfType parameter. See the lookup between UNHCR and ISO3 country codes, including also the regions. If not specified, data for this dimension will be summed and aggregated to one row.
coo_all
Boolean
Automatically includes all countries of origin in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoO.
coa_all
Boolean
Automatically includes all countries of asylum in the response if set to “true”. If set, this overrides the specific selection of countries provided to CoA.
cf_type
String
If set to “ISO” will cause the searches by origin and asylum to use the ISO3 codes. See the summary lookup table between UNHCR and ISO codes.

Responses


years

Years

Retrieves the list of years for which data is available. Browse this summary to see data availability for specific population types, solution types, demographic disaggregation and countries of asylum.


/years/

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://api.unhcr.org/population/v1/years/?limit=&page="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {
        
        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        
        try {
            YearPagination result = apiInstance.years(limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#years");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer limit = 56; // Integer | The numbers of items to return.
        Integer page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.
        
        try {
            YearPagination result = apiInstance.years(limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#years");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *limit = 56; // The numbers of items to return. (optional) (default to 100)
Integer *page = 56; // If pagination is available, send the number of page you wish to fetch. (optional) (default to null)

// Years
[apiInstance yearsWith:limit
    page:page
              completionHandler: ^(YearPagination output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var RefugeeStatisticsApi = require('refugee_statistics_api');

// Create an instance of the API class
var api = new RefugeeStatisticsApi.DefaultApi()
var opts = {
  'limit': 56, // {Integer} The numbers of items to return.
  'page': 56 // {Integer} If pagination is available, send the number of page you wish to fetch.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.years(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class yearsExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var limit = 56;  // Integer | The numbers of items to return. (optional)  (default to 100)
            var page = 56;  // Integer | If pagination is available, send the number of page you wish to fetch. (optional)  (default to null)

            try {
                // Years
                YearPagination result = apiInstance.years(limit, page);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.years: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$limit = 56; // Integer | The numbers of items to return.
$page = 56; // Integer | If pagination is available, send the number of page you wish to fetch.

try {
    $result = $api_instance->years($limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->years: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $limit = 56; # Integer | The numbers of items to return.
my $page = 56; # Integer | If pagination is available, send the number of page you wish to fetch.

eval { 
    my $result = $api_instance->years(limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->years: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
limit = 56 # Integer | The numbers of items to return. (optional) (default to 100)
page = 56 # Integer | If pagination is available, send the number of page you wish to fetch. (optional) (default to null)

try: 
    # Years
    api_response = api_instance.years(limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->years: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let limit = 56; // Integer
    let page = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.years(limit, page, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
limit
Integer
The numbers of items to return.
page
Integer (int32)
If pagination is available, send the number of page you wish to fetch.

Responses