401 unauthorized when using Postman to transform openapi2 json to restapi classes.
I am trying to use postman to start the restapi classes from a json openapi2.0.0 file.
POST: https://myserver.com/api/mgmnt/v2/requestAPI. The body contains the openapi2.0.0. The application api/mgmnt has in security settings: password. JWT is not selected. I set postman authentication to basis authentication and gave username and password. I also set in headers IRISUsername and IRISPassword. I have 401 Unauthorized.
Is the only way to go through is to build an oauth token? or do I miss something?
Thank you very much.
Product version: IRIS 2022.1
$ZV: "IRIS for UNIX (Red Hat Enterprise Linux 9 for x86-64) 2022.1.2 (Build 574_0_22843U) Wed Oct 18 2023 15:47:13 EDT
I just tried in my local IRIS using Postman:
http://localhost:52773/api/mgmnt/v2/user/myapp
I got 201 response and I see classes in Package myapp in USER namespace.
When I try the request with invalid JSON body, I got 404 Not Found response.
Thank you, Oliver. I used the other method you gave me using the iris terminal do ##class(%REST.API).CreateApplication(package,.obj,,.new,.error), and I have my classes