如何使用 Parse Server 获取 JobStatus

How to get JobStatus with Parse Server

我想知道是否可以在 Cloud Code 中查询特定作​​业(甚至所有作业)的状态。

我在文档中找到的唯一内容是:

Viewing jobs is supported on parse-dashboard starting version 1.0.19, but you can also query the _JobStatus class with a masterKey call to fetch your recent jobs

所以我尝试了 :

curl -X POST \
-H "X-Parse-Application-Id: APPLICATION_ID" \
-H "Content-Type: application/json" \
-H "X-Parse-Master-Key: MASTER_KEY" \
https://myparsepath/parse/classes/JobStatus

但它返回了这个(这不是我的工作列表):

{
  "objectId": "wRqETEgJc0",
  "createdAt": "2018-08-01T09:28:38.095Z"
}

这就是我在这里请求你帮助的原因。 提前谢谢你

您发布的代码刚刚创建了一个 JobStatus 对象,它不同于用于跟踪工作的内部 class _JobStatus。

尝试:

curl -X GET \
-H "X-Parse-Application-Id: APPLICATION_ID" \
-H "Content-Type: application/json" \
-H "X-Parse-Master-Key: MASTER_KEY" \
https://myparsepath/parse/classes/_JobStatus