Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM 6.3 - Swagger Rest Call Returning 404

Avatar

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
jamestvu
Level 2

12-12-2018

I've made a simple Rest API with a couple GET calls. one returns a string and one returns a json object.

The rest service works when called externally and returns the string and object.

However when trying to call or test the methods, after successfully hooking it to a data form model, aem gives a 404.2.PNG

12.12.2018 15:40:44.075 *ERROR* [0:0:0:0:0:0:0:1 [1544665244058] POST /content/dam/formsanddocuments-fdm/test-swagger.executeDermisQuery.json HTTP/1.1] com.adobe.aem.dermis.core.servlet.DermisBridgeServlet Exception while executing operation

com.adobe.aem.dermis.exception.DermisException: <html><head><title>Error</title></head><body>404 - Not Found</body></html>

        at com.adobe.aem.dermis.core.rest.service.RestInvoker.invokeOperation(RestInvoker.java:126)

        at com.adobe.aem.dermis.core.rest.service.RestConnector.executeRequest(RestConnector.java:115)

        at com.adobe.aem.dermis.api.AbstractConnector.executeOperation(AbstractConnector.java:435)

swagger.json file used,

{

   "swagger": "2.0",
   "info": {

   "version": "0.0.1-SNAPSHOT",
   "title": "RestTest"
   },
   "host": "localhost:8083",
   "basePath": "/rest",
   "schemes": [

   "http"
   ],
   "paths": {

   "/test": {

   "get": {

   "consumes": [

  ],
   "produces": [

   "text/plain"
   ],
   "parameters": [

  ],
   "responses": {

   "200": {

   "description": "OK",
   "headers": {

  },
   "schema": {

   "type": "string"
   }

  }

  }

  }

  },
   "/test/exception": {

   "get": {

   "consumes": [

  ],
   "produces": [

   "application/json"
   ],
   "parameters": [

  ],
   "responses": {

   "200": {

   "description": "OK",
   "headers": {

  },
   "schema": {

   "$ref": "#/definitions/TestObject"
   }

  },
   "406": {

   "description": "Not Acceptable",
   "headers": {

  },
   "schema": {

   "type": "object"
   }

  }

  }

  }

  },
   "/test/message": {

   "get": {

   "consumes": [

  ],
   "produces": [

   "application/json"
   ],
   "parameters": [

  ],
   "responses": {

   "200": {

   "description": "OK",
   "headers": {

  },
   "schema": {

   "type": "string"
   }

  }

  }

  }

  },
   "/test/object": {

   "get": {

   "consumes": [

  ],
   "produces": [

   "application/json"
   ],
   "parameters": [

  ],
   "responses": {

   "200": {

   "description": "OK",
   "headers": {

  },
   "schema": {

   "$ref": "#/definitions/TestObject"
   }

  }

  }

  }

  }

  },
   "definitions": {

   "TestObject": {

   "properties": {

   "id": {

   "type": "integer"
   },
   "name": {

   "type": "string"
   }

  }

  }

  }

}

Replies

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct Reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct Reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

19-12-2018

Hi James,

Did you got this working or still need some help with this?

Avatar

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
jamestvu
Level 2

19-12-2018

Hey Mayank,

I haven't figured it out. I've also tried using the https://petstore.swagger.io/v2/swagger.json

but testing any of the methods in the Test Form Data Model screen gives an error in the input json. Any idea on why this occurs?

Avatar

Avatar
Ignite 1
Level 1
Ashish23
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile

Avatar
Ignite 1
Level 1
Ashish23
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile
Ashish23
Level 1

11-05-2020

Hi,

 

I am also facing similar issue. Is there any solution to this issue?