INTERACT FORUM

Please login or register.

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

Author Topic: MCWS - Functions  (Read 212 times)

Richard Martin

  • World Citizen
  • ***
  • Posts: 235
MCWS - Functions
« on: October 18, 2024, 04:14:38 pm »

I wonder if I am missing something.

I have read https://wiki.jriver.com/index.php/Web_Service_Interface

I have looked at http://[library server address]/MCWS/v1/doc and http://[library server address]/MCWS/v1/WSDL both list the available functions and doc has examples of the responses, but I can't see anything specifying the arguments to pass when calling the functions.

Is there any documentation that I am missing or some other way of finding out how to understand how to call the functions?
Logged

MrBiff

  • World Citizen
  • ***
  • Posts: 151
Re: MCWS - Functions
« Reply #1 on: October 18, 2024, 04:20:42 pm »

Hover over the "click here" in Play > Playback and view the link shown in your browsers tooltip.  Most of the calls have parameters, but some of the click here examples don't show them.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2563
Re: MCWS - Functions
« Reply #2 on: October 18, 2024, 04:30:02 pm »

The arguments are on the documentation page, it's the "parameters" under each API name.

http://localhost:52199/MCWS/v1/Files/Current?action=JSON&Formatted=1
"Action" and "Formatted" are parameters, as described in the documentation page for /Files/Current.
Logged

Richard Martin

  • World Citizen
  • ***
  • Posts: 235
Re: MCWS - Functions
« Reply #3 on: October 18, 2024, 05:08:57 pm »

Hover over the "click here" in Play > Playback and view the link shown in your browsers tooltip.  Most of the calls have parameters, but some of the click here examples don't show them.
When I hover over Click here I see a tool tip that says "Click here" and when I click I see response examples
Logged

Richard Martin

  • World Citizen
  • ***
  • Posts: 235
Re: MCWS - Functions
« Reply #4 on: October 18, 2024, 05:10:06 pm »

The arguments are on the documentation page, it's the "parameters" under each API name.

http://localhost:52199/MCWS/v1/Files/Current?action=JSON&Formatted=1
"Action" and "Formatted" are parameters, as described in the documentation page for /Files/Current.
I don't know why I didn't see that...it was right in front of me!
Thank you

[Edit]
The first one I was trying to use, Authenticate, doesn't list any parameters.  Presumably it's username and password, or user and pwd or some combination.  I could be here awhile trying them.
Logged

MrBiff

  • World Citizen
  • ***
  • Posts: 151
Re: MCWS - Functions
« Reply #5 on: October 18, 2024, 05:34:58 pm »

It is Basic HTTP authentication.

These might help.

https://en.wikipedia.org/wiki/Basic_access_authentication
https://yabb.jriver.com/interact/index.php?topic=111986.0
https://yabb.jriver.com/interact/index.php?topic=122106.0

Authenticate will give you a 401 reply (Authorization Required).  Pull the "www-authenticate" header and retrieve the Basic Realm.  Then make an HTTP call passing the proper Authorization header from Realm, Username and Password (how you do this depends on the HTTP library you're using).  Correct authorization will provide you with a Token and a ReadOnly value in the returned XML.  If you're going to write, and do anything more than basic, you'll want MCWS to be configured with authentication, and you'll expect the server to not indicate it is in ReadOnly mode.
Logged

MrBiff

  • World Citizen
  • ***
  • Posts: 151
Re: MCWS - Functions
« Reply #6 on: October 18, 2024, 05:48:27 pm »

When I hover over Click here I see a tool tip that says "Click here" and when I click I see response examples

Logged

Richard Martin

  • World Citizen
  • ***
  • Posts: 235
Re: MCWS - Functions
« Reply #7 on: October 19, 2024, 11:54:49 am »

It is Basic HTTP authentication.

These might help.

https://en.wikipedia.org/wiki/Basic_access_authentication
https://yabb.jriver.com/interact/index.php?topic=111986.0
https://yabb.jriver.com/interact/index.php?topic=122106.0

Authenticate will give you a 401 reply (Authorization Required).  Pull the "www-authenticate" header and retrieve the Basic Realm.  Then make an HTTP call passing the proper Authorization header from Realm, Username and Password (how you do this depends on the HTTP library you're using).  Correct authorization will provide you with a Token and a ReadOnly value in the returned XML.  If you're going to write, and do anything more than basic, you'll want MCWS to be configured with authentication, and you'll expect the server to not indicate it is in ReadOnly mode.

Thank you, that should help
Logged

Richard Martin

  • World Citizen
  • ***
  • Posts: 235
Re: MCWS - Functions
« Reply #8 on: October 19, 2024, 11:55:14 am »

Logged
Pages: [1]   Go Up