Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4963] Getting 401 Error on default endpoints created by API Builder

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionWon't Fix
Resolution Date2017-05-15T09:08:07.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsArrow Builder
Labelsapi-builder, arrow
ReporterBrenton House
AssigneeShak Hossain
Created2017-05-12T19:34:29.000+0000
Updated2017-05-15T09:08:08.000+0000

Description

Steps:

appc new -t arrow arrow-test-3

cd arrow-test-3

appc run

open http://localhost:8080/api/greet

Expected: JSON response Actual: HTTP 401 Error This is also happening with other endpoints. And, yes, I am an admin for organization

Comments

  1. Ewan Harris 2017-05-12

    [~brentonhouse], all API Builder APIs have security by default, so accessing the url in a browser like that wont work (by default), so in order to nteract with the APIs you can use curl (for the example Greet endpoint, curl http://localhost:8080/api/Greet?username="Brenton" -u <APIKEY>:, where APIKEY is what API Builder prints out on startup. You could also use a tool like Postman if you prefer Now, there is another option but that is only for autogenerated model APIs, and programmatic APIs (ones in /api folder) *for now*, you can use the API Builder Console to interact with your APIs, visit http://localhost:8080/console, and navigate to the API Docs & Test tab, here you can interact and try out your APIs from within the browser. This is not provided for the new Swagger defined endpoints added in 2.0.0, but it will be included in the next release, which should be soon.
  2. Brenton House 2017-05-12

    Thanks [~eharris]!
  3. Ewan Harris 2017-05-15

    Closing as wont fix based off my previous comment

JSON Source