findCode
find codes or options by id, e.g. GENDER (male, female)
/rest/v1/co/code/{codeHdrId}
Usage and SDK Samples
curl -X GET "https://trial-advancingfreedom.azurewebsites.net/rest/v1/co/code/{codeHdrId}?codeGrp=&orderBySeq=&desc=&locale="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CodeApi;
import java.io.File;
import java.util.*;
public class CodeApiExample {
public static void main(String[] args) {
CodeApi apiInstance = new CodeApi();
String codeHdrId = codeHdrId_example; // String | id of the code list, e.g. GENDER
String codeGrp = codeGrp_example; // String | specific group of the code
Boolean orderBySeq = true; // Boolean | is order/sort by sequence
Boolean desc = true; // Boolean | is descending order
String locale = locale_example; // String | locale
try {
array[CodeDescDisplay] result = apiInstance.findCode(codeHdrId, codeGrp, orderBySeq, desc, locale);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CodeApi#findCode");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CodeApi;
public class CodeApiExample {
public static void main(String[] args) {
CodeApi apiInstance = new CodeApi();
String codeHdrId = codeHdrId_example; // String | id of the code list, e.g. GENDER
String codeGrp = codeGrp_example; // String | specific group of the code
Boolean orderBySeq = true; // Boolean | is order/sort by sequence
Boolean desc = true; // Boolean | is descending order
String locale = locale_example; // String | locale
try {
array[CodeDescDisplay] result = apiInstance.findCode(codeHdrId, codeGrp, orderBySeq, desc, locale);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CodeApi#findCode");
e.printStackTrace();
}
}
}
String *codeHdrId = codeHdrId_example; // id of the code list, e.g. GENDER
String *codeGrp = codeGrp_example; // specific group of the code (optional)
Boolean *orderBySeq = true; // is order/sort by sequence (optional)
Boolean *desc = true; // is descending order (optional)
String *locale = locale_example; // locale (optional)
CodeApi *apiInstance = [[CodeApi alloc] init];
// find codes or options by id, e.g. GENDER (male, female)
[apiInstance findCodeWith:codeHdrId
codeGrp:codeGrp
orderBySeq:orderBySeq
desc:desc
locale:locale
completionHandler: ^(array[CodeDescDisplay] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ApiDocumentation = require('api_documentation');
var api = new ApiDocumentation.CodeApi()
var codeHdrId = codeHdrId_example; // {String} id of the code list, e.g. GENDER
var opts = {
'codeGrp': codeGrp_example, // {String} specific group of the code
'orderBySeq': true, // {Boolean} is order/sort by sequence
'desc': true, // {Boolean} is descending order
'locale': locale_example // {String} locale
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.findCode(codeHdrId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class findCodeExample
{
public void main()
{
var apiInstance = new CodeApi();
var codeHdrId = codeHdrId_example; // String | id of the code list, e.g. GENDER
var codeGrp = codeGrp_example; // String | specific group of the code (optional)
var orderBySeq = true; // Boolean | is order/sort by sequence (optional)
var desc = true; // Boolean | is descending order (optional)
var locale = locale_example; // String | locale (optional)
try
{
// find codes or options by id, e.g. GENDER (male, female)
array[CodeDescDisplay] result = apiInstance.findCode(codeHdrId, codeGrp, orderBySeq, desc, locale);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CodeApi.findCode: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\CodeApi();
$codeHdrId = codeHdrId_example; // String | id of the code list, e.g. GENDER
$codeGrp = codeGrp_example; // String | specific group of the code
$orderBySeq = true; // Boolean | is order/sort by sequence
$desc = true; // Boolean | is descending order
$locale = locale_example; // String | locale
try {
$result = $api_instance->findCode($codeHdrId, $codeGrp, $orderBySeq, $desc, $locale);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CodeApi->findCode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CodeApi;
my $api_instance = WWW::SwaggerClient::CodeApi->new();
my $codeHdrId = codeHdrId_example; # String | id of the code list, e.g. GENDER
my $codeGrp = codeGrp_example; # String | specific group of the code
my $orderBySeq = true; # Boolean | is order/sort by sequence
my $desc = true; # Boolean | is descending order
my $locale = locale_example; # String | locale
eval {
my $result = $api_instance->findCode(codeHdrId => $codeHdrId, codeGrp => $codeGrp, orderBySeq => $orderBySeq, desc => $desc, locale => $locale);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CodeApi->findCode: $@\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.CodeApi()
codeHdrId = codeHdrId_example # String | id of the code list, e.g. GENDER
codeGrp = codeGrp_example # String | specific group of the code (optional)
orderBySeq = true # Boolean | is order/sort by sequence (optional)
desc = true # Boolean | is descending order (optional)
locale = locale_example # String | locale (optional)
try:
# find codes or options by id, e.g. GENDER (male, female)
api_response = api_instance.find_code(codeHdrId, codeGrp=codeGrp, orderBySeq=orderBySeq, desc=desc, locale=locale)
pprint(api_response)
except ApiException as e:
print("Exception when calling CodeApi->findCode: %s\n" % e)
Parameters
Name | Description |
---|---|
codeHdrId* |
String
id of the code list, e.g. GENDER
Required
|
Name | Description |
---|---|
codeGrp |
String
specific group of the code
|
orderBySeq |
Boolean
is order/sort by sequence
|
desc |
Boolean
is descending order
|
locale |
String
locale
|