Ubiquiti-App / UCRM-plugins

Plugins for UCRM - Complete WISP Management Platform
https://ucrm.ubnt.com/
MIT License
61 stars 103 forks source link

No route POST: ticketing/tickets #241

Open AlanGreyjoy opened 2 years ago

AlanGreyjoy commented 2 years ago

Ran into this tonight. No route POST: ticketing/tickets

Using the latest UCRM SDK.

Antontonov commented 5 months ago

Hi, have the same issue, how do you solve it?

kind regards

AlanGreyjoy commented 5 months ago

You have to debug the actual UCRM app in console and you'll see the path.

I stopped using the SDK. If you using node, then just use axios and build your own SDK using the API docs. I rarely use SDK's nowadays.

The API docs say REST, but it's not a RESTful api. Getting tired of RESTful just being tossed around like that lol.

Antontonov commented 5 months ago

Okay thank you, if I get something to run I will share it ;P

Or do you have allready a workaround to create/send tickets via plugins?

janprochazkacz commented 4 months ago

Hi @Antontonov, thank you for using CRM! We don't see any issues with API or plugin SDK. Try this and let us know if it works:


$api = \Ubnt\UcrmPluginSdk\Service\UcrmApi::create();

$api->post(
    'ticketing/tickets',
    [
        'subject' => 'Test ticket',
        'clientId' => 1,
        'activity' => [
            [
                'comment' => [
                    'body' => 'Test comment',
                ]
            ]
        ]
    ]
);