here-api - Here Batch Geocode API - Batch 停留在提交状态
问题描述
我已经向 Here.com 提交了一份工作到 Geocode 5 地址。我使用 Postman 使用 POST 请求提交。我在星期三提交,现在是星期五,我检查时的状态仍然是“提交”。
这是我使用的api请求:
https://batch.geocoder.api.here.com/6.2/jobs?app_id=ID&app_code=CODE&mailto=billtepe@gmail.com&outdelim=|&outcols=displayLatitude,displayLongitude,locationLabel,houseNumber,street,district,city,postalCode,county,state,country&indelim=|
数据:
recId|searchText|country
1|1 BRAID WAY TAYLOR MILL KY 41011|USA
2|1 GEORGETOWN FORT MITCHELL KY 41017|USA
3|1 SPERTI DR KY|USA
4|10 E. 29TH ST. TAYLOR MILL KY 41015|USA
5|1000 W 33RD ST LATONIA KY 41015|USA
回复我回来了:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SearchBatch xmlns:ns2="http://www.navteq.com/lbsp/Search-Batch/1">
<Response>
<MetaInfo>
<RequestId>bEmNvFu9M7AVaISeEYvrT4cYMlj29Y8K</RequestId>
</MetaInfo>
<Status>submitted</Status>
<TotalCount>0</TotalCount>
<ValidCount>0</ValidCount>
<InvalidCount>0</InvalidCount>
<ProcessedCount>0</ProcessedCount>
<PendingCount>0</PendingCount>
<SuccessCount>0</SuccessCount>
<ErrorCount>0</ErrorCount>
</Response>
</ns2:SearchBatch>
这是我通过 POSTMAN 提交以检查状态的 GET 请求:
https://batch.geocoder.api.here.com/6.2/jobs/bEmNvFu9M7AVaISeEYvrT4cYMlj29Y8K?app_id=ID&app_code=CODE&action=status
这是我 2.5 天以来收到的回复。这需要多长时间?我是这里的新手,只是不知道我的期望应该是什么。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SearchBatch xmlns:ns2="http://www.navteq.com/lbsp/Search-Batch/1">
<Response>
<MetaInfo>
<RequestId>bEmNvFu9M7AVaISeEYvrT4cYMlj29Y8K</RequestId>
</MetaInfo>
<Status>submitted</Status>
<TotalCount>0</TotalCount>
<ValidCount>0</ValidCount>
<InvalidCount>0</InvalidCount>
<ProcessedCount>0</ProcessedCount>
<PendingCount>0</PendingCount>
<SuccessCount>0</SuccessCount>
<ErrorCount>0</ErrorCount>
</Response>
</ns2:SearchBatch>
任何帮助或指导将不胜感激。
解决方案
不幸的是,您没有通过在 POST 请求中添加“&action=run”来开始这项工作。请查看https://developer.here.com/documentation/batch-geocoder/topics/submit-batch-request.html上的文档
您可以通过发送带有该操作的 PUT 请求来单独启动作业。然后该作业将变为状态“接受”。只有这样它才会排队等待执行:
https://batch.geocoder.api.here.com/6.2/jobs/bEmNvFu9M7AVaISeEYvrT4cYMlj29Y8K?app_id=ID&app_code=CODE&action=run
推荐阅读
- python - 如何在 keras 中加载预训练的词嵌入并输出不同的类
- typescript - 如何从 Vuetify 数据表组件的类中获取数据?
- python - 如何到达 QTreeWidget 第二列 QComboBox 中的内容?
- pascal - 在 Pascal 中使用 MOD
- r - 如何在 R 中添加表格或矩阵的总和行?
- c# - 使用数组显示数据库中的多个图像
- javascript - 隐藏水平滚动条,但保持滚动功能
- docker - Kubernetes中的Accumulo集群部署
- php - 在发布到服务器之前使用 php 验证 json 数组中是否存在条目
- angular - 使用 routerLink 角度 6-7 时组件没有获取 contentChildren