Hello ,
Thanks for your reply Brian however my exact problem is that my endpoints in my devel instance (which is running in a k8s cluster) are prefixed by /api (see below) and my basePath is "/"
eg: "paths": { "/api/circuits/circuit-terminations/"
{
"swagger": "2.0",
"info": {
"title": "NetBox API",
"description": "API to access NetBox",
"termsOfService": "
https://github.com/netbox-community/netbox",
"license": {
"name": "Apache v2 License"
},
"version": "2.11"
},
"host": "netbox-dev.obfuscated",
"schemes": [
"https"
],
"basePath": "/",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"securityDefinitions": {
"Bearer": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
},
"security": [
{
"Bearer": [
]
}
],
"paths": {
"/api/circuits/circuit-terminations/": {
"get": {
"operationId": "api_circuits_circuit-terminations_list",
"description": "",
"parameters": [
{
"name": "id",
"in": "query",
"description": "",
"required": false,
"type": "string"
},
Then with the same image but in a local environment (docker-compose) the things are not the same and my endpoints are not prefixed by /api and the basePath is "/api" (which is what I would to have in my devel instance, and that I am trying to configure without success)
eg : paths: { /circuits/circuit-terminations/:
{
swagger: "2.0",
info: {
title: "NetBox API",
description: "API to access NetBox",
termsOfService: "
https://github.com/netbox-community/netbox",
license: {
name: "Apache v2 License"
},
version: "2.11"
},
host: "
127.0.0.1:49154",
schemes: [
"http"
],
basePath: "/api",
consumes: [
"application/json"
],
produces: [
"application/json"
],
securityDefinitions: {
Bearer: {
type: "apiKey",
name: "Authorization",
in: "header"
}
},
security: [
{
Bearer: [ ]
}
],
paths: {
/circuits/circuit-terminations/: {
get: {
operationId: "circuits_circuit-terminations_list",
description: "",
parameters: [
{
name: "id",
in: "query",
description: "",
required: false,
type: "string"
},
{
name: "term_side",
in: "query",
description: "",
required: false,
type: "string"
With my local version on docker-compose the ansible plugin (nb_inventory) works perfectly.
What I can't find is the way to act on this prefix. (eg remove the /api in /api/circuits/circuit-terminations/)