LunaticXJ 1 Posted April 30 Posted April 30 Hello, I have another question. I found RESTful APIs for querying and updating Item information in the official documentation, but upon testing, the returned data structure does not include all the fields of BaseItemDto as described in the API. Is there an issue with the API interface I am using? I am trying to use the getItems interface under ItemsService and the postItemsByItemid interface under ItemUpdateService to meet my requirements. Below is the data structure returned by calling the getItems interface, which does not include the date field: { "Items": [ { "Name": "建国为民为家丽大打出手", "ServerId": "106a2bc946764ee59e37e6edcb4fc697", "Id": "123", "IndexNumber": 7, "ParentIndexNumber": 1, "IsFolder": false, "Type": "Episode", "ParentLogoItemId": "5", "ParentBackdropItemId": "5", "ParentBackdropImageTags": [ "c203a61c07433b870261ffc09563e678" ], "SeriesName": "六姊妹", "SeriesId": "5", "SeasonId": "121", "SeriesPrimaryImageTag": "c7571cadc01b45735bdd24dc0c39fadf", "SeasonName": "第 1 季", "ImageTags": { "Primary": "e0621c438a50a2bfeb48c95a49534c93" }, "BackdropImageTags": [ ], "ParentLogoImageTag": "3398f1cc0efb1649d79fab1240e0c2d6", "MediaType": "Video" } ], "TotalRecordCount": 1 }
Solution ebr 15604 Posted April 30 Solution Posted April 30 Hi. Use the "Fields" parameter on your call to request the additional fields you would like.
LunaticXJ 1 Posted May 1 Author Posted May 1 Thank you, I tried it and it works. Additionally, if I want to call the API postItemsByItemid to update the DateCreated field, can the BaseItemDto be passed with only the ID and DateCreated fields?
ebr 15604 Posted May 1 Posted May 1 8 minutes ago, LunaticXJ said: can the BaseItemDto be passed with only the ID and DateCreated fields? No. You need to provide the full item. So retrieve it first, make your changes, and send it back.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now