3

According to the REST API guide the following endpoints can be accessed via HTTP GET to return a list of workflow rules, all workflow rules for an object, and a specific workflow rule, respectively:

/services/data/vXX.0/process/rules
/services/data/vXX.0/process/rules/SObjectType
/services/data/vXX.0/process/rules/sObjectType/WorkflowRecId

Upon giving this a go, I was getting an empty JSON object. Why won't this API return any data for metadata that appears to be there in the setup UI?

1 Answer 1

2

It appears the API supports access only at active workflow rules.

Upon going to the rule, making it active, the REST request then successfully responded with the following:

{
  "rules" : [ {
    "actions" : [ {
      "id" : "01Vw0000000PJKUEA4",
      "name" : "Follow_Up_on_New_Account",
      "type" : "Task"
    } ],
    "description" : null,
    "id" : "01Qw0000000QKuNEAW",
    "name" : "Account Set To Type Customer Direct",
    "namespacePrefix" : null,
    "object" : "Account"
  } ]
}

I've reached out to find out if this is a bug in the API, or a bug in the docs. Based on the fact that there is no ability to modify the parameters of the WF rule currently, I suspect the "only return active rules" behavior is deliberate and the docs just need to tell us.

2
  • lol, that would be assuming too much. Commented Sep 9, 2014 at 15:28
  • definitely worth filing a bug request, if it wasn't intentional it will be in a few release since all bugs become features after people start coding against them Commented Sep 9, 2014 at 15:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .