Method failed (/api/now/table/import/u_rest_incidents) with code: 405

levino
Giga Guru

Hi there

trying to do a Import API

getting this error

{"error":{"message":"Method not Supported","detail":"POST method not supported for API"},"status":"failure"}

Method failed: (/api/now/table/import/u_rest_incidents) with code: 405

 

Thanks

Levino

 

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, a 405 error  means method is not allowed
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405

I would suspect this is because you appear to be using a mix of import and table API's in your path.
Try this format for table API
POST /now/table/{tableName}
https://developer.servicenow.com/dev.do#!/reference/api/quebec/rest/c_TableAPI

Or this for the import API
POST /now/import/{stagingTableName}
https://developer.servicenow.com/dev.do#!/reference/api/quebec/rest/c_ImportSetAPI

Take a look at the Rest API explorer for API syntax
/nav_to.do?uri=%2F$restapi.do

View solution in original post

1 REPLY 1

Tony Chatfield1
Kilo Patron

Hi, a 405 error  means method is not allowed
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405

I would suspect this is because you appear to be using a mix of import and table API's in your path.
Try this format for table API
POST /now/table/{tableName}
https://developer.servicenow.com/dev.do#!/reference/api/quebec/rest/c_TableAPI

Or this for the import API
POST /now/import/{stagingTableName}
https://developer.servicenow.com/dev.do#!/reference/api/quebec/rest/c_ImportSetAPI

Take a look at the Rest API explorer for API syntax
/nav_to.do?uri=%2F$restapi.do