Get Animals by Location ID
1 min
code examples curl request get \\ \ url 'https //integrations prod vas com/api/locations/com vas dairies id/{location id}/animals?page=1\&pagesize=10' \\ \ header 'accept application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //integrations prod vas com/api/locations/com vas dairies id/{location id}/animals?page=1\&pagesize=10", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //integrations prod vas com/api/locations/com vas dairies id/{location id}/animals?page=1\&pagesize=10") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //integrations prod vas com/api/locations/com vas dairies id/{location id}/animals?page=1\&pagesize=10" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // a list of animal records for the specified location { "view" { "pagesize" 0, "currentpage" 0, "totalpages" 0, "totalitems" 0 }, "member" \[ { "meta" { "created" "", "modified" "" }, "animal" { "identifier" { "id" "", "scheme" "" }, "alternativeidentifiers" \[ { "id" "", "scheme" "" } ] }, "location" { "id" "", "scheme" "" }, "animaldetail" { "specie" "", "gender" "", "birthdate" "", "primarybreed" { "id" "", "scheme" "" }, "managementtag" "", "name" "", "productionpurpose" "", "status" "", "reproductionstatus" "", "lactationstatus" "", "permanentnote" "", "bloodserumlevel" "", "currentmeatwithdrawaldate" "", "currentmilkwithdrawaldate" "", "previousmanagementnumber" 0, "offspring" \[ { "identifier" { "id" "", "scheme" "" }, "recentoffspring" 0 } ], "parentage" \[ { "parentof" { "id" "", "scheme" "" }, "maternalgrandparentof" { "id" "", "scheme" "" }, "identifier" { "id" "", "scheme" "" }, "alternativeidentifiers" \[ { "id" "", "scheme" "" } ], "gender" "", "relation" "", "studcode" "", "sirebreed" "", "dambreed" "" } ], "permanentstring" "", "istwin" false, "lactation" "" } } ] }// api errors and http status code details
Have a question?
Our knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.