Rest 2.0 404

I downloaded the REST 2.0 API from github and installed it as well as
adding it to RT_SiteConfig.pl.

When I attempt to access the interface at
https://example.com/REST/2.0/ticket/33, I initially get a message
saying ‘Authorization Required’.

If I use HTTP Basic Auth to authenticate using an RT account that has
full admin privileges, it starts returning 404 not found.

It does this for any address
/ticket
/ticket/33
/queue
/queue/1

I have tried accessing them via POST and GET.

The REST 1.0 API works fine.

Any pointers?

-A

Anyone?

I’m trying to use the REST API for:

  • Move tickets from an older system into RT
  • Pull out statistics for Dashing
  • Post notifications to Slack
  • Create projects in Toggl for technicians to enter time against

Is anyone using it?
I can’t tell from the documentation here:
https://github.com/bestpractical/rt-extension-rest2 if it’s production
ready or not.

If it’s not, does anyone have suggestions for importing ~20,000
tickets into the system along with ~250,000 ‘comments’?

Thanks,

-AOn Mon, May 18, 2015 at 12:00 PM, Aaron C. de Bruyn aaron@heyaaron.com wrote:

I downloaded the REST 2.0 API from github and installed it as well as
adding it to RT_SiteConfig.pl.

When I attempt to access the interface at
https://example.com/REST/2.0/ticket/33, I initially get a message
saying ‘Authorization Required’.

If I use HTTP Basic Auth to authenticate using an RT account that has
full admin privileges, it starts returning 404 not found.

It does this for any address
/ticket
/ticket/33
/queue
/queue/1

I have tried accessing them via POST and GET.

The REST 1.0 API works fine.

Any pointers?

-A

Anyone?

The ‘2.0’ REST interface is a work in progress and isn’t yet part of RT. You’d probably be best off using the REST interface that ships as part of RT.

If it’s not, does anyone have suggestions for importing ~20,000
tickets into the system along with ~250,000 ‘comments’?

In general, at that scale, I’d probably recommend working with the
native perl interface.

-jesse

In general, at that scale, I’d probably recommend working with the
native perl interface.

Thanks for the recommendations.
I guess I better re-learn Perl. It’s been almost 15 years since I’ve
touched it. :wink:

-A

I have had success by creating a token created under the user / Settings / Auth Tokens,
Click on the Create Auth Token button and copy the token to a safe location.

then apply using the following curl format
curl -X GET “/REST/2.0/ticket/<#>” -H "Authorization: Token "

Anything between <> needs to be changed to your info. Do NOT include the <> in the request. The <#> should be replaced with the number of the ticket and the <your token goes here should be replaced with the token you created earlier. Your permissions drive token’s access I believe. This is the header based authentication using token.

I hope it works for you