Am i missing something? where do i find the ID’s for individual requisitions? Is there a list somewhere? Am i able to pull all of the available requisitions as a single JSON? Im scouring through the documentation but all i see is how to call a requisition, and no examples of actual requisition ID’s. I can entirely be just missing something here so if this is the case go easy on me, but ive been looking for the past hour and cant find a single requisition ID to call! I just want a JSON of all of the requisitions (not req packs) available.
sorry if im just derping out
i mean obviously they are pulling all of the requisitions when you look at your spartan profile showing you what you have unlocked and have not, so i know its possible!
well i think i figured it out, looking at other calls, like vehicles, you use
https://www.haloapi.com/metadata/{title}/metadata/vehicles
to get them all, so i assume for requisitions its
https://www.haloapi.com/metadata/{title}/metadata/requisitions
now the issue im running into is a 401 not authorized . at first it was the cross domain issue where it wouldnt allow it so i added ‘dataType: jsonp’ because i actually want a json object. i added my dev id and still running into a not authorized issue. sad sad panda.
<!DOCTYPE html>
<html>
<head>
<title>JSSample</title>
<script src=“http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js”></script>
</head>
<body>
<script type=“text/javascript”>
$(function() {
var params = {
// Request parameters
};
$.ajax({
url: “https://www.haloapi.com/metadata/h5/metadata/vehicles”,
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader(“Ocp-Apim-Subscription-Key”,“myApiTokenNumber”);
},
type: “GET”,
// Request body
data: “{body}”,
dataType: “JSONP”,
})
.done(function(data) {
alert(“success”);
})
.fail(function() {
alert(“error”);
});
});
</script>
</body>
</html>
I got around the 401 error with help from this thread
https://www.halowaypoint.com/en-us/forums/01b3ca58f06c4bd4ad074d8794d2cf86/topics/anyone-have-a-working-javascript-jquery-example/e9bdc607-2cfc-42ca-a7f5-88c9673cd41f/posts?page=1#post4
however, it seems that you are not able to pull all of the requisitions and have to pull them one by one. (for now at least). I can pull json of all the vehicles, skulls ect…but putting in
https://www.haloapi.com/metadata/{title}/metadata/requisitions
as the endpoint results in a 404. you have to use
https://www.haloapi.com/metadata/{title}/metadata/requisitions/{id}
and call each individually.