panel icon indicating copy to clipboard operation
panel copied to clipboard

Get Server Logs From Client API

Open jvvan opened this issue 2 years ago • 3 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Ability to get server logs without connecting to the Wings websocket.

It would help people that want to build their own system on top of pterodactyl.

Describe the solution you'd like.

Add a new client API route (e.g. /api/client/servers/:uuid/logs) that returns the server logs.

Additional context to this request.

This is already implemented in Wings (/api/servers/:uuid/logs). It just needs to be added to the panel API, so we can use API keys.

jvvan avatar Aug 17 '22 22:08 jvvan

This is already added, refer to https://github.com/pterodactyl/panel/blob/develop/routes/api-client.php#L65

The wings endpoint is only for syncing data between wings and the panel.

Jelcoo avatar Aug 17 '22 22:08 Jelcoo

This is already added, refer to https://github.com/pterodactyl/panel/blob/develop/routes/api-client.php#L65

The wings endpoint is only for syncing data between wings and the panel.

That is for activity logs. I am talking about console logs, unless I'm missing something?

jvvan avatar Aug 17 '22 22:08 jvvan

Oh sorry missed that. Building such system on the panel would require a significant amount of work for the few people actually goint to use it.

Jelcoo avatar Aug 17 '22 23:08 Jelcoo

hello, can you help me? every time I try to use the await route axios.get(${url}/api/application/servers/${id}/logs) it returns error 405, how can I fix this? my code is in javascript

XDukeHD avatar Jan 26 '23 05:01 XDukeHD

hello, can you help me? every time I try to use the await route axios.get(${url}/api/application/servers/${id}/logs) it returns error 405, how can I fix this? my code is in javascript

You would have to use the client api for that, not the application api.

Jelcoo avatar Jan 26 '23 15:01 Jelcoo