Open AQ Platform API

Cities

cities

Provides a simple listing of cities within the platform.


/cities

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/cities?country=&order_by=&sort=&limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CitiesApi;

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

public class CitiesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        CitiesApi apiInstance = new CitiesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String country = country_example; // String | Limit results by a certain country.
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations).
Default value: country
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200 result = apiInstance.cities(apiecoKey, country, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CitiesApi#cities");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CitiesApi;

public class CitiesApiExample {

    public static void main(String[] args) {
        CitiesApi apiInstance = new CitiesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String country = country_example; // String | Limit results by a certain country.
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations).
Default value: country
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200 result = apiInstance.cities(apiecoKey, country, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CitiesApi#cities");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *country = country_example; // Limit results by a certain country. (optional)
array[String] *orderBy = ; // Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations).
Default value: country (optional)
array[String] *sort = ; // Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
BigDecimal *limit = 8.14; // Change the number of results returned, max is 10000.
Default value: 100 (optional)
BigDecimal *page = 8.14; // aginate through results.
Default value: 1 (optional)

CitiesApi *apiInstance = [[CitiesApi alloc] init];

[apiInstance citiesWith:apiecoKey
    country:country
    orderBy:orderBy
    sort:sort
    limit:limit
    page:page
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.CitiesApi()

var apiecoKey = apiecoKey_example; // {String} 

var opts = { 
  'country': country_example, // {String} Limit results by a certain country.
  'orderBy': , // {array[String]} Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations).
Default value: country
  'sort': , // {array[String]} Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
  'limit': 8.14, // {BigDecimal} Change the number of results returned, max is 10000.
Default value: 100
  'page': 8.14 // {BigDecimal} aginate through results.
Default value: 1
};

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

namespace Example
{
    public class citiesExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new CitiesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var country = country_example;  // String | Limit results by a certain country. (optional) 
            var orderBy = new array[String](); // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations).
Default value: country (optional) 
            var sort = new array[String](); // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional) 
            var limit = 8.14;  // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional) 
            var page = 8.14;  // BigDecimal | aginate through results.
Default value: 1 (optional) 

            try
            {
                inline_response_200 result = apiInstance.cities(apiecoKey, country, orderBy, sort, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CitiesApi.cities: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\CitiesApi();
$apiecoKey = apiecoKey_example; // String | 
$country = country_example; // String | Limit results by a certain country.
$orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations).
Default value: country
$sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
$limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
$page = 8.14; // BigDecimal | aginate through results.
Default value: 1

try {
    $result = $api_instance->cities($apiecoKey, $country, $orderBy, $sort, $limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CitiesApi->cities: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CitiesApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CitiesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $country = country_example; # String | Limit results by a certain country.
my $orderBy = []; # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations).
Default value: country
my $sort = []; # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
my $limit = 8.14; # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
my $page = 8.14; # BigDecimal | aginate through results.
Default value: 1

eval { 
    my $result = $api_instance->cities(apiecoKey => $apiecoKey, country => $country, orderBy => $orderBy, sort => $sort, limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CitiesApi->cities: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CitiesApi()
apiecoKey = apiecoKey_example # String | 
country = country_example # String | Limit results by a certain country. (optional)
orderBy =  # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations).
Default value: country (optional)
sort =  # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
limit = 8.14 # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional)
page = 8.14 # BigDecimal | aginate through results.
Default value: 1 (optional)

try: 
    api_response = api_instance.cities(apiecoKey, country=country, orderBy=orderBy, sort=sort, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CitiesApi->cities: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
country
String
Limit results by a certain country.
order_by
array[String]
Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=locations). Default value: country
sort
array[String]
Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc). Default value: asc
limit
BigDecimal
Change the number of results returned, max is 10000. Default value: 100
page
BigDecimal
aginate through results. Default value: 1

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


Countries

countries

Provides a simple listing of countries within the platform.


/countries

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/countries?order_by=&sort=&limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CountriesApi;

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

public class CountriesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        CountriesApi apiInstance = new CountriesApi();
        String apiecoKey = apiecoKey_example; // String | 
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations).
Default value: name
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_1 result = apiInstance.countries(apiecoKey, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CountriesApi#countries");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CountriesApi;

public class CountriesApiExample {

    public static void main(String[] args) {
        CountriesApi apiInstance = new CountriesApi();
        String apiecoKey = apiecoKey_example; // String | 
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations).
Default value: name
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_1 result = apiInstance.countries(apiecoKey, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CountriesApi#countries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
array[String] *orderBy = ; // Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations).
Default value: name (optional)
array[String] *sort = ; // Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
BigDecimal *limit = 8.14; // Change the number of results returned, max is 10000.
Default value: 100 (optional)
BigDecimal *page = 8.14; // aginate through results.
Default value: 1 (optional)

CountriesApi *apiInstance = [[CountriesApi alloc] init];

[apiInstance countriesWith:apiecoKey
    orderBy:orderBy
    sort:sort
    limit:limit
    page:page
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.CountriesApi()

var apiecoKey = apiecoKey_example; // {String} 

var opts = { 
  'orderBy': , // {array[String]} Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations).
Default value: name
  'sort': , // {array[String]} Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
  'limit': 8.14, // {BigDecimal} Change the number of results returned, max is 10000.
Default value: 100
  'page': 8.14 // {BigDecimal} aginate through results.
Default value: 1
};

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

namespace Example
{
    public class countriesExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new CountriesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var orderBy = new array[String](); // array[String] | Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations).
Default value: name (optional) 
            var sort = new array[String](); // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional) 
            var limit = 8.14;  // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional) 
            var page = 8.14;  // BigDecimal | aginate through results.
Default value: 1 (optional) 

            try
            {
                inline_response_200_1 result = apiInstance.countries(apiecoKey, orderBy, sort, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CountriesApi.countries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\CountriesApi();
$apiecoKey = apiecoKey_example; // String | 
$orderBy = ; // array[String] | Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations).
Default value: name
$sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
$limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
$page = 8.14; // BigDecimal | aginate through results.
Default value: 1

try {
    $result = $api_instance->countries($apiecoKey, $orderBy, $sort, $limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CountriesApi->countries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CountriesApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CountriesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $orderBy = []; # array[String] | Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations).
Default value: name
my $sort = []; # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
my $limit = 8.14; # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
my $page = 8.14; # BigDecimal | aginate through results.
Default value: 1

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

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CountriesApi()
apiecoKey = apiecoKey_example # String | 
orderBy =  # array[String] | Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations).
Default value: name (optional)
sort =  # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
limit = 8.14 # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional)
page = 8.14 # BigDecimal | aginate through results.
Default value: 1 (optional)

try: 
    api_response = api_instance.countries(apiecoKey, orderBy=orderBy, sort=sort, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CountriesApi->countries: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
order_by
array[String]
Order by one or more fields (ex. order_by=cities or order_by[]=cities&order_by[]=locations). Default value: name
sort
array[String]
Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc). Default value: asc
limit
BigDecimal
Change the number of results returned, max is 10000. Default value: 100
page
BigDecimal
aginate through results. Default value: 1

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


Fetches_

fetches

Providing data about individual fetch operations that are used to populate data in the platform.


/fetches

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/fetches?order_by=&sort=&limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Fetches_Api;

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

public class Fetches_ApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        Fetches_Api apiInstance = new Fetches_Api();
        String apiecoKey = apiecoKey_example; // String | 
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=timeEnded  or order_by[]=timeEnded&order_by[]=count).
Default value: timeStarted
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_2 result = apiInstance.fetches(apiecoKey, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Fetches_Api#fetches");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.Fetches_Api;

public class Fetches_ApiExample {

    public static void main(String[] args) {
        Fetches_Api apiInstance = new Fetches_Api();
        String apiecoKey = apiecoKey_example; // String | 
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=timeEnded  or order_by[]=timeEnded&order_by[]=count).
Default value: timeStarted
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_2 result = apiInstance.fetches(apiecoKey, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Fetches_Api#fetches");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
array[String] *orderBy = ; // Order by one or more fields (ex. order_by=timeEnded  or order_by[]=timeEnded&order_by[]=count).
Default value: timeStarted (optional)
array[String] *sort = ; // Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
BigDecimal *limit = 8.14; // Change the number of results returned, max is 10000.
Default value: 100 (optional)
BigDecimal *page = 8.14; // aginate through results.
Default value: 1 (optional)

Fetches_Api *apiInstance = [[Fetches_Api alloc] init];

[apiInstance fetchesWith:apiecoKey
    orderBy:orderBy
    sort:sort
    limit:limit
    page:page
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.Fetches_Api()

var apiecoKey = apiecoKey_example; // {String} 

var opts = { 
  'orderBy': , // {array[String]} Order by one or more fields (ex. order_by=timeEnded  or order_by[]=timeEnded&order_by[]=count).
Default value: timeStarted
  'sort': , // {array[String]} Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
  'limit': 8.14, // {BigDecimal} Change the number of results returned, max is 10000.
Default value: 100
  'page': 8.14 // {BigDecimal} aginate through results.
Default value: 1
};

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

namespace Example
{
    public class fetchesExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new Fetches_Api();
            var apiecoKey = apiecoKey_example;  // String | 
            var orderBy = new array[String](); // array[String] | Order by one or more fields (ex. order_by=timeEnded  or order_by[]=timeEnded&order_by[]=count).
Default value: timeStarted (optional) 
            var sort = new array[String](); // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional) 
            var limit = 8.14;  // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional) 
            var page = 8.14;  // BigDecimal | aginate through results.
Default value: 1 (optional) 

            try
            {
                inline_response_200_2 result = apiInstance.fetches(apiecoKey, orderBy, sort, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Fetches_Api.fetches: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\Fetches_Api();
$apiecoKey = apiecoKey_example; // String | 
$orderBy = ; // array[String] | Order by one or more fields (ex. order_by=timeEnded  or order_by[]=timeEnded&order_by[]=count).
Default value: timeStarted
$sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
$limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
$page = 8.14; // BigDecimal | aginate through results.
Default value: 1

try {
    $result = $api_instance->fetches($apiecoKey, $orderBy, $sort, $limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Fetches_Api->fetches: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Fetches_Api;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::Fetches_Api->new();
my $apiecoKey = apiecoKey_example; # String | 
my $orderBy = []; # array[String] | Order by one or more fields (ex. order_by=timeEnded  or order_by[]=timeEnded&order_by[]=count).
Default value: timeStarted
my $sort = []; # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
my $limit = 8.14; # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
my $page = 8.14; # BigDecimal | aginate through results.
Default value: 1

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

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.Fetches_Api()
apiecoKey = apiecoKey_example # String | 
orderBy =  # array[String] | Order by one or more fields (ex. order_by=timeEnded  or order_by[]=timeEnded&order_by[]=count).
Default value: timeStarted (optional)
sort =  # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
limit = 8.14 # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional)
page = 8.14 # BigDecimal | aginate through results.
Default value: 1 (optional)

try: 
    api_response = api_instance.fetches(apiecoKey, orderBy=orderBy, sort=sort, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Fetches_Api->fetches: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
order_by
array[String]
Order by one or more fields (ex. order_by=timeEnded or order_by[]=timeEnded&order_by[]=count). Default value: timeStarted
sort
array[String]
Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc). Default value: asc
limit
BigDecimal
Change the number of results returned, max is 10000. Default value: 100
page
BigDecimal
aginate through results. Default value: 1

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


Latest_

latest

Provides the latest value of each available parameter for every location in the system.


/latest

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/latest?cuty=&country=&location=¶meter=&has_geo=&coordinates=&order_by=&sort=&limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Latest_Api;

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

public class Latest_ApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        Latest_Api apiInstance = new Latest_Api();
        String apiecoKey = apiecoKey_example; // String | 
        String cuty = cuty_example; // String | Limit results by a certain city.
        String country = country_example; // String | Limit results by a certain country.
        String location = location_example; // String | Limit results by a certain location.
        String parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
        Boolean hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
        String coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_3 result = apiInstance.latest(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Latest_Api#latest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.Latest_Api;

public class Latest_ApiExample {

    public static void main(String[] args) {
        Latest_Api apiInstance = new Latest_Api();
        String apiecoKey = apiecoKey_example; // String | 
        String cuty = cuty_example; // String | Limit results by a certain city.
        String country = country_example; // String | Limit results by a certain country.
        String location = location_example; // String | Limit results by a certain location.
        String parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
        Boolean hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
        String coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_3 result = apiInstance.latest(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Latest_Api#latest");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *cuty = cuty_example; // Limit results by a certain city. (optional)
String *country = country_example; // Limit results by a certain country. (optional)
String *location = location_example; // Limit results by a certain location. (optional)
String *parameter = parameter_example; // Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional)
Boolean *hasGeo = true; // Filter out items that have or do not have geographic information. (optional)
String *coordinates = coordinates_example; // Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional)
array[String] *orderBy = ; // Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional)
array[String] *sort = ; // Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
BigDecimal *limit = 8.14; // Change the number of results returned, max is 10000.
Default value: 100 (optional)
BigDecimal *page = 8.14; // aginate through results.
Default value: 1 (optional)

Latest_Api *apiInstance = [[Latest_Api alloc] init];

[apiInstance latestWith:apiecoKey
    cuty:cuty
    country:country
    location:location
    parameter:parameter
    hasGeo:hasGeo
    coordinates:coordinates
    orderBy:orderBy
    sort:sort
    limit:limit
    page:page
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.Latest_Api()

var apiecoKey = apiecoKey_example; // {String} 

var opts = { 
  'cuty': cuty_example, // {String} Limit results by a certain city.
  'country': country_example, // {String} Limit results by a certain country.
  'location': location_example, // {String} Limit results by a certain location.
  'parameter': parameter_example, // {String} Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
  'hasGeo': true, // {Boolean} Filter out items that have or do not have geographic information.
  'coordinates': coordinates_example, // {String} Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
  'orderBy': , // {array[String]} Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
  'sort': , // {array[String]} Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
  'limit': 8.14, // {BigDecimal} Change the number of results returned, max is 10000.
Default value: 100
  'page': 8.14 // {BigDecimal} aginate through results.
Default value: 1
};

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

namespace Example
{
    public class latestExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new Latest_Api();
            var apiecoKey = apiecoKey_example;  // String | 
            var cuty = cuty_example;  // String | Limit results by a certain city. (optional) 
            var country = country_example;  // String | Limit results by a certain country. (optional) 
            var location = location_example;  // String | Limit results by a certain location. (optional) 
            var parameter = parameter_example;  // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional) 
            var hasGeo = true;  // Boolean | Filter out items that have or do not have geographic information. (optional) 
            var coordinates = coordinates_example;  // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional) 
            var orderBy = new array[String](); // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional) 
            var sort = new array[String](); // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional) 
            var limit = 8.14;  // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional) 
            var page = 8.14;  // BigDecimal | aginate through results.
Default value: 1 (optional) 

            try
            {
                inline_response_200_3 result = apiInstance.latest(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Latest_Api.latest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\Latest_Api();
$apiecoKey = apiecoKey_example; // String | 
$cuty = cuty_example; // String | Limit results by a certain city.
$country = country_example; // String | Limit results by a certain country.
$location = location_example; // String | Limit results by a certain location.
$parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
$hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
$coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
$orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
$sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
$limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
$page = 8.14; // BigDecimal | aginate through results.
Default value: 1

try {
    $result = $api_instance->latest($apiecoKey, $cuty, $country, $location, $parameter, $hasGeo, $coordinates, $orderBy, $sort, $limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Latest_Api->latest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Latest_Api;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::Latest_Api->new();
my $apiecoKey = apiecoKey_example; # String | 
my $cuty = cuty_example; # String | Limit results by a certain city.
my $country = country_example; # String | Limit results by a certain country.
my $location = location_example; # String | Limit results by a certain location.
my $parameter = parameter_example; # String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
my $hasGeo = true; # Boolean | Filter out items that have or do not have geographic information.
my $coordinates = coordinates_example; # String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
my $orderBy = []; # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
my $sort = []; # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
my $limit = 8.14; # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
my $page = 8.14; # BigDecimal | aginate through results.
Default value: 1

eval { 
    my $result = $api_instance->latest(apiecoKey => $apiecoKey, cuty => $cuty, country => $country, location => $location, parameter => $parameter, hasGeo => $hasGeo, coordinates => $coordinates, orderBy => $orderBy, sort => $sort, limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Latest_Api->latest: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.Latest_Api()
apiecoKey = apiecoKey_example # String | 
cuty = cuty_example # String | Limit results by a certain city. (optional)
country = country_example # String | Limit results by a certain country. (optional)
location = location_example # String | Limit results by a certain location. (optional)
parameter = parameter_example # String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional)
hasGeo = true # Boolean | Filter out items that have or do not have geographic information. (optional)
coordinates = coordinates_example # String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional)
orderBy =  # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional)
sort =  # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
limit = 8.14 # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional)
page = 8.14 # BigDecimal | aginate through results.
Default value: 1 (optional)

try: 
    api_response = api_instance.latest(apiecoKey, cuty=cuty, country=country, location=location, parameter=parameter, hasGeo=hasGeo, coordinates=coordinates, orderBy=orderBy, sort=sort, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Latest_Api->latest: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
cuty
String
Limit results by a certain city.
country
String
Limit results by a certain country.
location
String
Limit results by a certain location.
parameter
String
Limit results by a certain parametr. Allowed values: pm25, pm10, so2, no2, o3, co, bc
has_geo
Boolean
Filter out items that have or do not have geographic information.
coordinates
String
Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
order_by
array[String]
Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city). Default value: location
sort
array[String]
Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc). Default value: asc
limit
BigDecimal
Change the number of results returned, max is 10000. Default value: 100
page
BigDecimal
aginate through results. Default value: 1

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


Locations

locations

Provides a list of measurement locations and their meta data.


/locations

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/locations?cuty=&country=&location=¶meter=&has_geo=&coordinates=&order_by=&sort=&limit=&page=&completeness=&inletHeight="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LocationsApi;

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

public class LocationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        LocationsApi apiInstance = new LocationsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String cuty = cuty_example; // String | Limit results by a certain city.
        String country = country_example; // String | Limit results by a certain country.
        String location = location_example; // String | Limit results by a certain location.
        String parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
        Boolean hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
        String coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        BigDecimal completeness = 8.14; // BigDecimal | Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1)
        BigDecimal inletHeight = 8.14; // BigDecimal | Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12)
        try {
            inline_response_200_3 result = apiInstance.locations(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page, completeness, inletHeight);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationsApi#locations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LocationsApi;

public class LocationsApiExample {

    public static void main(String[] args) {
        LocationsApi apiInstance = new LocationsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String cuty = cuty_example; // String | Limit results by a certain city.
        String country = country_example; // String | Limit results by a certain country.
        String location = location_example; // String | Limit results by a certain location.
        String parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
        Boolean hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
        String coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        BigDecimal completeness = 8.14; // BigDecimal | Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1)
        BigDecimal inletHeight = 8.14; // BigDecimal | Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12)
        try {
            inline_response_200_3 result = apiInstance.locations(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page, completeness, inletHeight);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationsApi#locations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *cuty = cuty_example; // Limit results by a certain city. (optional)
String *country = country_example; // Limit results by a certain country. (optional)
String *location = location_example; // Limit results by a certain location. (optional)
String *parameter = parameter_example; // Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional)
Boolean *hasGeo = true; // Filter out items that have or do not have geographic information. (optional)
String *coordinates = coordinates_example; // Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional)
array[String] *orderBy = ; // Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional)
array[String] *sort = ; // Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
BigDecimal *limit = 8.14; // Change the number of results returned, max is 10000.
Default value: 100 (optional)
BigDecimal *page = 8.14; // aginate through results.
Default value: 1 (optional)
BigDecimal *completeness = 8.14; // Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1) (optional)
BigDecimal *inletHeight = 8.14; // Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12) (optional)

LocationsApi *apiInstance = [[LocationsApi alloc] init];

[apiInstance locationsWith:apiecoKey
    cuty:cuty
    country:country
    location:location
    parameter:parameter
    hasGeo:hasGeo
    coordinates:coordinates
    orderBy:orderBy
    sort:sort
    limit:limit
    page:page
    completeness:completeness
    inletHeight:inletHeight
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.LocationsApi()

var apiecoKey = apiecoKey_example; // {String} 

var opts = { 
  'cuty': cuty_example, // {String} Limit results by a certain city.
  'country': country_example, // {String} Limit results by a certain country.
  'location': location_example, // {String} Limit results by a certain location.
  'parameter': parameter_example, // {String} Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
  'hasGeo': true, // {Boolean} Filter out items that have or do not have geographic information.
  'coordinates': coordinates_example, // {String} Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
  'orderBy': , // {array[String]} Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
  'sort': , // {array[String]} Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
  'limit': 8.14, // {BigDecimal} Change the number of results returned, max is 10000.
Default value: 100
  'page': 8.14, // {BigDecimal} aginate through results.
Default value: 1
  'completeness': 8.14, // {BigDecimal} Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1)
  'inletHeight': 8.14 // {BigDecimal} Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12)
};

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

namespace Example
{
    public class locationsExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new LocationsApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var cuty = cuty_example;  // String | Limit results by a certain city. (optional) 
            var country = country_example;  // String | Limit results by a certain country. (optional) 
            var location = location_example;  // String | Limit results by a certain location. (optional) 
            var parameter = parameter_example;  // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional) 
            var hasGeo = true;  // Boolean | Filter out items that have or do not have geographic information. (optional) 
            var coordinates = coordinates_example;  // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional) 
            var orderBy = new array[String](); // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional) 
            var sort = new array[String](); // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional) 
            var limit = 8.14;  // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional) 
            var page = 8.14;  // BigDecimal | aginate through results.
Default value: 1 (optional) 
            var completeness = 8.14;  // BigDecimal | Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1) (optional) 
            var inletHeight = 8.14;  // BigDecimal | Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12) (optional) 

            try
            {
                inline_response_200_3 result = apiInstance.locations(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page, completeness, inletHeight);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LocationsApi.locations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\LocationsApi();
$apiecoKey = apiecoKey_example; // String | 
$cuty = cuty_example; // String | Limit results by a certain city.
$country = country_example; // String | Limit results by a certain country.
$location = location_example; // String | Limit results by a certain location.
$parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
$hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
$coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
$orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
$sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
$limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
$page = 8.14; // BigDecimal | aginate through results.
Default value: 1
$completeness = 8.14; // BigDecimal | Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1)
$inletHeight = 8.14; // BigDecimal | Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12)

try {
    $result = $api_instance->locations($apiecoKey, $cuty, $country, $location, $parameter, $hasGeo, $coordinates, $orderBy, $sort, $limit, $page, $completeness, $inletHeight);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LocationsApi->locations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LocationsApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LocationsApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $cuty = cuty_example; # String | Limit results by a certain city.
my $country = country_example; # String | Limit results by a certain country.
my $location = location_example; # String | Limit results by a certain location.
my $parameter = parameter_example; # String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
my $hasGeo = true; # Boolean | Filter out items that have or do not have geographic information.
my $coordinates = coordinates_example; # String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
my $orderBy = []; # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
my $sort = []; # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
my $limit = 8.14; # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
my $page = 8.14; # BigDecimal | aginate through results.
Default value: 1
my $completeness = 8.14; # BigDecimal | Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1)
my $inletHeight = 8.14; # BigDecimal | Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12)

eval { 
    my $result = $api_instance->locations(apiecoKey => $apiecoKey, cuty => $cuty, country => $country, location => $location, parameter => $parameter, hasGeo => $hasGeo, coordinates => $coordinates, orderBy => $orderBy, sort => $sort, limit => $limit, page => $page, completeness => $completeness, inletHeight => $inletHeight);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LocationsApi->locations: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LocationsApi()
apiecoKey = apiecoKey_example # String | 
cuty = cuty_example # String | Limit results by a certain city. (optional)
country = country_example # String | Limit results by a certain country. (optional)
location = location_example # String | Limit results by a certain location. (optional)
parameter = parameter_example # String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional)
hasGeo = true # Boolean | Filter out items that have or do not have geographic information. (optional)
coordinates = coordinates_example # String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional)
orderBy =  # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional)
sort =  # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
limit = 8.14 # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional)
page = 8.14 # BigDecimal | aginate through results.
Default value: 1 (optional)
completeness = 8.14 # BigDecimal | Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1) (optional)
inletHeight = 8.14 # BigDecimal | Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12) (optional)

try: 
    api_response = api_instance.locations(apiecoKey, cuty=cuty, country=country, location=location, parameter=parameter, hasGeo=hasGeo, coordinates=coordinates, orderBy=orderBy, sort=sort, limit=limit, page=page, completeness=completeness, inletHeight=inletHeight)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LocationsApi->locations: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
cuty
String
Limit results by a certain city.
country
String
Limit results by a certain country.
location
String
Limit results by a certain location.
parameter
String
Limit results by a certain parametr. Allowed values: pm25, pm10, so2, no2, o3, co, bc
has_geo
Boolean
Filter out items that have or do not have geographic information.
coordinates
String
Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
order_by
array[String]
Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city). Default value: location
sort
array[String]
Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc). Default value: asc
limit
BigDecimal
Change the number of results returned, max is 10000. Default value: 100
page
BigDecimal
aginate through results. Default value: 1
completeness
BigDecimal
Filter by metadata completeness. Has to be a range with a start and end bewtween 0 and 1. (ex: completeness[]=0.9&completeness[]=1)
inletHeight
BigDecimal
Filter by metadata property "inlet height". Has to be a range with a start and end. (ex: inletHeight[]=1&inletHeight[]=12)

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


locationsById

Provides data on a specific location


/locations/{id}

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/locations/{id}?metadata="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LocationsApi;

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

public class LocationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        LocationsApi apiInstance = new LocationsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String id = id_example; // String | location ID
        Boolean metadata = true; // Boolean | Whether or not to send the location metadata.
        try {
            inline_response_200_4 result = apiInstance.locationsById(apiecoKey, id, metadata);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationsApi#locationsById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LocationsApi;

public class LocationsApiExample {

    public static void main(String[] args) {
        LocationsApi apiInstance = new LocationsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String id = id_example; // String | location ID
        Boolean metadata = true; // Boolean | Whether or not to send the location metadata.
        try {
            inline_response_200_4 result = apiInstance.locationsById(apiecoKey, id, metadata);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationsApi#locationsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *id = id_example; // location ID
Boolean *metadata = true; // Whether or not to send the location metadata. (optional)

LocationsApi *apiInstance = [[LocationsApi alloc] init];

[apiInstance locationsByIdWith:apiecoKey
    id:id
    metadata:metadata
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.LocationsApi()

var apiecoKey = apiecoKey_example; // {String} 

var id = id_example; // {String} location ID

var opts = { 
  'metadata': true // {Boolean} Whether or not to send the location metadata.
};

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

namespace Example
{
    public class locationsByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new LocationsApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var id = id_example;  // String | location ID
            var metadata = true;  // Boolean | Whether or not to send the location metadata. (optional) 

            try
            {
                inline_response_200_4 result = apiInstance.locationsById(apiecoKey, id, metadata);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LocationsApi.locationsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\LocationsApi();
$apiecoKey = apiecoKey_example; // String | 
$id = id_example; // String | location ID
$metadata = true; // Boolean | Whether or not to send the location metadata.

try {
    $result = $api_instance->locationsById($apiecoKey, $id, $metadata);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LocationsApi->locationsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LocationsApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LocationsApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $id = id_example; # String | location ID
my $metadata = true; # Boolean | Whether or not to send the location metadata.

eval { 
    my $result = $api_instance->locationsById(apiecoKey => $apiecoKey, id => $id, metadata => $metadata);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LocationsApi->locationsById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LocationsApi()
apiecoKey = apiecoKey_example # String | 
id = id_example # String | location ID
metadata = true # Boolean | Whether or not to send the location metadata. (optional)

try: 
    api_response = api_instance.locations_by_id(apiecoKey, id, metadata=metadata)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LocationsApi->locationsById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
location ID
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
metadata
Boolean
Whether or not to send the location metadata.

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


locationsMetadata

Allows the user to update the metadata for a given location.


/locations

Usage and SDK Samples

curl -X PUT -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/locations"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LocationsApi;

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

public class LocationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        LocationsApi apiInstance = new LocationsApi();
        String apiecoKey = apiecoKey_example; // String | 
        try {
            apiInstance.locationsMetadata(apiecoKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationsApi#locationsMetadata");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LocationsApi;

public class LocationsApiExample {

    public static void main(String[] args) {
        LocationsApi apiInstance = new LocationsApi();
        String apiecoKey = apiecoKey_example; // String | 
        try {
            apiInstance.locationsMetadata(apiecoKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling LocationsApi#locationsMetadata");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 

LocationsApi *apiInstance = [[LocationsApi alloc] init];

[apiInstance locationsMetadataWith:apiecoKey
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.LocationsApi()

var apiecoKey = apiecoKey_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.locationsMetadata(apiecoKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class locationsMetadataExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new LocationsApi();
            var apiecoKey = apiecoKey_example;  // String | 

            try
            {
                apiInstance.locationsMetadata(apiecoKey);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LocationsApi.locationsMetadata: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\LocationsApi();
$apiecoKey = apiecoKey_example; // String | 

try {
    $api_instance->locationsMetadata($apiecoKey);
} catch (Exception $e) {
    echo 'Exception when calling LocationsApi->locationsMetadata: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LocationsApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::LocationsApi->new();
my $apiecoKey = apiecoKey_example; # String | 

eval { 
    $api_instance->locationsMetadata(apiecoKey => $apiecoKey);
};
if ($@) {
    warn "Exception when calling LocationsApi->locationsMetadata: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LocationsApi()
apiecoKey = apiecoKey_example # String | 

try: 
    api_instance.locations_metadata(apiecoKey)
except ApiException as e:
    print("Exception when calling LocationsApi->locationsMetadata: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


Measurements

measurements

Provides data about individual measurements


/measurements

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/measurements?cuty=&country=&location=¶meter=&has_geo=&coordinates=&order_by=&sort=&limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MeasurementsApi;

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

public class MeasurementsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        MeasurementsApi apiInstance = new MeasurementsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String cuty = cuty_example; // String | Limit results by a certain city.
        String country = country_example; // String | Limit results by a certain country.
        String location = location_example; // String | Limit results by a certain location.
        String parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
        Boolean hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
        String coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_5 result = apiInstance.measurements(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MeasurementsApi#measurements");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MeasurementsApi;

public class MeasurementsApiExample {

    public static void main(String[] args) {
        MeasurementsApi apiInstance = new MeasurementsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String cuty = cuty_example; // String | Limit results by a certain city.
        String country = country_example; // String | Limit results by a certain country.
        String location = location_example; // String | Limit results by a certain location.
        String parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
        Boolean hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
        String coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_5 result = apiInstance.measurements(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MeasurementsApi#measurements");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *cuty = cuty_example; // Limit results by a certain city. (optional)
String *country = country_example; // Limit results by a certain country. (optional)
String *location = location_example; // Limit results by a certain location. (optional)
String *parameter = parameter_example; // Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional)
Boolean *hasGeo = true; // Filter out items that have or do not have geographic information. (optional)
String *coordinates = coordinates_example; // Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional)
array[String] *orderBy = ; // Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional)
array[String] *sort = ; // Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
BigDecimal *limit = 8.14; // Change the number of results returned, max is 10000.
Default value: 100 (optional)
BigDecimal *page = 8.14; // aginate through results.
Default value: 1 (optional)

MeasurementsApi *apiInstance = [[MeasurementsApi alloc] init];

[apiInstance measurementsWith:apiecoKey
    cuty:cuty
    country:country
    location:location
    parameter:parameter
    hasGeo:hasGeo
    coordinates:coordinates
    orderBy:orderBy
    sort:sort
    limit:limit
    page:page
              completionHandler: ^(inline_response_200_5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.MeasurementsApi()

var apiecoKey = apiecoKey_example; // {String} 

var opts = { 
  'cuty': cuty_example, // {String} Limit results by a certain city.
  'country': country_example, // {String} Limit results by a certain country.
  'location': location_example, // {String} Limit results by a certain location.
  'parameter': parameter_example, // {String} Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
  'hasGeo': true, // {Boolean} Filter out items that have or do not have geographic information.
  'coordinates': coordinates_example, // {String} Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
  'orderBy': , // {array[String]} Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
  'sort': , // {array[String]} Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
  'limit': 8.14, // {BigDecimal} Change the number of results returned, max is 10000.
Default value: 100
  'page': 8.14 // {BigDecimal} aginate through results.
Default value: 1
};

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

namespace Example
{
    public class measurementsExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new MeasurementsApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var cuty = cuty_example;  // String | Limit results by a certain city. (optional) 
            var country = country_example;  // String | Limit results by a certain country. (optional) 
            var location = location_example;  // String | Limit results by a certain location. (optional) 
            var parameter = parameter_example;  // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional) 
            var hasGeo = true;  // Boolean | Filter out items that have or do not have geographic information. (optional) 
            var coordinates = coordinates_example;  // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional) 
            var orderBy = new array[String](); // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional) 
            var sort = new array[String](); // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional) 
            var limit = 8.14;  // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional) 
            var page = 8.14;  // BigDecimal | aginate through results.
Default value: 1 (optional) 

            try
            {
                inline_response_200_5 result = apiInstance.measurements(apiecoKey, cuty, country, location, parameter, hasGeo, coordinates, orderBy, sort, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MeasurementsApi.measurements: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\MeasurementsApi();
$apiecoKey = apiecoKey_example; // String | 
$cuty = cuty_example; // String | Limit results by a certain city.
$country = country_example; // String | Limit results by a certain country.
$location = location_example; // String | Limit results by a certain location.
$parameter = parameter_example; // String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
$hasGeo = true; // Boolean | Filter out items that have or do not have geographic information.
$coordinates = coordinates_example; // String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
$orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
$sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
$limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
$page = 8.14; // BigDecimal | aginate through results.
Default value: 1

try {
    $result = $api_instance->measurements($apiecoKey, $cuty, $country, $location, $parameter, $hasGeo, $coordinates, $orderBy, $sort, $limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MeasurementsApi->measurements: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MeasurementsApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::MeasurementsApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $cuty = cuty_example; # String | Limit results by a certain city.
my $country = country_example; # String | Limit results by a certain country.
my $location = location_example; # String | Limit results by a certain location.
my $parameter = parameter_example; # String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc
my $hasGeo = true; # Boolean | Filter out items that have or do not have geographic information.
my $coordinates = coordinates_example; # String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
my $orderBy = []; # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location
my $sort = []; # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
my $limit = 8.14; # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
my $page = 8.14; # BigDecimal | aginate through results.
Default value: 1

eval { 
    my $result = $api_instance->measurements(apiecoKey => $apiecoKey, cuty => $cuty, country => $country, location => $location, parameter => $parameter, hasGeo => $hasGeo, coordinates => $coordinates, orderBy => $orderBy, sort => $sort, limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MeasurementsApi->measurements: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MeasurementsApi()
apiecoKey = apiecoKey_example # String | 
cuty = cuty_example # String | Limit results by a certain city. (optional)
country = country_example # String | Limit results by a certain country. (optional)
location = location_example # String | Limit results by a certain location. (optional)
parameter = parameter_example # String | Limit results by a certain parametr.
Allowed values: pm25, pm10, so2, no2, o3, co, bc (optional)
hasGeo = true # Boolean | Filter out items that have or do not have geographic information. (optional)
coordinates = coordinates_example # String | Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property. (optional)
orderBy =  # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city).
Default value: location (optional)
sort =  # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
limit = 8.14 # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional)
page = 8.14 # BigDecimal | aginate through results.
Default value: 1 (optional)

try: 
    api_response = api_instance.measurements(apiecoKey, cuty=cuty, country=country, location=location, parameter=parameter, hasGeo=hasGeo, coordinates=coordinates, orderBy=orderBy, sort=sort, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MeasurementsApi->measurements: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
cuty
String
Limit results by a certain city.
country
String
Limit results by a certain country.
location
String
Limit results by a certain location.
parameter
String
Limit results by a certain parametr. Allowed values: pm25, pm10, so2, no2, o3, co, bc
has_geo
Boolean
Filter out items that have or do not have geographic information.
coordinates
String
Center point (lat, lon) used to get measurements within a certain area. (ex. coordinates=40.23,34.17) Will add distance property.
order_by
array[String]
Order by one or more fields (ex. order_by=country or order_by[]=country&order_by[]=city). Default value: location
sort
array[String]
Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc). Default value: asc
limit
BigDecimal
Change the number of results returned, max is 10000. Default value: 100
page
BigDecimal
aginate through results. Default value: 1

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


Parameters

parameters

Provides a simple listing of parameters within the platform.


/parameters

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/parameters?order_by=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ParametersApi;

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

public class ParametersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        ParametersApi apiInstance = new ParametersApi();
        String apiecoKey = apiecoKey_example; // String | 
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id).
Default value: name
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        try {
            inline_response_200_6 result = apiInstance.parameters(apiecoKey, orderBy, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ParametersApi#parameters");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ParametersApi;

public class ParametersApiExample {

    public static void main(String[] args) {
        ParametersApi apiInstance = new ParametersApi();
        String apiecoKey = apiecoKey_example; // String | 
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id).
Default value: name
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        try {
            inline_response_200_6 result = apiInstance.parameters(apiecoKey, orderBy, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ParametersApi#parameters");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
array[String] *orderBy = ; // Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id).
Default value: name (optional)
array[String] *sort = ; // Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)

ParametersApi *apiInstance = [[ParametersApi alloc] init];

[apiInstance parametersWith:apiecoKey
    orderBy:orderBy
    sort:sort
              completionHandler: ^(inline_response_200_6 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.ParametersApi()

var apiecoKey = apiecoKey_example; // {String} 

var opts = { 
  'orderBy': , // {array[String]} Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id).
Default value: name
  'sort':  // {array[String]} Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
};

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

namespace Example
{
    public class parametersExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new ParametersApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var orderBy = new array[String](); // array[String] | Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id).
Default value: name (optional) 
            var sort = new array[String](); // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional) 

            try
            {
                inline_response_200_6 result = apiInstance.parameters(apiecoKey, orderBy, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ParametersApi.parameters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\ParametersApi();
$apiecoKey = apiecoKey_example; // String | 
$orderBy = ; // array[String] | Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id).
Default value: name
$sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc

try {
    $result = $api_instance->parameters($apiecoKey, $orderBy, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ParametersApi->parameters: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ParametersApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ParametersApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $orderBy = []; # array[String] | Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id).
Default value: name
my $sort = []; # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc

eval { 
    my $result = $api_instance->parameters(apiecoKey => $apiecoKey, orderBy => $orderBy, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ParametersApi->parameters: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ParametersApi()
apiecoKey = apiecoKey_example # String | 
orderBy =  # array[String] | Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id).
Default value: name (optional)
sort =  # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)

try: 
    api_response = api_instance.parameters(apiecoKey, orderBy=orderBy, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ParametersApi->parameters: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
order_by
array[String]
Order by one or more fields (ex. order_by=name or order_by[]=preferredUnit&order_by[]=id). Default value: name
sort
array[String]
Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc). Default value: asc

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input


Sources

sources

Provides a simple listing of cities within the platform.


/sources

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/openaq/sources?order_by=&sort=&limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SourcesApi;

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

public class SourcesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        SourcesApi apiInstance = new SourcesApi();
        String apiecoKey = apiecoKey_example; // String | 
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country).
Default value: name
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_7 result = apiInstance.sources(apiecoKey, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SourcesApi#sources");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SourcesApi;

public class SourcesApiExample {

    public static void main(String[] args) {
        SourcesApi apiInstance = new SourcesApi();
        String apiecoKey = apiecoKey_example; // String | 
        array[String] orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country).
Default value: name
        array[String] sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
        BigDecimal limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
        BigDecimal page = 8.14; // BigDecimal | aginate through results.
Default value: 1
        try {
            inline_response_200_7 result = apiInstance.sources(apiecoKey, orderBy, sort, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SourcesApi#sources");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
array[String] *orderBy = ; // Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country).
Default value: name (optional)
array[String] *sort = ; // Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
BigDecimal *limit = 8.14; // Change the number of results returned, max is 10000.
Default value: 100 (optional)
BigDecimal *page = 8.14; // aginate through results.
Default value: 1 (optional)

SourcesApi *apiInstance = [[SourcesApi alloc] init];

[apiInstance sourcesWith:apiecoKey
    orderBy:orderBy
    sort:sort
    limit:limit
    page:page
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var OpenAqPlatformApi = require('open_aq_platform_api');
var defaultClient = OpenAqPlatformApi.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new OpenAqPlatformApi.SourcesApi()

var apiecoKey = apiecoKey_example; // {String} 

var opts = { 
  'orderBy': , // {array[String]} Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country).
Default value: name
  'sort': , // {array[String]} Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
  'limit': 8.14, // {BigDecimal} Change the number of results returned, max is 10000.
Default value: 100
  'page': 8.14 // {BigDecimal} aginate through results.
Default value: 1
};

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

namespace Example
{
    public class sourcesExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new SourcesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var orderBy = new array[String](); // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country).
Default value: name (optional) 
            var sort = new array[String](); // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional) 
            var limit = 8.14;  // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional) 
            var page = 8.14;  // BigDecimal | aginate through results.
Default value: 1 (optional) 

            try
            {
                inline_response_200_7 result = apiInstance.sources(apiecoKey, orderBy, sort, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SourcesApi.sources: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\SourcesApi();
$apiecoKey = apiecoKey_example; // String | 
$orderBy = ; // array[String] | Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country).
Default value: name
$sort = ; // array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
$limit = 8.14; // BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
$page = 8.14; // BigDecimal | aginate through results.
Default value: 1

try {
    $result = $api_instance->sources($apiecoKey, $orderBy, $sort, $limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SourcesApi->sources: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SourcesApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SourcesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $orderBy = []; # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country).
Default value: name
my $sort = []; # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc
my $limit = 8.14; # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100
my $page = 8.14; # BigDecimal | aginate through results.
Default value: 1

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

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SourcesApi()
apiecoKey = apiecoKey_example # String | 
orderBy =  # array[String] | Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country).
Default value: name (optional)
sort =  # array[String] | Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc).
Default value: asc (optional)
limit = 8.14 # BigDecimal | Change the number of results returned, max is 10000.
Default value: 100 (optional)
page = 8.14 # BigDecimal | aginate through results.
Default value: 1 (optional)

try: 
    api_response = api_instance.sources(apiecoKey, orderBy=orderBy, sort=sort, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SourcesApi->sources: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
order_by
array[String]
Order by one or more fields (ex. order_by=country or order_by[]=active&order_by[]=country). Default value: name
sort
array[String]
Define sort order for one or more fields (ex. sort=desc or sort[]=asc&sort[]=desc). Default value: asc
limit
BigDecimal
Change the number of results returned, max is 10000. Default value: 100
page
BigDecimal
aginate through results. Default value: 1

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 403 - Invalid input