Opened 20 months ago

Closed 2 months ago

#12075 closed Bug/Something is broken (fixed)

Control Panel REST UI returns a 500 error

Reported by: https://id.mayfirst.org/takethestreets Owned by: https://id.mayfirst.org/jamie
Priority: Medium Component: Tech
Keywords: red, REST Cc:
Sensitive: no

Description

Hi all,

I'm trying to implement the instructions listed here for the Red REST UI: https://support.mayfirst.org/wiki/control-panel/alternative-interfaces

Using the URL "https://members.mayfirst.org/cp" yields a 301 error, and suggests "https://members.mayfirst.org/cp/" (with a trailing slash). However, "https://members.mayfirst.org/cp/" and "https://members.mayfirst.org/cp/index.php" only seem to give 500 errors.

Questions:

  • Does the REST API still work?
  • The names of the POST fields for username and password aren't clear from the documentation, how should I pass them?

Change History (8)

comment:1 Changed 20 months ago by https://id.mayfirst.org/jaimev

  • Owner set to https://id.mayfirst.org/jamie
  • Status changed from new to assigned

I think we'll need jamie's help wth that. Have you tried using the red-cli interface as an alternative?

comment:2 Changed 20 months ago by https://id.mayfirst.org/takethestreets

Hi Jaime,

I don't have access to the red-cli, nor would it matter if I did. My use case here is using Ansible to generate dev and test sites for my clients. I can provision them on non-MFPL hardware - but my DNS hosting is with MFPL, so I need to be able to call the REST API to define their CNAMEs.

comment:3 Changed 20 months ago by https://id.mayfirst.org/jamie

Thanks for the tip on the missing documentation about logins - I just updated the docs (the parameters are: user_name and user_pass).

However, it still won't work because I have invoked IP based clear listing since I was the only one using this and I wanted added security while it was being tested.

Are you executing these commands from a static IP address? If so, let me know the IP and I can add it to the white list. If it's a dynamic IP - I can also lift the restriction (since this has been in development long enough for me to have more confidence in it's use).

jamie

comment:4 Changed 19 months ago by https://id.mayfirst.org/jessie

Hey Jamie,

We are not executing commands from a static IP at the time. If you feel comfortable lifting the restriction that would be great!

~Jessie

comment:5 Changed 19 months ago by https://id.mayfirst.org/jamie

  • Resolution set to fixed
  • Status changed from assigned to closed

Ok, restriction lifted. Please let us know how it goes.

comment:6 Changed 2 months ago by https://id.mayfirst.org/takethestreets

  • Resolution fixed deleted
  • Status changed from closed to assigned

I'm still getting an 500 error here. Was the restriction re-instituted?

comment:7 Changed 2 months ago by https://id.mayfirst.org/jamie

Can you copy and paste the code you are using (without the passwords)?

I noticed that the documentation incorrectly specified the API url as https://members.mayfirst.org/cp instead of https://members.mayfirst.org/cp/api.php (now fixed). Could that be the problem?

jamie

comment:8 Changed 2 months ago by https://id.mayfirst.org/takethestreets

  • Resolution set to fixed
  • Status changed from assigned to closed

That was exactly the problem Jamie. It looks good now, thanks!

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.