Fleet Telematics Custom Routes
up vote
0
down vote
favorite
I would like to apply a road restriction using Fleet Telematics API. But everytime I try to use example from the docs, I am getting 400 response. Is this because I am sending parameters incorrectly or it works only for paid plans? I am currently freemium.
HERE example says that overlay_spec
needs to be send as a JSON string parameter. Probably that's my issue. Can anyone help me construct proper curl command?
Here is what I am using now:
curl -X GET
'http://cre.api.here.com/2/overlays/upload.json?app_id=MY_APP_ID&app_code=MY_APP_CODE&map_name=OVERLAYNA&overlay_spec=%5B%0A%20%20%7B%20%22op%22%3A%22override%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10765%2C8.68774%5D%2C%5B50.10914%2C8.68771%5D%5D%2C%0A%20%20%22layer%22%3A%22LINK_ATTRIBUTE_FCN%22%2C%0A%20%20%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%220%22%7D%0A%20%20%7D%2C%0A%20%20%7B%20%22op%22%3A%22create%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%0A%20%20%22data%22%3A%7B%22NAMES%22%3A%22ENGBNDemo%20Road%22%7D%0A%20%20%7D%2C%0A%20%20%7B%20%22op%22%3A%22override%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%0A%20%20%22layer%22%3A%22TRUCK_RESTR_FCN%22%2C%0A%20%20%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%22truck%22%2C%20%22WEIGHT_RESTRICTION%22%3A%223300%22%7D%0A%20%20%7D%0A%5D'
here-api
add a comment |
up vote
0
down vote
favorite
I would like to apply a road restriction using Fleet Telematics API. But everytime I try to use example from the docs, I am getting 400 response. Is this because I am sending parameters incorrectly or it works only for paid plans? I am currently freemium.
HERE example says that overlay_spec
needs to be send as a JSON string parameter. Probably that's my issue. Can anyone help me construct proper curl command?
Here is what I am using now:
curl -X GET
'http://cre.api.here.com/2/overlays/upload.json?app_id=MY_APP_ID&app_code=MY_APP_CODE&map_name=OVERLAYNA&overlay_spec=%5B%0A%20%20%7B%20%22op%22%3A%22override%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10765%2C8.68774%5D%2C%5B50.10914%2C8.68771%5D%5D%2C%0A%20%20%22layer%22%3A%22LINK_ATTRIBUTE_FCN%22%2C%0A%20%20%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%220%22%7D%0A%20%20%7D%2C%0A%20%20%7B%20%22op%22%3A%22create%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%0A%20%20%22data%22%3A%7B%22NAMES%22%3A%22ENGBNDemo%20Road%22%7D%0A%20%20%7D%2C%0A%20%20%7B%20%22op%22%3A%22override%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%0A%20%20%22layer%22%3A%22TRUCK_RESTR_FCN%22%2C%0A%20%20%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%22truck%22%2C%20%22WEIGHT_RESTRICTION%22%3A%223300%22%7D%0A%20%20%7D%0A%5D'
here-api
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I would like to apply a road restriction using Fleet Telematics API. But everytime I try to use example from the docs, I am getting 400 response. Is this because I am sending parameters incorrectly or it works only for paid plans? I am currently freemium.
HERE example says that overlay_spec
needs to be send as a JSON string parameter. Probably that's my issue. Can anyone help me construct proper curl command?
Here is what I am using now:
curl -X GET
'http://cre.api.here.com/2/overlays/upload.json?app_id=MY_APP_ID&app_code=MY_APP_CODE&map_name=OVERLAYNA&overlay_spec=%5B%0A%20%20%7B%20%22op%22%3A%22override%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10765%2C8.68774%5D%2C%5B50.10914%2C8.68771%5D%5D%2C%0A%20%20%22layer%22%3A%22LINK_ATTRIBUTE_FCN%22%2C%0A%20%20%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%220%22%7D%0A%20%20%7D%2C%0A%20%20%7B%20%22op%22%3A%22create%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%0A%20%20%22data%22%3A%7B%22NAMES%22%3A%22ENGBNDemo%20Road%22%7D%0A%20%20%7D%2C%0A%20%20%7B%20%22op%22%3A%22override%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%0A%20%20%22layer%22%3A%22TRUCK_RESTR_FCN%22%2C%0A%20%20%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%22truck%22%2C%20%22WEIGHT_RESTRICTION%22%3A%223300%22%7D%0A%20%20%7D%0A%5D'
here-api
I would like to apply a road restriction using Fleet Telematics API. But everytime I try to use example from the docs, I am getting 400 response. Is this because I am sending parameters incorrectly or it works only for paid plans? I am currently freemium.
HERE example says that overlay_spec
needs to be send as a JSON string parameter. Probably that's my issue. Can anyone help me construct proper curl command?
Here is what I am using now:
curl -X GET
'http://cre.api.here.com/2/overlays/upload.json?app_id=MY_APP_ID&app_code=MY_APP_CODE&map_name=OVERLAYNA&overlay_spec=%5B%0A%20%20%7B%20%22op%22%3A%22override%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10765%2C8.68774%5D%2C%5B50.10914%2C8.68771%5D%5D%2C%0A%20%20%22layer%22%3A%22LINK_ATTRIBUTE_FCN%22%2C%0A%20%20%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%220%22%7D%0A%20%20%7D%2C%0A%20%20%7B%20%22op%22%3A%22create%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%0A%20%20%22data%22%3A%7B%22NAMES%22%3A%22ENGBNDemo%20Road%22%7D%0A%20%20%7D%2C%0A%20%20%7B%20%22op%22%3A%22override%22%2C%0A%20%20%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%0A%20%20%22layer%22%3A%22TRUCK_RESTR_FCN%22%2C%0A%20%20%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%22truck%22%2C%20%22WEIGHT_RESTRICTION%22%3A%223300%22%7D%0A%20%20%7D%0A%5D'
here-api
here-api
asked Nov 12 at 7:49
Piotr Bernad
1466
1466
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Could you please retry your request. Looks like a temporary outage. We tried and was able to get the below response for your above request.
Request:
http://cre.api.here.com/2/overlays/upload.json?map_name=OVERLAYNA&overlay_spec=%5B%7B%22op%22:%22override%22,%22shape%22:%5B%5B50.10765,8.68774%5D,%5B50.10914,8.68771%5D%5D,%22layer%22:%22LINK_ATTRIBUTE_FCN%22,%22data%22:%7B%22VEHICLE_TYPES%22:%220%22%7D%7D%5D&storage=readonly
Response:
{
"layers": [
"LINK_FC3",
"LINK_ATTRIBUTE_FC3",
"TRUCK_RESTR_FC3",
"ROAD_ADMIN_FC3",
"ROAD_GEOM_FC3"
],
"meta": [
{
"layerId": "LINK_FC3",
"lastUpdateTimeStamp": 1542030162597
},
{
"layerId": "LINK_ATTRIBUTE_FC3",
"lastUpdateTimeStamp": 1542030162624
},
{
"layerId": "TRUCK_RESTR_FC3",
"lastUpdateTimeStamp": 1542030162711
},
{
"layerId": "ROAD_ADMIN_FC3",
"lastUpdateTimeStamp": 1542030162843
},
{
"layerId": "ROAD_GEOM_FC3",
"lastUpdateTimeStamp": 1542030162964
}
],
"response_code": "201 Created"
}
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257802%2ffleet-telematics-custom-routes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Could you please retry your request. Looks like a temporary outage. We tried and was able to get the below response for your above request.
Request:
http://cre.api.here.com/2/overlays/upload.json?map_name=OVERLAYNA&overlay_spec=%5B%7B%22op%22:%22override%22,%22shape%22:%5B%5B50.10765,8.68774%5D,%5B50.10914,8.68771%5D%5D,%22layer%22:%22LINK_ATTRIBUTE_FCN%22,%22data%22:%7B%22VEHICLE_TYPES%22:%220%22%7D%7D%5D&storage=readonly
Response:
{
"layers": [
"LINK_FC3",
"LINK_ATTRIBUTE_FC3",
"TRUCK_RESTR_FC3",
"ROAD_ADMIN_FC3",
"ROAD_GEOM_FC3"
],
"meta": [
{
"layerId": "LINK_FC3",
"lastUpdateTimeStamp": 1542030162597
},
{
"layerId": "LINK_ATTRIBUTE_FC3",
"lastUpdateTimeStamp": 1542030162624
},
{
"layerId": "TRUCK_RESTR_FC3",
"lastUpdateTimeStamp": 1542030162711
},
{
"layerId": "ROAD_ADMIN_FC3",
"lastUpdateTimeStamp": 1542030162843
},
{
"layerId": "ROAD_GEOM_FC3",
"lastUpdateTimeStamp": 1542030162964
}
],
"response_code": "201 Created"
}
add a comment |
up vote
1
down vote
accepted
Could you please retry your request. Looks like a temporary outage. We tried and was able to get the below response for your above request.
Request:
http://cre.api.here.com/2/overlays/upload.json?map_name=OVERLAYNA&overlay_spec=%5B%7B%22op%22:%22override%22,%22shape%22:%5B%5B50.10765,8.68774%5D,%5B50.10914,8.68771%5D%5D,%22layer%22:%22LINK_ATTRIBUTE_FCN%22,%22data%22:%7B%22VEHICLE_TYPES%22:%220%22%7D%7D%5D&storage=readonly
Response:
{
"layers": [
"LINK_FC3",
"LINK_ATTRIBUTE_FC3",
"TRUCK_RESTR_FC3",
"ROAD_ADMIN_FC3",
"ROAD_GEOM_FC3"
],
"meta": [
{
"layerId": "LINK_FC3",
"lastUpdateTimeStamp": 1542030162597
},
{
"layerId": "LINK_ATTRIBUTE_FC3",
"lastUpdateTimeStamp": 1542030162624
},
{
"layerId": "TRUCK_RESTR_FC3",
"lastUpdateTimeStamp": 1542030162711
},
{
"layerId": "ROAD_ADMIN_FC3",
"lastUpdateTimeStamp": 1542030162843
},
{
"layerId": "ROAD_GEOM_FC3",
"lastUpdateTimeStamp": 1542030162964
}
],
"response_code": "201 Created"
}
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Could you please retry your request. Looks like a temporary outage. We tried and was able to get the below response for your above request.
Request:
http://cre.api.here.com/2/overlays/upload.json?map_name=OVERLAYNA&overlay_spec=%5B%7B%22op%22:%22override%22,%22shape%22:%5B%5B50.10765,8.68774%5D,%5B50.10914,8.68771%5D%5D,%22layer%22:%22LINK_ATTRIBUTE_FCN%22,%22data%22:%7B%22VEHICLE_TYPES%22:%220%22%7D%7D%5D&storage=readonly
Response:
{
"layers": [
"LINK_FC3",
"LINK_ATTRIBUTE_FC3",
"TRUCK_RESTR_FC3",
"ROAD_ADMIN_FC3",
"ROAD_GEOM_FC3"
],
"meta": [
{
"layerId": "LINK_FC3",
"lastUpdateTimeStamp": 1542030162597
},
{
"layerId": "LINK_ATTRIBUTE_FC3",
"lastUpdateTimeStamp": 1542030162624
},
{
"layerId": "TRUCK_RESTR_FC3",
"lastUpdateTimeStamp": 1542030162711
},
{
"layerId": "ROAD_ADMIN_FC3",
"lastUpdateTimeStamp": 1542030162843
},
{
"layerId": "ROAD_GEOM_FC3",
"lastUpdateTimeStamp": 1542030162964
}
],
"response_code": "201 Created"
}
Could you please retry your request. Looks like a temporary outage. We tried and was able to get the below response for your above request.
Request:
http://cre.api.here.com/2/overlays/upload.json?map_name=OVERLAYNA&overlay_spec=%5B%7B%22op%22:%22override%22,%22shape%22:%5B%5B50.10765,8.68774%5D,%5B50.10914,8.68771%5D%5D,%22layer%22:%22LINK_ATTRIBUTE_FCN%22,%22data%22:%7B%22VEHICLE_TYPES%22:%220%22%7D%7D%5D&storage=readonly
Response:
{
"layers": [
"LINK_FC3",
"LINK_ATTRIBUTE_FC3",
"TRUCK_RESTR_FC3",
"ROAD_ADMIN_FC3",
"ROAD_GEOM_FC3"
],
"meta": [
{
"layerId": "LINK_FC3",
"lastUpdateTimeStamp": 1542030162597
},
{
"layerId": "LINK_ATTRIBUTE_FC3",
"lastUpdateTimeStamp": 1542030162624
},
{
"layerId": "TRUCK_RESTR_FC3",
"lastUpdateTimeStamp": 1542030162711
},
{
"layerId": "ROAD_ADMIN_FC3",
"lastUpdateTimeStamp": 1542030162843
},
{
"layerId": "ROAD_GEOM_FC3",
"lastUpdateTimeStamp": 1542030162964
}
],
"response_code": "201 Created"
}
answered Nov 12 at 13:43
HERE Developer Support
1,001169
1,001169
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53257802%2ffleet-telematics-custom-routes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown