locationGet
Get a Location resource based on the resource ID, or search by name, address, type, partof, organization or operational status code.
/location/
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json,application/xml"\
"//location/?_id=&name=&address=&address-state=&address-city=&address-postalcode=&type=&partof=&organization=&operationalstatus="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LocationApi;
import java.io.File;
import java.util.*;
public class LocationApiExample {
public static void main(String[] args) {
LocationApi apiInstance = new LocationApi();
String id = id_example; // String | Resource ID.
String name = name_example; // String | Location name.
String address = address_example; // String | A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text.
String addressState = addressState_example; // String | A state specified in an address.
String addressCity = addressCity_example; // String | A city specified in an address.
String addressPostalcode = addressPostalcode_example; // String | A postal code specified in an address.
String type = type_example; // String | A code for the type of location.
String partof = partof_example; // String | A location of which this location is a part.
String organization = organization_example; // String | Searches for locations that are managed by the provided organization.
String operationalstatus = operationalstatus_example; // String | Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping).
try {
Location result = apiInstance.locationGet(id, name, address, addressState, addressCity, addressPostalcode, type, partof, organization, operationalstatus);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LocationApi#locationGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.LocationApi;
public class LocationApiExample {
public static void main(String[] args) {
LocationApi apiInstance = new LocationApi();
String id = id_example; // String | Resource ID.
String name = name_example; // String | Location name.
String address = address_example; // String | A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text.
String addressState = addressState_example; // String | A state specified in an address.
String addressCity = addressCity_example; // String | A city specified in an address.
String addressPostalcode = addressPostalcode_example; // String | A postal code specified in an address.
String type = type_example; // String | A code for the type of location.
String partof = partof_example; // String | A location of which this location is a part.
String organization = organization_example; // String | Searches for locations that are managed by the provided organization.
String operationalstatus = operationalstatus_example; // String | Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping).
try {
Location result = apiInstance.locationGet(id, name, address, addressState, addressCity, addressPostalcode, type, partof, organization, operationalstatus);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LocationApi#locationGet");
e.printStackTrace();
}
}
}
String *id = id_example; // Resource ID. (optional)
String *name = name_example; // Location name. (optional)
String *address = address_example; // A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text. (optional)
String *addressState = addressState_example; // A state specified in an address. (optional)
String *addressCity = addressCity_example; // A city specified in an address. (optional)
String *addressPostalcode = addressPostalcode_example; // A postal code specified in an address. (optional)
String *type = type_example; // A code for the type of location. (optional)
String *partof = partof_example; // A location of which this location is a part. (optional)
String *organization = organization_example; // Searches for locations that are managed by the provided organization. (optional)
String *operationalstatus = operationalstatus_example; // Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping). (optional)
LocationApi *apiInstance = [[LocationApi alloc] init];
[apiInstance locationGetWith:id
name:name
address:address
addressState:addressState
addressCity:addressCity
addressPostalcode:addressPostalcode
type:type
partof:partof
organization:organization
operationalstatus:operationalstatus
completionHandler: ^(Location output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Location = require('location');
var api = new Location.LocationApi()
var opts = {
'id': id_example, // {{String}} Resource ID.
'name': name_example, // {{String}} Location name.
'address': address_example, // {{String}} A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text.
'addressState': addressState_example, // {{String}} A state specified in an address.
'addressCity': addressCity_example, // {{String}} A city specified in an address.
'addressPostalcode': addressPostalcode_example, // {{String}} A postal code specified in an address.
'type': type_example, // {{String}} A code for the type of location.
'partof': partof_example, // {{String}} A location of which this location is a part.
'organization': organization_example, // {{String}} Searches for locations that are managed by the provided organization.
'operationalstatus': operationalstatus_example // {{String}} Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping).
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.locationGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class locationGetExample
{
public void main()
{
var apiInstance = new LocationApi();
var id = id_example; // String | Resource ID. (optional)
var name = name_example; // String | Location name. (optional)
var address = address_example; // String | A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text. (optional)
var addressState = addressState_example; // String | A state specified in an address. (optional)
var addressCity = addressCity_example; // String | A city specified in an address. (optional)
var addressPostalcode = addressPostalcode_example; // String | A postal code specified in an address. (optional)
var type = type_example; // String | A code for the type of location. (optional)
var partof = partof_example; // String | A location of which this location is a part. (optional)
var organization = organization_example; // String | Searches for locations that are managed by the provided organization. (optional)
var operationalstatus = operationalstatus_example; // String | Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping). (optional)
try
{
Location result = apiInstance.locationGet(id, name, address, addressState, addressCity, addressPostalcode, type, partof, organization, operationalstatus);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling LocationApi.locationGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiLocationApi();
$id = id_example; // String | Resource ID.
$name = name_example; // String | Location name.
$address = address_example; // String | A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text.
$addressState = addressState_example; // String | A state specified in an address.
$addressCity = addressCity_example; // String | A city specified in an address.
$addressPostalcode = addressPostalcode_example; // String | A postal code specified in an address.
$type = type_example; // String | A code for the type of location.
$partof = partof_example; // String | A location of which this location is a part.
$organization = organization_example; // String | Searches for locations that are managed by the provided organization.
$operationalstatus = operationalstatus_example; // String | Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping).
try {
$result = $api_instance->locationGet($id, $name, $address, $addressState, $addressCity, $addressPostalcode, $type, $partof, $organization, $operationalstatus);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LocationApi->locationGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LocationApi;
my $api_instance = WWW::SwaggerClient::LocationApi->new();
my $id = id_example; # String | Resource ID.
my $name = name_example; # String | Location name.
my $address = address_example; # String | A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text.
my $addressState = addressState_example; # String | A state specified in an address.
my $addressCity = addressCity_example; # String | A city specified in an address.
my $addressPostalcode = addressPostalcode_example; # String | A postal code specified in an address.
my $type = type_example; # String | A code for the type of location.
my $partof = partof_example; # String | A location of which this location is a part.
my $organization = organization_example; # String | Searches for locations that are managed by the provided organization.
my $operationalstatus = operationalstatus_example; # String | Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping).
eval {
my $result = $api_instance->locationGet(id => $id, name => $name, address => $address, addressState => $addressState, addressCity => $addressCity, addressPostalcode => $addressPostalcode, type => $type, partof => $partof, organization => $organization, operationalstatus => $operationalstatus);
print Dumper($result);
};
if ($@) {
warn "Exception when calling LocationApi->locationGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.LocationApi()
id = id_example # String | Resource ID. (optional)
name = name_example # String | Location name. (optional)
address = address_example # String | A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text. (optional)
addressState = addressState_example # String | A state specified in an address. (optional)
addressCity = addressCity_example # String | A city specified in an address. (optional)
addressPostalcode = addressPostalcode_example # String | A postal code specified in an address. (optional)
type = type_example # String | A code for the type of location. (optional)
partof = partof_example # String | A location of which this location is a part. (optional)
organization = organization_example # String | Searches for locations that are managed by the provided organization. (optional)
operationalstatus = operationalstatus_example # String | Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping). (optional)
try:
api_response = api_instance.location_get(id=id, name=name, address=address, addressState=addressState, addressCity=addressCity, addressPostalcode=addressPostalcode, type=type, partof=partof, organization=organization, operationalstatus=operationalstatus)
pprint(api_response)
except ApiException as e:
print("Exception when calling LocationApi->locationGet: %s\n" % e)
Parameters
Query parameters
| Name | Description |
|---|---|
| _id |
String
Resource ID.
|
| name |
String
Location name.
|
| address |
String
A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text.
|
| address-state |
String
A state specified in an address.
|
| address-city |
String
A city specified in an address.
|
| address-postalcode |
String
A postal code specified in an address.
|
| type |
String
A code for the type of location.
|
| partof |
String
A location of which this location is a part.
|
| organization |
String
Searches for locations that are managed by the provided organization.
|
| operationalstatus |
String
Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping).
|