Dear community,
I'm trying to create an external look up field for the Workfront Planning API, and in the instructions it says that I should add:
JSON Path: $.records[*].data.{fieldID}
{fieldID} is the field to display in the External lookup search results on the custom form for end users.
Can anyone help me understand what is exactly the fieldID? Is it the WF Planning field ID? If so, how can I get it? I was not able to find it.
Thanks in advance!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @karinasaijo,
Thank you for your question! The section of the article that you're looking at provides an example to pull the fieldID into the External lookup search results. You wouldn't need to know the fieldID, since that is what will be returned.
The base API URL will be:
$$HOST/maestro/api/v1/records/search?recordTypeId={recordTypeID}
So you would need to know the recordTypeID. In order to retrieve that, run this call in your browser:
https://<domain>.my.workfront.com/maestro/api/record-types?workspaceId={workspaceID}
For workspace ID, you can navigate to it in Workfront and grab the ID from the URL:
Running the API call above would return a different ID for Demands, Clients and Deliverables that I could plugin to base API URL.
- Monica
Views
Replies
Total Likes
Hi @karinasaijo,
Thank you for your question! The section of the article that you're looking at provides an example to pull the fieldID into the External lookup search results. You wouldn't need to know the fieldID, since that is what will be returned.
The base API URL will be:
$$HOST/maestro/api/v1/records/search?recordTypeId={recordTypeID}
So you would need to know the recordTypeID. In order to retrieve that, run this call in your browser:
https://<domain>.my.workfront.com/maestro/api/record-types?workspaceId={workspaceID}
For workspace ID, you can navigate to it in Workfront and grab the ID from the URL:
Running the API call above would return a different ID for Demands, Clients and Deliverables that I could plugin to base API URL.
- Monica
Views
Replies
Total Likes
Great answer Monica,
Maybe you know, how to filter out records via get parameters?
https://developer.adobe.com/wf-planning/api/v1/#tag/Records/operation/searchRecordsGet
documentation says that we have filters param
string Filters |
but I cannot find out how to build this filters string
Thanks
Views
Replies
Total Likes
The search modifiers are listed in our article below:
You can use those in the "filters" parameter. There is also an example request body in that article that you can look at.
Views
Replies
Total Likes
yes, I saw filters parameters and it works like a charm when I send in via POST (request body)
but when I tried to send the same filters json via GET it always gives me 400 response (Bad Request), would be great if you could point me to some filters sent via GET method,
so that we could use filters in urls inside external lookup custom fields...
Thanks
Views
Replies
Total Likes
I just ran this search in my instance and it works for me. If you are running into trouble still, I would recommend submit a ticket to the Workfront Support team.
https://monicacardoso.my.workfront.com/maestro/api/records/search
{
"recordTypeId": "Rt6737884f681f114935e02506",
"filters": [
{
"$or": [
{
"F6737884f681f114935e02507": {
"$is": "Test Issue 1"
}
}
]
}
],
"limit": 200
}
That call returns a record in the "Demands" record type where the name is equal to "Test Issue 1".
Views
Replies
Total Likes
yep, POST call is working fine, thanks for the hint, I will definitely rich out to Workfront Support team.
Thank you for your response! I see -- then this doesn't do what I thought it would! But what you shared is useful for me to do some more research. Thank you again!
Views
Likes
Replies