Using non-public methods with REST-API

Moderator: crythias

Locked
leebphil
Znuny newbie
Posts: 2
Joined: 22 Feb 2020, 00:13
Znuny Version: 6.0
Real Name: Philipp Leeb

Using non-public methods with REST-API

Post by leebphil »

Hey guys,

is it possible to change the REST.pm in such a way to use non-public methods via REST? Most importantly i need the methods from Kernel::System::FAQ, does anyone have a clue how to get things work?

Thank you for any idea and help.
root
Administrator
Posts: 4251
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Using non-public methods with REST-API

Post by root »

Hi,

I've never heard of non-public method with REST. It's always GET, POST, PUT, etc. Did you ask for operations to use the FAQ? Only these here are available: https://github.com/OTRS/FAQ/tree/rel-6_ ... ration/FAQ

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
leebphil
Znuny newbie
Posts: 2
Joined: 22 Feb 2020, 00:13
Znuny Version: 6.0
Real Name: Philipp Leeb

Re: Using non-public methods with REST-API

Post by leebphil »

Good morning Roy,

there are those "public"-methods you mentioned (like, PublicFAQSearch, PublicFAQGet, etc.) but you need to set FAQs on state "public" when using them, if FAQs are set on set "internal" it is impossible to get these via REST. Using the agent-frontend the called method is "Kernel::System::FAQSearch" but you need to be logged in as an agent. "Kernel::System::FAQSearch" can not be included in the standard settings of REST, so i thought the standard REST.pm needs to be configured.
root
Administrator
Posts: 4251
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Using non-public methods with REST-API

Post by root »

Hi,

That's for sure a development task. Check the ticket operations on how to deal with authentication and start coding or search for a developer.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Locked