INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: [MCWS] library.CreateField throws an error  (Read 791 times)

DrKNo

  • World Citizen
  • ***
  • Posts: 201
[MCWS] library.CreateField throws an error
« on: December 14, 2021, 05:52:15 pm »

I'm trying to use MCWS to automatically create fields in order to synchronize fields between installations - AFAIK there is no other way to do that right now. However, calling CreateFields always fails for me. This is an example call that I think should be legal:

http://192.168.178.22:52199/MCWS/v1/Library/CreateField?Name=MUSICBRAINZ_ALBUMID&Type=string

This throws a 500 Internal Server Error Code.

Additionally, may I request two things:
  • Make CreateField powerful enough to create fields the same way as via UI. i.e. by allowing more data types than strings and integers, editing display strings, flags, relational types, edit types, acceptable values, the save in tags flag and the search keywords
  • Either edit Library.fields to retrieve these values from fields, or alternatively add library.FieldInfo or similar to get this deeper info via MCWS.

Thank you for your consideration.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10925
Re: [MCWS] library.CreateField throws an error
« Reply #1 on: December 14, 2021, 06:09:43 pm »

The MCWS command will only error if either the name is missing, or the field already exists, as far as I can see.
Logged
~ nevcairiel
~ Author of LAV Filters

DrKNo

  • World Citizen
  • ***
  • Posts: 201
Re: [MCWS] library.CreateField throws an error
« Reply #2 on: December 14, 2021, 06:19:08 pm »

Huh, apparently I needed to restart JRiver on the target machine to make it turn up in the list using preferences (at least it turned up after I fired it up again after your comment). Thank you, hendrik!

Any chance on my requests? Right now the MCWS call doesn't get me far on my quest :)
Logged

DrKNo

  • World Citizen
  • ***
  • Posts: 201
Re: [MCWS] library.CreateField throws an error
« Reply #3 on: December 14, 2021, 06:24:32 pm »

Additionally, maybe one could use a more fitting error code in this case? 500 makes it sound like the problem lies with MC, while this really is a user error. One could maybe use 409 Conflict?
Logged
Pages: [1]   Go Up