All URIs are relative to https://api.nedap-bi.com
Method | HTTP request | Description |
---|---|---|
animalById | GET /v1/animals/{id} | Get animal |
animalByUuid | GET /v1/animals/with_uuid/{uuid} | Get an animal by UUID |
animalHistoricLocation | GET /v1/animals/{id}/locations | Historic location information of an animal |
animals | GET /v1/animals | Get all animals |
createAnimal | POST /v1/animals | Create an animal |
deleteAnimal | DELETE /v1/animals/{id} | Delete an animal |
updateAnimal | PUT /v1/animals/{id} | Update an animal |
\Swagger\Client\Model\Animal animalById($id)
Get animal
Get animal
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\AnimalsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$id = 56; // int | The animal id
try {
$result = $apiInstance->animalById($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AnimalsApi->animalById: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The animal id |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Animal animalByUuid($uuid)
Get an animal by UUID
In systems using software version 5.38 an animal object contains a UUID. The UUID is the leading indicator to retrieve data from pig_performance_testing and weights. UUID’s are generated by Nedap.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\AnimalsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$uuid = "uuid_example"; // string | The animal UUID
try {
$result = $apiInstance->animalByUuid($uuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AnimalsApi->animalByUuid: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
uuid | string | The animal UUID |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\AnimalHistoricLocation animalHistoricLocation($id)
Historic location information of an animal
This endpoint will return all known locations that an animal has been in.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\AnimalsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$id = 56; // int | The animal id
try {
$result = $apiInstance->animalHistoricLocation($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AnimalsApi->animalHistoricLocation: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The animal id |
\Swagger\Client\Model\AnimalHistoricLocation
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Animal animals($life_number, $responder, $number)
Get all animals
Get all animals
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\AnimalsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$life_number = "life_number_example"; // string | Life number (maximum length 30 characters)
$responder = "responder_example"; // string | Unique responder number (numeric value presented as string, maximum length 15 characters)
$number = 56; // int | The user defined number of the animal (farm unique, maximum length 8 characters).
try {
$result = $apiInstance->animals($life_number, $responder, $number);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AnimalsApi->animals: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
life_number | string | Life number (maximum length 30 characters) | [optional] |
responder | string | Unique responder number (numeric value presented as string, maximum length 15 characters) | [optional] |
number | int | The user defined number of the animal (farm unique, maximum length 8 characters). | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Animal createAnimal($v1_animals)
Create an animal
Create an animal
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\AnimalsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$v1_animals = new \Swagger\Client\Model\PostV1Animals(); // \Swagger\Client\Model\PostV1Animals |
try {
$result = $apiInstance->createAnimal($v1_animals);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AnimalsApi->createAnimal: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
v1_animals | \Swagger\Client\Model\PostV1Animals |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteAnimal($id)
Delete an animal
Warning! Note that once an Animal is deleted, all the animal data including calendar items are lost and cannot be restored. The only exceptions are data from pig_performance_testing and weights, these can be retrieved after deleting an animal if the animal uuid is known.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\AnimalsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$id = 56; // int | The animal id
try {
$apiInstance->deleteAnimal($id);
} catch (Exception $e) {
echo 'Exception when calling AnimalsApi->deleteAnimal: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The animal id |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Animal updateAnimal($id, $number, $sex, $group_id, $name, $condition, $life_number, $responder1, $responder2, $responder3, $supply_datetime, $departure_datetime)
Update an animal
Update an animal
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\AnimalsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$id = 56; // int | The animal id to be updated.
$number = 56; // int | The user defined number of the animal (farm unique, maximum length 8 characters).
$sex = 56; // int | The sex of the animal. 1: Male, 2: Female
$group_id = 56; // int | The group id of which the animal belongs to
$name = "name_example"; // string | Name of the animal
$condition = 56; // int | Condition of the animal. 1: Very skinny, 2: Skinny, 3: Normal, 4: Fat, 5: Very fat
$life_number = "life_number_example"; // string | Life number (maximum length 30 characters)
$responder1 = "responder1_example"; // string | First unique responder number (numeric value presented as string, maximum length 15 characters)
$responder2 = "responder2_example"; // string | Second unique responder number (numeric value presented as string, maximum length 15 characters)
$responder3 = "responder3_example"; // string | Third unique responder number (numeric value presented as string, maximum length 15 characters)
$supply_datetime = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Supply date. Example: 2020-07-15T08:07:19Z
$departure_datetime = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Departure date. Example: 2020-07-15T08:07:19Z
try {
$result = $apiInstance->updateAnimal($id, $number, $sex, $group_id, $name, $condition, $life_number, $responder1, $responder2, $responder3, $supply_datetime, $departure_datetime);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AnimalsApi->updateAnimal: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The animal id to be updated. | |
number | int | The user defined number of the animal (farm unique, maximum length 8 characters). | |
sex | int | The sex of the animal. 1: Male, 2: Female | |
group_id | int | The group id of which the animal belongs to | [optional] |
name | string | Name of the animal | [optional] |
condition | int | Condition of the animal. 1: Very skinny, 2: Skinny, 3: Normal, 4: Fat, 5: Very fat | [optional] |
life_number | string | Life number (maximum length 30 characters) | [optional] |
responder1 | string | First unique responder number (numeric value presented as string, maximum length 15 characters) | [optional] |
responder2 | string | Second unique responder number (numeric value presented as string, maximum length 15 characters) | [optional] |
responder3 | string | Third unique responder number (numeric value presented as string, maximum length 15 characters) | [optional] |
supply_datetime | \DateTime | Supply date. Example: 2020-07-15T08:07:19Z | [optional] |
departure_datetime | \DateTime | Departure date. Example: 2020-07-15T08:07:19Z | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]