URL Paths
  • 09 Nov 2022
  • Dark
    Light
  • PDF

URL Paths

  • Dark
    Light
  • PDF

Article Summary

Adapters need to send the request to the correct path for the other system to receive and handle the request properly. The path of a call is the part that comes after the connect information and before the ?. For example: URL - http://myservicenow.com/api/rest/v1/changes?name=CHG, the path is /api/rest/v1/changes. If the path the other system expects is /api/rest/v1/changes and we are sending a path of /api/v2/change, the call will result in an error (usually a 404), or it will not be handled properly.

Having the correct path for installation requires verifying the IAP Service Instance Configuration for the adapter. In particular these properties:

  • base_path
  • version

To verify you have the correct path:

  • Make sure base_path is correct. Using base path is helpful to minimize the impact of any changes but the wrong base path will result in all calls failing.
    • Make sure base_path is only the common part of the path for all calls. So in the example above the base_path should be /api/rest if that is the first part of most or all calls to the system.
    • The base_path should not include connectivity information like protocol, host or port. So it would not include anything in the url before /api.
    • The base_path should not include versions. While it can include versions there is a separate property for versions.
  • Make sure version is correct. The version should not include and slash before or after - it should just be the version. So in the url above the version is v1. If there is no version, the version should be left as an empty string.
  • The rest of the path comes from the entitypath in the Endpoint Configuration for the adapter (/adapter-home-dir/entities/specific-entity/action.json). If this path is incorrect (can happen if a newer version of the other system is being used or if it was not built correctly initially). You can change the path here.

Entitypath for a Call Example

"entitypath": "{base_path}/{version}/device_management/v1/device/{pathv1}/action/{pathv2}?{query}"

The parts of the path that are in {..} are replaced by the adapter library and should not be changed. So {base_path}, {version}, {pathv#} are all special within the adapter world and will be replaced before the call is made to the other system. Path variables {pathv#} allow for dynamic information (information that changes on a call by call basis) within the url.


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.