Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
techgs
Regular Visitor

API endpoint error / not returning expected results.

Hi,
I am pulling data from Workguru (our project management software) via API. All working ok however I cannot seem to get the data for a custom field.
This is the Swagger page Swagger UI (workguru.io) https://api.workguru.io/swagger/index.html
This one pulls the detail of the correct custom field https://api.workguru.io/api/services/app/CustomField/GetCustomFieldById?id=2199
However I cannot pull the value of that field in any of the projects.
I think this is the correct endpoint but unsure of the requirements for the description. /api/services/app/CustomField/GetCustomFieldValuesByTypeAndId 

Any help would be appreciated - thanks

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @techgs ,

Base on your description, it seems like you're having trouble pulling the value of a custom field in Workguru via API: /api/services/app/CustomField/GetCustomFieldValuesByTypeAndId. To use this endpoint, you'll need to provide two parameters: 'customFieldTypeId' and 'entityId'. 'customFieldTypeId' refers to the ID of the custom field type you're trying to retrieve, you can get it from the returned detail of  `/api/services/app/CustomField/GetCustomFieldById` endpoint.  As for the `entityId`, you'll need to provide the ID of the project you're trying to retrieve the custom field value for. Once you have both of these parameters, you can make a GET request to the `/api/services/app/CustomField/GetCustomFieldValuesByTypeAndId` endpoint with the appropriate values and it should return the custom field value for that project.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Great, thanks @v-yiruan-msft  - appreciate the help.
Custom field ID is 2199 and an example project ID is 414125
I have tried this /api/services/app/CustomField/GetCustomFieldValuesByTypeAndId?customFieldTypeId=2199&entityid=414125 but pulling returns the following error

DataSource.Error: Web.Contents failed to get contents from 'https://api.workguru.io/api/services/app/CustomField/GetCustomFieldValuesByTypeAndId?customFieldType...' (500): Internal Server Error
Details:
DataSourceKind=Web
DataSourcePath=https://api.workguru.io/api/services/app/CustomField/GetCustomFieldValuesByTypeAndId
Url=https://api.workguru.io/api/services/app/CustomField/GetCustomFieldValuesByTypeAndId?customFieldType...

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.