POST Creates an API Manager Instance
{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis
QUERY PARAMS

orgId
envId
BODY json

{
  "technology": "",
  "endpoint": {
    "deploymentType": "",
    "muleVersion4OrAbove": false,
    "uri": "",
    "type": "",
    "isCloudHub": "",
    "proxyUri": "",
    "proxyRegistrationUri": "",
    "referencesUserDomain": "",
    "responseTimeout": "",
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "",
        "secretGroupId": "",
        "name": ""
      }
    }
  },
  "spec": {
    "assetId": "",
    "groupId": "",
    "version": ""
  },
  "routing": [
    {
      "label": "",
      "rules": {
        "methods": "",
        "host": "",
        "path": "",
        "headers": {}
      },
      "upstreams": {
        "weight": 0,
        "uri": "",
        "label": ""
      }
    }
  ],
  "deployment": {
    "environmentId": "",
    "type": "",
    "expectedStatus": "",
    "overwrite": false,
    "targetId": "",
    "targetName": "",
    "gatewayVersion": ""
  },
  "instanceLabel": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis" {:content-type :json
                                                                                                  :form-params {:technology ""
                                                                                                                :endpoint {:deploymentType ""
                                                                                                                           :muleVersion4OrAbove false
                                                                                                                           :uri ""
                                                                                                                           :type ""
                                                                                                                           :isCloudHub ""
                                                                                                                           :proxyUri ""
                                                                                                                           :proxyRegistrationUri ""
                                                                                                                           :referencesUserDomain ""
                                                                                                                           :responseTimeout ""
                                                                                                                           :tlsContexts {:inbound {:tlsContextId ""
                                                                                                                                                   :secretGroupId ""
                                                                                                                                                   :name ""}}}
                                                                                                                :spec {:assetId ""
                                                                                                                       :groupId ""
                                                                                                                       :version ""}
                                                                                                                :routing [{:label ""
                                                                                                                           :rules {:methods ""
                                                                                                                                   :host ""
                                                                                                                                   :path ""
                                                                                                                                   :headers {}}
                                                                                                                           :upstreams {:weight 0
                                                                                                                                       :uri ""
                                                                                                                                       :label ""}}]
                                                                                                                :deployment {:environmentId ""
                                                                                                                             :type ""
                                                                                                                             :expectedStatus ""
                                                                                                                             :overwrite false
                                                                                                                             :targetId ""
                                                                                                                             :targetName ""
                                                                                                                             :gatewayVersion ""}
                                                                                                                :instanceLabel ""}})
require "http/client"

url = "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis"),
    Content = new StringContent("{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis"

	payload := strings.NewReader("{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/xapi/v1/organizations/:orgId/environments/:envId/apis HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 925

{
  "technology": "",
  "endpoint": {
    "deploymentType": "",
    "muleVersion4OrAbove": false,
    "uri": "",
    "type": "",
    "isCloudHub": "",
    "proxyUri": "",
    "proxyRegistrationUri": "",
    "referencesUserDomain": "",
    "responseTimeout": "",
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "",
        "secretGroupId": "",
        "name": ""
      }
    }
  },
  "spec": {
    "assetId": "",
    "groupId": "",
    "version": ""
  },
  "routing": [
    {
      "label": "",
      "rules": {
        "methods": "",
        "host": "",
        "path": "",
        "headers": {}
      },
      "upstreams": {
        "weight": 0,
        "uri": "",
        "label": ""
      }
    }
  ],
  "deployment": {
    "environmentId": "",
    "type": "",
    "expectedStatus": "",
    "overwrite": false,
    "targetId": "",
    "targetName": "",
    "gatewayVersion": ""
  },
  "instanceLabel": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis")
  .header("content-type", "application/json")
  .body("{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  technology: '',
  endpoint: {
    deploymentType: '',
    muleVersion4OrAbove: false,
    uri: '',
    type: '',
    isCloudHub: '',
    proxyUri: '',
    proxyRegistrationUri: '',
    referencesUserDomain: '',
    responseTimeout: '',
    tlsContexts: {
      inbound: {
        tlsContextId: '',
        secretGroupId: '',
        name: ''
      }
    }
  },
  spec: {
    assetId: '',
    groupId: '',
    version: ''
  },
  routing: [
    {
      label: '',
      rules: {
        methods: '',
        host: '',
        path: '',
        headers: {}
      },
      upstreams: {
        weight: 0,
        uri: '',
        label: ''
      }
    }
  ],
  deployment: {
    environmentId: '',
    type: '',
    expectedStatus: '',
    overwrite: false,
    targetId: '',
    targetName: '',
    gatewayVersion: ''
  },
  instanceLabel: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis',
  headers: {'content-type': 'application/json'},
  data: {
    technology: '',
    endpoint: {
      deploymentType: '',
      muleVersion4OrAbove: false,
      uri: '',
      type: '',
      isCloudHub: '',
      proxyUri: '',
      proxyRegistrationUri: '',
      referencesUserDomain: '',
      responseTimeout: '',
      tlsContexts: {inbound: {tlsContextId: '', secretGroupId: '', name: ''}}
    },
    spec: {assetId: '', groupId: '', version: ''},
    routing: [
      {
        label: '',
        rules: {methods: '', host: '', path: '', headers: {}},
        upstreams: {weight: 0, uri: '', label: ''}
      }
    ],
    deployment: {
      environmentId: '',
      type: '',
      expectedStatus: '',
      overwrite: false,
      targetId: '',
      targetName: '',
      gatewayVersion: ''
    },
    instanceLabel: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"technology":"","endpoint":{"deploymentType":"","muleVersion4OrAbove":false,"uri":"","type":"","isCloudHub":"","proxyUri":"","proxyRegistrationUri":"","referencesUserDomain":"","responseTimeout":"","tlsContexts":{"inbound":{"tlsContextId":"","secretGroupId":"","name":""}}},"spec":{"assetId":"","groupId":"","version":""},"routing":[{"label":"","rules":{"methods":"","host":"","path":"","headers":{}},"upstreams":{"weight":0,"uri":"","label":""}}],"deployment":{"environmentId":"","type":"","expectedStatus":"","overwrite":false,"targetId":"","targetName":"","gatewayVersion":""},"instanceLabel":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "technology": "",\n  "endpoint": {\n    "deploymentType": "",\n    "muleVersion4OrAbove": false,\n    "uri": "",\n    "type": "",\n    "isCloudHub": "",\n    "proxyUri": "",\n    "proxyRegistrationUri": "",\n    "referencesUserDomain": "",\n    "responseTimeout": "",\n    "tlsContexts": {\n      "inbound": {\n        "tlsContextId": "",\n        "secretGroupId": "",\n        "name": ""\n      }\n    }\n  },\n  "spec": {\n    "assetId": "",\n    "groupId": "",\n    "version": ""\n  },\n  "routing": [\n    {\n      "label": "",\n      "rules": {\n        "methods": "",\n        "host": "",\n        "path": "",\n        "headers": {}\n      },\n      "upstreams": {\n        "weight": 0,\n        "uri": "",\n        "label": ""\n      }\n    }\n  ],\n  "deployment": {\n    "environmentId": "",\n    "type": "",\n    "expectedStatus": "",\n    "overwrite": false,\n    "targetId": "",\n    "targetName": "",\n    "gatewayVersion": ""\n  },\n  "instanceLabel": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/xapi/v1/organizations/:orgId/environments/:envId/apis',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  technology: '',
  endpoint: {
    deploymentType: '',
    muleVersion4OrAbove: false,
    uri: '',
    type: '',
    isCloudHub: '',
    proxyUri: '',
    proxyRegistrationUri: '',
    referencesUserDomain: '',
    responseTimeout: '',
    tlsContexts: {inbound: {tlsContextId: '', secretGroupId: '', name: ''}}
  },
  spec: {assetId: '', groupId: '', version: ''},
  routing: [
    {
      label: '',
      rules: {methods: '', host: '', path: '', headers: {}},
      upstreams: {weight: 0, uri: '', label: ''}
    }
  ],
  deployment: {
    environmentId: '',
    type: '',
    expectedStatus: '',
    overwrite: false,
    targetId: '',
    targetName: '',
    gatewayVersion: ''
  },
  instanceLabel: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis',
  headers: {'content-type': 'application/json'},
  body: {
    technology: '',
    endpoint: {
      deploymentType: '',
      muleVersion4OrAbove: false,
      uri: '',
      type: '',
      isCloudHub: '',
      proxyUri: '',
      proxyRegistrationUri: '',
      referencesUserDomain: '',
      responseTimeout: '',
      tlsContexts: {inbound: {tlsContextId: '', secretGroupId: '', name: ''}}
    },
    spec: {assetId: '', groupId: '', version: ''},
    routing: [
      {
        label: '',
        rules: {methods: '', host: '', path: '', headers: {}},
        upstreams: {weight: 0, uri: '', label: ''}
      }
    ],
    deployment: {
      environmentId: '',
      type: '',
      expectedStatus: '',
      overwrite: false,
      targetId: '',
      targetName: '',
      gatewayVersion: ''
    },
    instanceLabel: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  technology: '',
  endpoint: {
    deploymentType: '',
    muleVersion4OrAbove: false,
    uri: '',
    type: '',
    isCloudHub: '',
    proxyUri: '',
    proxyRegistrationUri: '',
    referencesUserDomain: '',
    responseTimeout: '',
    tlsContexts: {
      inbound: {
        tlsContextId: '',
        secretGroupId: '',
        name: ''
      }
    }
  },
  spec: {
    assetId: '',
    groupId: '',
    version: ''
  },
  routing: [
    {
      label: '',
      rules: {
        methods: '',
        host: '',
        path: '',
        headers: {}
      },
      upstreams: {
        weight: 0,
        uri: '',
        label: ''
      }
    }
  ],
  deployment: {
    environmentId: '',
    type: '',
    expectedStatus: '',
    overwrite: false,
    targetId: '',
    targetName: '',
    gatewayVersion: ''
  },
  instanceLabel: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis',
  headers: {'content-type': 'application/json'},
  data: {
    technology: '',
    endpoint: {
      deploymentType: '',
      muleVersion4OrAbove: false,
      uri: '',
      type: '',
      isCloudHub: '',
      proxyUri: '',
      proxyRegistrationUri: '',
      referencesUserDomain: '',
      responseTimeout: '',
      tlsContexts: {inbound: {tlsContextId: '', secretGroupId: '', name: ''}}
    },
    spec: {assetId: '', groupId: '', version: ''},
    routing: [
      {
        label: '',
        rules: {methods: '', host: '', path: '', headers: {}},
        upstreams: {weight: 0, uri: '', label: ''}
      }
    ],
    deployment: {
      environmentId: '',
      type: '',
      expectedStatus: '',
      overwrite: false,
      targetId: '',
      targetName: '',
      gatewayVersion: ''
    },
    instanceLabel: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"technology":"","endpoint":{"deploymentType":"","muleVersion4OrAbove":false,"uri":"","type":"","isCloudHub":"","proxyUri":"","proxyRegistrationUri":"","referencesUserDomain":"","responseTimeout":"","tlsContexts":{"inbound":{"tlsContextId":"","secretGroupId":"","name":""}}},"spec":{"assetId":"","groupId":"","version":""},"routing":[{"label":"","rules":{"methods":"","host":"","path":"","headers":{}},"upstreams":{"weight":0,"uri":"","label":""}}],"deployment":{"environmentId":"","type":"","expectedStatus":"","overwrite":false,"targetId":"","targetName":"","gatewayVersion":""},"instanceLabel":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"technology": @"",
                              @"endpoint": @{ @"deploymentType": @"", @"muleVersion4OrAbove": @NO, @"uri": @"", @"type": @"", @"isCloudHub": @"", @"proxyUri": @"", @"proxyRegistrationUri": @"", @"referencesUserDomain": @"", @"responseTimeout": @"", @"tlsContexts": @{ @"inbound": @{ @"tlsContextId": @"", @"secretGroupId": @"", @"name": @"" } } },
                              @"spec": @{ @"assetId": @"", @"groupId": @"", @"version": @"" },
                              @"routing": @[ @{ @"label": @"", @"rules": @{ @"methods": @"", @"host": @"", @"path": @"", @"headers": @{  } }, @"upstreams": @{ @"weight": @0, @"uri": @"", @"label": @"" } } ],
                              @"deployment": @{ @"environmentId": @"", @"type": @"", @"expectedStatus": @"", @"overwrite": @NO, @"targetId": @"", @"targetName": @"", @"gatewayVersion": @"" },
                              @"instanceLabel": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'technology' => '',
    'endpoint' => [
        'deploymentType' => '',
        'muleVersion4OrAbove' => null,
        'uri' => '',
        'type' => '',
        'isCloudHub' => '',
        'proxyUri' => '',
        'proxyRegistrationUri' => '',
        'referencesUserDomain' => '',
        'responseTimeout' => '',
        'tlsContexts' => [
                'inbound' => [
                                'tlsContextId' => '',
                                'secretGroupId' => '',
                                'name' => ''
                ]
        ]
    ],
    'spec' => [
        'assetId' => '',
        'groupId' => '',
        'version' => ''
    ],
    'routing' => [
        [
                'label' => '',
                'rules' => [
                                'methods' => '',
                                'host' => '',
                                'path' => '',
                                'headers' => [
                                                                
                                ]
                ],
                'upstreams' => [
                                'weight' => 0,
                                'uri' => '',
                                'label' => ''
                ]
        ]
    ],
    'deployment' => [
        'environmentId' => '',
        'type' => '',
        'expectedStatus' => '',
        'overwrite' => null,
        'targetId' => '',
        'targetName' => '',
        'gatewayVersion' => ''
    ],
    'instanceLabel' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis', [
  'body' => '{
  "technology": "",
  "endpoint": {
    "deploymentType": "",
    "muleVersion4OrAbove": false,
    "uri": "",
    "type": "",
    "isCloudHub": "",
    "proxyUri": "",
    "proxyRegistrationUri": "",
    "referencesUserDomain": "",
    "responseTimeout": "",
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "",
        "secretGroupId": "",
        "name": ""
      }
    }
  },
  "spec": {
    "assetId": "",
    "groupId": "",
    "version": ""
  },
  "routing": [
    {
      "label": "",
      "rules": {
        "methods": "",
        "host": "",
        "path": "",
        "headers": {}
      },
      "upstreams": {
        "weight": 0,
        "uri": "",
        "label": ""
      }
    }
  ],
  "deployment": {
    "environmentId": "",
    "type": "",
    "expectedStatus": "",
    "overwrite": false,
    "targetId": "",
    "targetName": "",
    "gatewayVersion": ""
  },
  "instanceLabel": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'technology' => '',
  'endpoint' => [
    'deploymentType' => '',
    'muleVersion4OrAbove' => null,
    'uri' => '',
    'type' => '',
    'isCloudHub' => '',
    'proxyUri' => '',
    'proxyRegistrationUri' => '',
    'referencesUserDomain' => '',
    'responseTimeout' => '',
    'tlsContexts' => [
        'inbound' => [
                'tlsContextId' => '',
                'secretGroupId' => '',
                'name' => ''
        ]
    ]
  ],
  'spec' => [
    'assetId' => '',
    'groupId' => '',
    'version' => ''
  ],
  'routing' => [
    [
        'label' => '',
        'rules' => [
                'methods' => '',
                'host' => '',
                'path' => '',
                'headers' => [
                                
                ]
        ],
        'upstreams' => [
                'weight' => 0,
                'uri' => '',
                'label' => ''
        ]
    ]
  ],
  'deployment' => [
    'environmentId' => '',
    'type' => '',
    'expectedStatus' => '',
    'overwrite' => null,
    'targetId' => '',
    'targetName' => '',
    'gatewayVersion' => ''
  ],
  'instanceLabel' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'technology' => '',
  'endpoint' => [
    'deploymentType' => '',
    'muleVersion4OrAbove' => null,
    'uri' => '',
    'type' => '',
    'isCloudHub' => '',
    'proxyUri' => '',
    'proxyRegistrationUri' => '',
    'referencesUserDomain' => '',
    'responseTimeout' => '',
    'tlsContexts' => [
        'inbound' => [
                'tlsContextId' => '',
                'secretGroupId' => '',
                'name' => ''
        ]
    ]
  ],
  'spec' => [
    'assetId' => '',
    'groupId' => '',
    'version' => ''
  ],
  'routing' => [
    [
        'label' => '',
        'rules' => [
                'methods' => '',
                'host' => '',
                'path' => '',
                'headers' => [
                                
                ]
        ],
        'upstreams' => [
                'weight' => 0,
                'uri' => '',
                'label' => ''
        ]
    ]
  ],
  'deployment' => [
    'environmentId' => '',
    'type' => '',
    'expectedStatus' => '',
    'overwrite' => null,
    'targetId' => '',
    'targetName' => '',
    'gatewayVersion' => ''
  ],
  'instanceLabel' => ''
]));
$request->setRequestUrl('{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "technology": "",
  "endpoint": {
    "deploymentType": "",
    "muleVersion4OrAbove": false,
    "uri": "",
    "type": "",
    "isCloudHub": "",
    "proxyUri": "",
    "proxyRegistrationUri": "",
    "referencesUserDomain": "",
    "responseTimeout": "",
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "",
        "secretGroupId": "",
        "name": ""
      }
    }
  },
  "spec": {
    "assetId": "",
    "groupId": "",
    "version": ""
  },
  "routing": [
    {
      "label": "",
      "rules": {
        "methods": "",
        "host": "",
        "path": "",
        "headers": {}
      },
      "upstreams": {
        "weight": 0,
        "uri": "",
        "label": ""
      }
    }
  ],
  "deployment": {
    "environmentId": "",
    "type": "",
    "expectedStatus": "",
    "overwrite": false,
    "targetId": "",
    "targetName": "",
    "gatewayVersion": ""
  },
  "instanceLabel": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "technology": "",
  "endpoint": {
    "deploymentType": "",
    "muleVersion4OrAbove": false,
    "uri": "",
    "type": "",
    "isCloudHub": "",
    "proxyUri": "",
    "proxyRegistrationUri": "",
    "referencesUserDomain": "",
    "responseTimeout": "",
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "",
        "secretGroupId": "",
        "name": ""
      }
    }
  },
  "spec": {
    "assetId": "",
    "groupId": "",
    "version": ""
  },
  "routing": [
    {
      "label": "",
      "rules": {
        "methods": "",
        "host": "",
        "path": "",
        "headers": {}
      },
      "upstreams": {
        "weight": 0,
        "uri": "",
        "label": ""
      }
    }
  ],
  "deployment": {
    "environmentId": "",
    "type": "",
    "expectedStatus": "",
    "overwrite": false,
    "targetId": "",
    "targetName": "",
    "gatewayVersion": ""
  },
  "instanceLabel": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/xapi/v1/organizations/:orgId/environments/:envId/apis", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis"

payload = {
    "technology": "",
    "endpoint": {
        "deploymentType": "",
        "muleVersion4OrAbove": False,
        "uri": "",
        "type": "",
        "isCloudHub": "",
        "proxyUri": "",
        "proxyRegistrationUri": "",
        "referencesUserDomain": "",
        "responseTimeout": "",
        "tlsContexts": { "inbound": {
                "tlsContextId": "",
                "secretGroupId": "",
                "name": ""
            } }
    },
    "spec": {
        "assetId": "",
        "groupId": "",
        "version": ""
    },
    "routing": [
        {
            "label": "",
            "rules": {
                "methods": "",
                "host": "",
                "path": "",
                "headers": {}
            },
            "upstreams": {
                "weight": 0,
                "uri": "",
                "label": ""
            }
        }
    ],
    "deployment": {
        "environmentId": "",
        "type": "",
        "expectedStatus": "",
        "overwrite": False,
        "targetId": "",
        "targetName": "",
        "gatewayVersion": ""
    },
    "instanceLabel": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis"

payload <- "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/xapi/v1/organizations/:orgId/environments/:envId/apis') do |req|
  req.body = "{\n  \"technology\": \"\",\n  \"endpoint\": {\n    \"deploymentType\": \"\",\n    \"muleVersion4OrAbove\": false,\n    \"uri\": \"\",\n    \"type\": \"\",\n    \"isCloudHub\": \"\",\n    \"proxyUri\": \"\",\n    \"proxyRegistrationUri\": \"\",\n    \"referencesUserDomain\": \"\",\n    \"responseTimeout\": \"\",\n    \"tlsContexts\": {\n      \"inbound\": {\n        \"tlsContextId\": \"\",\n        \"secretGroupId\": \"\",\n        \"name\": \"\"\n      }\n    }\n  },\n  \"spec\": {\n    \"assetId\": \"\",\n    \"groupId\": \"\",\n    \"version\": \"\"\n  },\n  \"routing\": [\n    {\n      \"label\": \"\",\n      \"rules\": {\n        \"methods\": \"\",\n        \"host\": \"\",\n        \"path\": \"\",\n        \"headers\": {}\n      },\n      \"upstreams\": {\n        \"weight\": 0,\n        \"uri\": \"\",\n        \"label\": \"\"\n      }\n    }\n  ],\n  \"deployment\": {\n    \"environmentId\": \"\",\n    \"type\": \"\",\n    \"expectedStatus\": \"\",\n    \"overwrite\": false,\n    \"targetId\": \"\",\n    \"targetName\": \"\",\n    \"gatewayVersion\": \"\"\n  },\n  \"instanceLabel\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis";

    let payload = json!({
        "technology": "",
        "endpoint": json!({
            "deploymentType": "",
            "muleVersion4OrAbove": false,
            "uri": "",
            "type": "",
            "isCloudHub": "",
            "proxyUri": "",
            "proxyRegistrationUri": "",
            "referencesUserDomain": "",
            "responseTimeout": "",
            "tlsContexts": json!({"inbound": json!({
                    "tlsContextId": "",
                    "secretGroupId": "",
                    "name": ""
                })})
        }),
        "spec": json!({
            "assetId": "",
            "groupId": "",
            "version": ""
        }),
        "routing": (
            json!({
                "label": "",
                "rules": json!({
                    "methods": "",
                    "host": "",
                    "path": "",
                    "headers": json!({})
                }),
                "upstreams": json!({
                    "weight": 0,
                    "uri": "",
                    "label": ""
                })
            })
        ),
        "deployment": json!({
            "environmentId": "",
            "type": "",
            "expectedStatus": "",
            "overwrite": false,
            "targetId": "",
            "targetName": "",
            "gatewayVersion": ""
        }),
        "instanceLabel": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis \
  --header 'content-type: application/json' \
  --data '{
  "technology": "",
  "endpoint": {
    "deploymentType": "",
    "muleVersion4OrAbove": false,
    "uri": "",
    "type": "",
    "isCloudHub": "",
    "proxyUri": "",
    "proxyRegistrationUri": "",
    "referencesUserDomain": "",
    "responseTimeout": "",
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "",
        "secretGroupId": "",
        "name": ""
      }
    }
  },
  "spec": {
    "assetId": "",
    "groupId": "",
    "version": ""
  },
  "routing": [
    {
      "label": "",
      "rules": {
        "methods": "",
        "host": "",
        "path": "",
        "headers": {}
      },
      "upstreams": {
        "weight": 0,
        "uri": "",
        "label": ""
      }
    }
  ],
  "deployment": {
    "environmentId": "",
    "type": "",
    "expectedStatus": "",
    "overwrite": false,
    "targetId": "",
    "targetName": "",
    "gatewayVersion": ""
  },
  "instanceLabel": ""
}'
echo '{
  "technology": "",
  "endpoint": {
    "deploymentType": "",
    "muleVersion4OrAbove": false,
    "uri": "",
    "type": "",
    "isCloudHub": "",
    "proxyUri": "",
    "proxyRegistrationUri": "",
    "referencesUserDomain": "",
    "responseTimeout": "",
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "",
        "secretGroupId": "",
        "name": ""
      }
    }
  },
  "spec": {
    "assetId": "",
    "groupId": "",
    "version": ""
  },
  "routing": [
    {
      "label": "",
      "rules": {
        "methods": "",
        "host": "",
        "path": "",
        "headers": {}
      },
      "upstreams": {
        "weight": 0,
        "uri": "",
        "label": ""
      }
    }
  ],
  "deployment": {
    "environmentId": "",
    "type": "",
    "expectedStatus": "",
    "overwrite": false,
    "targetId": "",
    "targetName": "",
    "gatewayVersion": ""
  },
  "instanceLabel": ""
}' |  \
  http POST {{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "technology": "",\n  "endpoint": {\n    "deploymentType": "",\n    "muleVersion4OrAbove": false,\n    "uri": "",\n    "type": "",\n    "isCloudHub": "",\n    "proxyUri": "",\n    "proxyRegistrationUri": "",\n    "referencesUserDomain": "",\n    "responseTimeout": "",\n    "tlsContexts": {\n      "inbound": {\n        "tlsContextId": "",\n        "secretGroupId": "",\n        "name": ""\n      }\n    }\n  },\n  "spec": {\n    "assetId": "",\n    "groupId": "",\n    "version": ""\n  },\n  "routing": [\n    {\n      "label": "",\n      "rules": {\n        "methods": "",\n        "host": "",\n        "path": "",\n        "headers": {}\n      },\n      "upstreams": {\n        "weight": 0,\n        "uri": "",\n        "label": ""\n      }\n    }\n  ],\n  "deployment": {\n    "environmentId": "",\n    "type": "",\n    "expectedStatus": "",\n    "overwrite": false,\n    "targetId": "",\n    "targetName": "",\n    "gatewayVersion": ""\n  },\n  "instanceLabel": ""\n}' \
  --output-document \
  - {{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "technology": "",
  "endpoint": [
    "deploymentType": "",
    "muleVersion4OrAbove": false,
    "uri": "",
    "type": "",
    "isCloudHub": "",
    "proxyUri": "",
    "proxyRegistrationUri": "",
    "referencesUserDomain": "",
    "responseTimeout": "",
    "tlsContexts": ["inbound": [
        "tlsContextId": "",
        "secretGroupId": "",
        "name": ""
      ]]
  ],
  "spec": [
    "assetId": "",
    "groupId": "",
    "version": ""
  ],
  "routing": [
    [
      "label": "",
      "rules": [
        "methods": "",
        "host": "",
        "path": "",
        "headers": []
      ],
      "upstreams": [
        "weight": 0,
        "uri": "",
        "label": ""
      ]
    ]
  ],
  "deployment": [
    "environmentId": "",
    "type": "",
    "expectedStatus": "",
    "overwrite": false,
    "targetId": "",
    "targetName": "",
    "gatewayVersion": ""
  ],
  "instanceLabel": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "autodiscoveryInstanceName": "autodiscoveryInstanceName",
  "groupId": "groupId",
  "technology": "technology",
  "masterOrganizationId": "masterOrganizationId",
  "tags": [
    "tags",
    "tags"
  ],
  "organizationId": "organizationId",
  "productVersion": "productVersion",
  "endpoint": {
    "console": "console",
    "referencesUserDomain": "referencesUserDomain",
    "lastActiveDate": "lastActiveDate",
    "apiVersionId": 5,
    "type": "type",
    "uri": "uri",
    "apiGatewayVersion": "apiGatewayVersion",
    "deploymentType": "deploymentType",
    "audit": {
      "created": {
        "date": "date"
      },
      "updated": {
        "date": "date"
      }
    },
    "muleVersion4OrAbove": true,
    "proxyUri": "proxyUri",
    "policiesVersion": "policiesVersion",
    "wsdlConfig": "wsdlConfig",
    "id": 1,
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "tlsContextId",
        "authorized": true,
        "name": "name",
        "secretGroupId": "secretGroupId"
      },
      "audit": {
        "created": {
          "date": "date"
        },
        "updated": {
          "date": "date"
        }
      },
      "outbound": "{}"
    },
    "isCloudHub": "isCloudHub",
    "proxyRegistrationUri": "proxyRegistrationUri",
    "responseTimeout": "responseTimeout",
    "validation": "validation"
  },
  "environmentId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "stage": "stage",
  "providerId": "providerId",
  "audit": {
    "created": {
      "date": "date"
    },
    "updated": {
      "date": "date"
    }
  },
  "assetId": "assetId",
  "assetVersion": "assetVersion",
  "instanceLabel": "instanceLabel",
  "id": 6,
  "order": 0
}
DELETE Delete a specific API Manager Instance
{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId
QUERY PARAMS

orgId
envId
envApiId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
require "http/client"

url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');

echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId
http DELETE {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
PATCH Patches a specific API Manager Instance
{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId
QUERY PARAMS

orgId
envId
envApiId
BODY json

{}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId" {:content-type :json})
require "http/client"

url = "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId"),
    Content = new StringContent("{}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2

{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .setHeader("content-type", "application/json")
  .setBody("{}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .header("content-type", "application/json")
  .body("{}")
  .asString();
const data = JSON.stringify({});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  headers: {'content-type': 'application/json'},
  data: {}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId';
const options = {method: 'PATCH', headers: {'content-type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
  .url("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  headers: {'content-type': 'application/json'},
  body: {},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  headers: {'content-type': 'application/json'},
  data: {}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId';
const options = {method: 'PATCH', headers: {'content-type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{  };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId', [
  'body' => '{}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  
]));
$request->setRequestUrl('{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

payload = {}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

payload <- "{}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId') do |req|
  req.body = "{}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId";

    let payload = json!({});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId \
  --header 'content-type: application/json' \
  --data '{}'
echo '{}' |  \
  http PATCH {{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{}' \
  --output-document \
  - {{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/xapi/v1/organizations/:orgId/environments/:envId/apis/:envApiId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "organizationId": "organizationId",
  "routing": [
    {
      "upstreams": [
        {
          "weight": 7,
          "id": "id",
          "label": "label",
          "uri": "uri"
        },
        {
          "weight": 7,
          "id": "id",
          "label": "label",
          "uri": "uri"
        }
      ],
      "rules": {
        "path": "path",
        "headers": "{}",
        "methods": "methods",
        "host": "host"
      },
      "label": "label"
    },
    {
      "upstreams": [
        {
          "weight": 7,
          "id": "id",
          "label": "label",
          "uri": "uri"
        },
        {
          "weight": 7,
          "id": "id",
          "label": "label",
          "uri": "uri"
        }
      ],
      "rules": {
        "path": "path",
        "headers": "{}",
        "methods": "methods",
        "host": "host"
      },
      "label": "label"
    }
  ],
  "endpoint": {
    "console": "console",
    "referencesUserDomain": "referencesUserDomain",
    "lastActiveDate": "lastActiveDate",
    "apiVersionId": 5,
    "type": "type",
    "uri": "uri",
    "apiGatewayVersion": "apiGatewayVersion",
    "deploymentType": "deploymentType",
    "audit": {
      "created": {
        "date": "date"
      },
      "updated": {
        "date": "date"
      }
    },
    "muleVersion4OrAbove": true,
    "proxyUri": "proxyUri",
    "policiesVersion": "policiesVersion",
    "wsdlConfig": "wsdlConfig",
    "id": 1,
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "tlsContextId",
        "authorized": true,
        "name": "name",
        "secretGroupId": "secretGroupId"
      },
      "audit": {
        "created": {
          "date": "date"
        },
        "updated": {
          "date": "date"
        }
      },
      "outbound": "{}"
    },
    "isCloudHub": "isCloudHub",
    "proxyRegistrationUri": "proxyRegistrationUri",
    "responseTimeout": "responseTimeout",
    "validation": "validation"
  },
  "environmentId": "environmentId",
  "audit": {
    "created": {
      "date": "date"
    },
    "updated": {
      "date": "date"
    }
  },
  "providerId": "providerId",
  "id": 0,
  "instanceLabel": "instanceLabel",
  "endpointUri": "endpointUri",
  "technology": "technology",
  "masterOrganizationId": "masterOrganizationId",
  "deployment": {
    "targetName": "targetName",
    "targetId": "targetId",
    "expectedStatus": "expectedStatus",
    "updatedDate": "updatedDate",
    "type": "type",
    "environmentId": "environmentId",
    "audit": {
      "created": {
        "date": "date"
      },
      "updated": {
        "date": "date"
      }
    },
    "environmentName": "environmentName",
    "deploymentId": "deploymentId",
    "id": 5,
    "applicationId": "applicationId",
    "gatewayVersion": "gatewayVersion",
    "applicationName": "applicationName",
    "apiId": 2
  }
}
GET Retrieves a collection of API Manager Instances
{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis
QUERY PARAMS

orgId
envId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis")
require "http/client"

url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/api/v1/organizations/:orgId/environments/:envId/apis HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis');

echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis
http GET {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "total": 0,
  "assets": [
    {
      "organizationId": "organizationId",
      "totalApis": 3,
      "apis": [
        {
          "pinned": true,
          "autodiscoveryInstanceName": "autodiscoveryInstanceName",
          "groupId": "groupId",
          "deprecated": true,
          "description": "description",
          "lastActiveDate": "lastActiveDate",
          "masterOrganizationId": "masterOrganizationId",
          "organizationId": "organizationId",
          "routing": [
            {
              "upstreams": [
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                },
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                }
              ],
              "rules": {
                "path": "path",
                "headers": "{}",
                "methods": "methods",
                "host": "host"
              },
              "label": "label"
            },
            {
              "upstreams": [
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                },
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                }
              ],
              "rules": {
                "path": "path",
                "headers": "{}",
                "methods": "methods",
                "host": "host"
              },
              "label": "label"
            }
          ],
          "productVersion": "productVersion",
          "activeContractsCount": 9,
          "environmentId": "environmentId",
          "audit": {
            "created": {
              "date": "date"
            },
            "updated": {
              "date": "date"
            }
          },
          "assetId": "assetId",
          "providerId": "providerId",
          "isPublic": true,
          "id": 1,
          "instanceLabel": "instanceLabel",
          "endpointUri": "endpointUri",
          "order": 5,
          "deployment": {
            "targetName": "targetName",
            "targetId": "targetId",
            "expectedStatus": "expectedStatus",
            "updatedDate": "updatedDate",
            "type": "type",
            "environmentId": "environmentId",
            "audit": {
              "created": {
                "date": "date"
              },
              "updated": {
                "date": "date"
              }
            },
            "environmentName": "environmentName",
            "deploymentId": "deploymentId",
            "id": 5,
            "applicationId": "applicationId",
            "gatewayVersion": "gatewayVersion",
            "applicationName": "applicationName",
            "apiId": 2
          },
          "technology": "technology",
          "tags": [
            "tags",
            "tags"
          ],
          "stage": "stage",
          "assetVersion": "assetVersion",
          "status": "status"
        },
        {
          "pinned": true,
          "autodiscoveryInstanceName": "autodiscoveryInstanceName",
          "groupId": "groupId",
          "deprecated": true,
          "description": "description",
          "lastActiveDate": "lastActiveDate",
          "masterOrganizationId": "masterOrganizationId",
          "organizationId": "organizationId",
          "routing": [
            {
              "upstreams": [
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                },
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                }
              ],
              "rules": {
                "path": "path",
                "headers": "{}",
                "methods": "methods",
                "host": "host"
              },
              "label": "label"
            },
            {
              "upstreams": [
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                },
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                }
              ],
              "rules": {
                "path": "path",
                "headers": "{}",
                "methods": "methods",
                "host": "host"
              },
              "label": "label"
            }
          ],
          "productVersion": "productVersion",
          "activeContractsCount": 9,
          "environmentId": "environmentId",
          "audit": {
            "created": {
              "date": "date"
            },
            "updated": {
              "date": "date"
            }
          },
          "assetId": "assetId",
          "providerId": "providerId",
          "isPublic": true,
          "id": 1,
          "instanceLabel": "instanceLabel",
          "endpointUri": "endpointUri",
          "order": 5,
          "deployment": {
            "targetName": "targetName",
            "targetId": "targetId",
            "expectedStatus": "expectedStatus",
            "updatedDate": "updatedDate",
            "type": "type",
            "environmentId": "environmentId",
            "audit": {
              "created": {
                "date": "date"
              },
              "updated": {
                "date": "date"
              }
            },
            "environmentName": "environmentName",
            "deploymentId": "deploymentId",
            "id": 5,
            "applicationId": "applicationId",
            "gatewayVersion": "gatewayVersion",
            "applicationName": "applicationName",
            "apiId": 2
          },
          "technology": "technology",
          "tags": [
            "tags",
            "tags"
          ],
          "stage": "stage",
          "assetVersion": "assetVersion",
          "status": "status"
        }
      ],
      "audit": {
        "created": {
          "date": "date"
        },
        "updated": {
          "date": "date"
        }
      },
      "assetId": "assetId",
      "groupId": "groupId",
      "name": "name",
      "id": 6,
      "exchangeAssetName": "exchangeAssetName",
      "masterOrganizationId": "masterOrganizationId",
      "autodiscoveryApiName": "autodiscoveryApiName"
    },
    {
      "organizationId": "organizationId",
      "totalApis": 3,
      "apis": [
        {
          "pinned": true,
          "autodiscoveryInstanceName": "autodiscoveryInstanceName",
          "groupId": "groupId",
          "deprecated": true,
          "description": "description",
          "lastActiveDate": "lastActiveDate",
          "masterOrganizationId": "masterOrganizationId",
          "organizationId": "organizationId",
          "routing": [
            {
              "upstreams": [
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                },
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                }
              ],
              "rules": {
                "path": "path",
                "headers": "{}",
                "methods": "methods",
                "host": "host"
              },
              "label": "label"
            },
            {
              "upstreams": [
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                },
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                }
              ],
              "rules": {
                "path": "path",
                "headers": "{}",
                "methods": "methods",
                "host": "host"
              },
              "label": "label"
            }
          ],
          "productVersion": "productVersion",
          "activeContractsCount": 9,
          "environmentId": "environmentId",
          "audit": {
            "created": {
              "date": "date"
            },
            "updated": {
              "date": "date"
            }
          },
          "assetId": "assetId",
          "providerId": "providerId",
          "isPublic": true,
          "id": 1,
          "instanceLabel": "instanceLabel",
          "endpointUri": "endpointUri",
          "order": 5,
          "deployment": {
            "targetName": "targetName",
            "targetId": "targetId",
            "expectedStatus": "expectedStatus",
            "updatedDate": "updatedDate",
            "type": "type",
            "environmentId": "environmentId",
            "audit": {
              "created": {
                "date": "date"
              },
              "updated": {
                "date": "date"
              }
            },
            "environmentName": "environmentName",
            "deploymentId": "deploymentId",
            "id": 5,
            "applicationId": "applicationId",
            "gatewayVersion": "gatewayVersion",
            "applicationName": "applicationName",
            "apiId": 2
          },
          "technology": "technology",
          "tags": [
            "tags",
            "tags"
          ],
          "stage": "stage",
          "assetVersion": "assetVersion",
          "status": "status"
        },
        {
          "pinned": true,
          "autodiscoveryInstanceName": "autodiscoveryInstanceName",
          "groupId": "groupId",
          "deprecated": true,
          "description": "description",
          "lastActiveDate": "lastActiveDate",
          "masterOrganizationId": "masterOrganizationId",
          "organizationId": "organizationId",
          "routing": [
            {
              "upstreams": [
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                },
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                }
              ],
              "rules": {
                "path": "path",
                "headers": "{}",
                "methods": "methods",
                "host": "host"
              },
              "label": "label"
            },
            {
              "upstreams": [
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                },
                {
                  "weight": 7,
                  "id": "id",
                  "label": "label",
                  "uri": "uri"
                }
              ],
              "rules": {
                "path": "path",
                "headers": "{}",
                "methods": "methods",
                "host": "host"
              },
              "label": "label"
            }
          ],
          "productVersion": "productVersion",
          "activeContractsCount": 9,
          "environmentId": "environmentId",
          "audit": {
            "created": {
              "date": "date"
            },
            "updated": {
              "date": "date"
            }
          },
          "assetId": "assetId",
          "providerId": "providerId",
          "isPublic": true,
          "id": 1,
          "instanceLabel": "instanceLabel",
          "endpointUri": "endpointUri",
          "order": 5,
          "deployment": {
            "targetName": "targetName",
            "targetId": "targetId",
            "expectedStatus": "expectedStatus",
            "updatedDate": "updatedDate",
            "type": "type",
            "environmentId": "environmentId",
            "audit": {
              "created": {
                "date": "date"
              },
              "updated": {
                "date": "date"
              }
            },
            "environmentName": "environmentName",
            "deploymentId": "deploymentId",
            "id": 5,
            "applicationId": "applicationId",
            "gatewayVersion": "gatewayVersion",
            "applicationName": "applicationName",
            "apiId": 2
          },
          "technology": "technology",
          "tags": [
            "tags",
            "tags"
          ],
          "stage": "stage",
          "assetVersion": "assetVersion",
          "status": "status"
        }
      ],
      "audit": {
        "created": {
          "date": "date"
        },
        "updated": {
          "date": "date"
        }
      },
      "assetId": "assetId",
      "groupId": "groupId",
      "name": "name",
      "id": 6,
      "exchangeAssetName": "exchangeAssetName",
      "masterOrganizationId": "masterOrganizationId",
      "autodiscoveryApiName": "autodiscoveryApiName"
    }
  ]
}
GET Retrieves a specific API Manager Instance
{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId
QUERY PARAMS

orgId
envId
envApiId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
require "http/client"

url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');

echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId
http GET {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/organizations/:orgId/environments/:envId/apis/:envApiId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "autodiscoveryInstanceName": "autodiscoveryInstanceName",
  "groupId": "groupId",
  "deprecated": true,
  "description": "description",
  "lastActiveDate": "lastActiveDate",
  "masterOrganizationId": "masterOrganizationId",
  "organizationId": "organizationId",
  "routing": [
    {
      "upstreams": [
        {
          "weight": 7,
          "id": "id",
          "label": "label",
          "uri": "uri"
        },
        {
          "weight": 7,
          "id": "id",
          "label": "label",
          "uri": "uri"
        }
      ],
      "rules": {
        "path": "path",
        "headers": "{}",
        "methods": "methods",
        "host": "host"
      },
      "label": "label"
    },
    {
      "upstreams": [
        {
          "weight": 7,
          "id": "id",
          "label": "label",
          "uri": "uri"
        },
        {
          "weight": 7,
          "id": "id",
          "label": "label",
          "uri": "uri"
        }
      ],
      "rules": {
        "path": "path",
        "headers": "{}",
        "methods": "methods",
        "host": "host"
      },
      "label": "label"
    }
  ],
  "productVersion": "productVersion",
  "endpoint": {
    "console": "console",
    "referencesUserDomain": "referencesUserDomain",
    "lastActiveDate": "lastActiveDate",
    "apiVersionId": 5,
    "type": "type",
    "uri": "uri",
    "apiGatewayVersion": "apiGatewayVersion",
    "deploymentType": "deploymentType",
    "audit": {
      "created": {
        "date": "date"
      },
      "updated": {
        "date": "date"
      }
    },
    "muleVersion4OrAbove": true,
    "proxyUri": "proxyUri",
    "policiesVersion": "policiesVersion",
    "wsdlConfig": "wsdlConfig",
    "id": 1,
    "tlsContexts": {
      "inbound": {
        "tlsContextId": "tlsContextId",
        "authorized": true,
        "name": "name",
        "secretGroupId": "secretGroupId"
      },
      "audit": {
        "created": {
          "date": "date"
        },
        "updated": {
          "date": "date"
        }
      },
      "outbound": "{}"
    },
    "isCloudHub": "isCloudHub",
    "proxyRegistrationUri": "proxyRegistrationUri",
    "responseTimeout": "responseTimeout",
    "validation": "validation"
  },
  "environmentId": "environmentId",
  "audit": {
    "created": {
      "date": "date"
    },
    "updated": {
      "date": "date"
    }
  },
  "assetId": "assetId",
  "providerId": "providerId",
  "isPublic": true,
  "id": 0,
  "instanceLabel": "instanceLabel",
  "endpointUri": "endpointUri",
  "order": 6,
  "deployment": {
    "targetName": "targetName",
    "targetId": "targetId",
    "expectedStatus": "expectedStatus",
    "updatedDate": "updatedDate",
    "type": "type",
    "environmentId": "environmentId",
    "audit": {
      "created": {
        "date": "date"
      },
      "updated": {
        "date": "date"
      }
    },
    "environmentName": "environmentName",
    "deploymentId": "deploymentId",
    "id": 5,
    "applicationId": "applicationId",
    "gatewayVersion": "gatewayVersion",
    "applicationName": "applicationName",
    "apiId": 2
  },
  "technology": "technology",
  "tags": [
    "tags",
    "tags"
  ],
  "stage": "stage",
  "assetVersion": "assetVersion",
  "status": "status"
}