NVIDIA TAO DNN API
GET
Get action specs schema
{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema
QUERY PARAMS
neural_network_name
action_name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema")
require "http/client"
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema"
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/neural_networks/:neural_network_name/actions/:action_name:schema"),
};
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/neural_networks/:neural_network_name/actions/:action_name:schema");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema"
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/neural_networks/:neural_network_name/actions/:action_name:schema HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema"))
.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/neural_networks/:neural_network_name/actions/:action_name:schema")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema")
.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/neural_networks/:neural_network_name/actions/:action_name:schema');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema';
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/neural_networks/:neural_network_name/actions/:action_name:schema',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema")
.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/neural_networks/:neural_network_name/actions/:action_name:schema',
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/neural_networks/:neural_network_name/actions/:action_name:schema'
};
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/neural_networks/:neural_network_name/actions/:action_name:schema');
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/neural_networks/:neural_network_name/actions/:action_name:schema'
};
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/neural_networks/:neural_network_name/actions/:action_name:schema';
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/neural_networks/:neural_network_name/actions/:action_name:schema"]
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/neural_networks/:neural_network_name/actions/:action_name:schema" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema",
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/neural_networks/:neural_network_name/actions/:action_name:schema');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema")
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/neural_networks/:neural_network_name/actions/:action_name:schema') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema";
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/neural_networks/:neural_network_name/actions/:action_name:schema
http GET {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:schema")! 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()
GET
Get job status
{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id
QUERY PARAMS
neural_network_name
action_name
job_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id")
require "http/client"
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id"
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/neural_networks/:neural_network_name/actions/:action_name/:job_id"),
};
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/neural_networks/:neural_network_name/actions/:action_name/:job_id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id"
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/neural_networks/:neural_network_name/actions/:action_name/:job_id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id"))
.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/neural_networks/:neural_network_name/actions/:action_name/:job_id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id")
.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/neural_networks/:neural_network_name/actions/:action_name/:job_id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id';
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/neural_networks/:neural_network_name/actions/:action_name/:job_id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id")
.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/neural_networks/:neural_network_name/actions/:action_name/:job_id',
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/neural_networks/:neural_network_name/actions/:action_name/:job_id'
};
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/neural_networks/:neural_network_name/actions/:action_name/:job_id');
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/neural_networks/:neural_network_name/actions/:action_name/:job_id'
};
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/neural_networks/:neural_network_name/actions/:action_name/:job_id';
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/neural_networks/:neural_network_name/actions/:action_name/:job_id"]
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/neural_networks/:neural_network_name/actions/:action_name/:job_id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id",
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/neural_networks/:neural_network_name/actions/:action_name/:job_id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id")
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/neural_networks/:neural_network_name/actions/:action_name/:job_id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id";
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/neural_networks/:neural_network_name/actions/:action_name/:job_id
http GET {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name/:job_id")! 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()
GET
List jobs for a given action
{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids
QUERY PARAMS
neural_network_name
action_name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids")
require "http/client"
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids"
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/neural_networks/:neural_network_name/actions/:action_name:ids"),
};
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/neural_networks/:neural_network_name/actions/:action_name:ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids"
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/neural_networks/:neural_network_name/actions/:action_name:ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids"))
.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/neural_networks/:neural_network_name/actions/:action_name:ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids")
.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/neural_networks/:neural_network_name/actions/:action_name:ids');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids';
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/neural_networks/:neural_network_name/actions/:action_name:ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids")
.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/neural_networks/:neural_network_name/actions/:action_name:ids',
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/neural_networks/:neural_network_name/actions/:action_name:ids'
};
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/neural_networks/:neural_network_name/actions/:action_name:ids');
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/neural_networks/:neural_network_name/actions/:action_name:ids'
};
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/neural_networks/:neural_network_name/actions/:action_name:ids';
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/neural_networks/:neural_network_name/actions/:action_name:ids"]
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/neural_networks/:neural_network_name/actions/:action_name:ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids",
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/neural_networks/:neural_network_name/actions/:action_name:ids');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids")
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/neural_networks/:neural_network_name/actions/:action_name:ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids";
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/neural_networks/:neural_network_name/actions/:action_name:ids
http GET {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name:ids")! 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()
GET
List supported actions for a given neural network
{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions
HEADERS
ngc_key
{{apiKey}}
QUERY PARAMS
neural_network_name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "ngc_key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions" {:headers {:ngc_key "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions"
headers = HTTP::Headers{
"ngc_key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
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/neural_networks/:neural_network_name/actions"),
Headers =
{
{ "ngc_key", "{{apiKey}}" },
},
};
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/neural_networks/:neural_network_name/actions");
var request = new RestRequest("", Method.Get);
request.AddHeader("ngc_key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ngc_key", "{{apiKey}}")
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/neural_networks/:neural_network_name/actions HTTP/1.1
Ngc_key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions")
.setHeader("ngc_key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions"))
.header("ngc_key", "{{apiKey}}")
.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/neural_networks/:neural_network_name/actions")
.get()
.addHeader("ngc_key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions")
.header("ngc_key", "{{apiKey}}")
.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/neural_networks/:neural_network_name/actions');
xhr.setRequestHeader('ngc_key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions',
headers: {ngc_key: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions';
const options = {method: 'GET', headers: {ngc_key: '{{apiKey}}'}};
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/neural_networks/:neural_network_name/actions',
method: 'GET',
headers: {
ngc_key: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions")
.get()
.addHeader("ngc_key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/neural_networks/:neural_network_name/actions',
headers: {
ngc_key: '{{apiKey}}'
}
};
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/neural_networks/:neural_network_name/actions',
headers: {ngc_key: '{{apiKey}}'}
};
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/neural_networks/:neural_network_name/actions');
req.headers({
ngc_key: '{{apiKey}}'
});
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/neural_networks/:neural_network_name/actions',
headers: {ngc_key: '{{apiKey}}'}
};
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/neural_networks/:neural_network_name/actions';
const options = {method: 'GET', headers: {ngc_key: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"ngc_key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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/neural_networks/:neural_network_name/actions" in
let headers = Header.add (Header.init ()) "ngc_key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ngc_key: {{apiKey}}"
],
]);
$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/neural_networks/:neural_network_name/actions', [
'headers' => [
'ngc_key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'ngc_key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions');
$request->setRequestMethod('GET');
$request->setHeaders([
'ngc_key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("ngc_key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions' -Method GET -Headers $headers
$headers=@{}
$headers.Add("ngc_key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'ngc_key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/api/v1/neural_networks/:neural_network_name/actions", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions"
headers = {"ngc_key": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions"
response <- VERB("GET", url, add_headers('ngc_key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ngc_key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v1/neural_networks/:neural_network_name/actions') do |req|
req.headers['ngc_key'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("ngc_key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions \
--header 'ngc_key: {{apiKey}}'
http GET {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions \
ngc_key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'ngc_key: {{apiKey}}' \
--output-document \
- {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions
import Foundation
let headers = ["ngc_key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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()
GET
List supported neural networks
{{baseUrl}}/api/v1/neural_networks
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/neural_networks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/neural_networks")
require "http/client"
url = "{{baseUrl}}/api/v1/neural_networks"
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/neural_networks"),
};
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/neural_networks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/neural_networks"
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/neural_networks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/neural_networks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/neural_networks"))
.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/neural_networks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/neural_networks")
.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/neural_networks');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/neural_networks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/neural_networks';
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/neural_networks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks")
.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/neural_networks',
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/neural_networks'};
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/neural_networks');
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/neural_networks'};
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/neural_networks';
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/neural_networks"]
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/neural_networks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/neural_networks",
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/neural_networks');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/neural_networks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/neural_networks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/neural_networks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/neural_networks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/neural_networks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/neural_networks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/neural_networks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/neural_networks")
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/neural_networks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/neural_networks";
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/neural_networks
http GET {{baseUrl}}/api/v1/neural_networks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/neural_networks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/neural_networks")! 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()
POST
List supported pretrained models for a given neural network
{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models
HEADERS
ngc_key
{{apiKey}}
QUERY PARAMS
neural_network_name
BODY json
{
"ngc_key": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "ngc_key: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ngc_key\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models" {:headers {:ngc_key "{{apiKey}}"}
:content-type :json
:form-params {:ngc_key ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models"
headers = HTTP::Headers{
"ngc_key" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"ngc_key\": \"\"\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}}/api/v1/neural_networks/:neural_network_name/pretrained_models"),
Headers =
{
{ "ngc_key", "{{apiKey}}" },
},
Content = new StringContent("{\n \"ngc_key\": \"\"\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}}/api/v1/neural_networks/:neural_network_name/pretrained_models");
var request = new RestRequest("", Method.Post);
request.AddHeader("ngc_key", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ngc_key\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models"
payload := strings.NewReader("{\n \"ngc_key\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ngc_key", "{{apiKey}}")
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/api/v1/neural_networks/:neural_network_name/pretrained_models HTTP/1.1
Ngc_key: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 19
{
"ngc_key": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models")
.setHeader("ngc_key", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"ngc_key\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models"))
.header("ngc_key", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ngc_key\": \"\"\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 \"ngc_key\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models")
.post(body)
.addHeader("ngc_key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models")
.header("ngc_key", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"ngc_key\": \"\"\n}")
.asString();
const data = JSON.stringify({
ngc_key: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models');
xhr.setRequestHeader('ngc_key', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
data: {ngc_key: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models';
const options = {
method: 'POST',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"ngc_key":""}'
};
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/neural_networks/:neural_network_name/pretrained_models',
method: 'POST',
headers: {
ngc_key: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ngc_key": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ngc_key\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models")
.post(body)
.addHeader("ngc_key", "{{apiKey}}")
.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/api/v1/neural_networks/:neural_network_name/pretrained_models',
headers: {
ngc_key: '{{apiKey}}',
'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({ngc_key: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
body: {ngc_key: ''},
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}}/api/v1/neural_networks/:neural_network_name/pretrained_models');
req.headers({
ngc_key: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
ngc_key: ''
});
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}}/api/v1/neural_networks/:neural_network_name/pretrained_models',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
data: {ngc_key: ''}
};
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/neural_networks/:neural_network_name/pretrained_models';
const options = {
method: 'POST',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"ngc_key":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"ngc_key": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ngc_key": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models"]
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}}/api/v1/neural_networks/:neural_network_name/pretrained_models" in
let headers = Header.add_list (Header.init ()) [
("ngc_key", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ngc_key\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models",
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([
'ngc_key' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"ngc_key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models', [
'body' => '{
"ngc_key": ""
}',
'headers' => [
'content-type' => 'application/json',
'ngc_key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'ngc_key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ngc_key' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ngc_key' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'ngc_key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("ngc_key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ngc_key": ""
}'
$headers=@{}
$headers.Add("ngc_key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ngc_key": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ngc_key\": \"\"\n}"
headers = {
'ngc_key': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/api/v1/neural_networks/:neural_network_name/pretrained_models", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models"
payload = { "ngc_key": "" }
headers = {
"ngc_key": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models"
payload <- "{\n \"ngc_key\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('ngc_key' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ngc_key"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"ngc_key\": \"\"\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/api/v1/neural_networks/:neural_network_name/pretrained_models') do |req|
req.headers['ngc_key'] = '{{apiKey}}'
req.body = "{\n \"ngc_key\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models";
let payload = json!({"ngc_key": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("ngc_key", "{{apiKey}}".parse().unwrap());
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}}/api/v1/neural_networks/:neural_network_name/pretrained_models \
--header 'content-type: application/json' \
--header 'ngc_key: {{apiKey}}' \
--data '{
"ngc_key": ""
}'
echo '{
"ngc_key": ""
}' | \
http POST {{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models \
content-type:application/json \
ngc_key:'{{apiKey}}'
wget --quiet \
--method POST \
--header 'ngc_key: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "ngc_key": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models
import Foundation
let headers = [
"ngc_key": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["ngc_key": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/pretrained_models")! 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()
POST
Run an action
{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name
HEADERS
ngc_key
{{apiKey}}
QUERY PARAMS
neural_network_name
action_name
BODY json
{
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "ngc_key: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name" {:headers {:ngc_key "{{apiKey}}"}
:content-type :json
:form-params {:callback ""
:mlops ""
:ptm ""
:specs ""
:storage ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name"
headers = HTTP::Headers{
"ngc_key" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\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}}/api/v1/neural_networks/:neural_network_name/actions/:action_name"),
Headers =
{
{ "ngc_key", "{{apiKey}}" },
},
Content = new StringContent("{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\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}}/api/v1/neural_networks/:neural_network_name/actions/:action_name");
var request = new RestRequest("", Method.Post);
request.AddHeader("ngc_key", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name"
payload := strings.NewReader("{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ngc_key", "{{apiKey}}")
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/api/v1/neural_networks/:neural_network_name/actions/:action_name HTTP/1.1
Ngc_key: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 80
{
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name")
.setHeader("ngc_key", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name"))
.header("ngc_key", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\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 \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name")
.post(body)
.addHeader("ngc_key", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name")
.header("ngc_key", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}")
.asString();
const data = JSON.stringify({
callback: '',
mlops: '',
ptm: '',
specs: '',
storage: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name');
xhr.setRequestHeader('ngc_key', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
data: {callback: '', mlops: '', ptm: '', specs: '', storage: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name';
const options = {
method: 'POST',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"callback":"","mlops":"","ptm":"","specs":"","storage":""}'
};
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/neural_networks/:neural_network_name/actions/:action_name',
method: 'POST',
headers: {
ngc_key: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "callback": "",\n "mlops": "",\n "ptm": "",\n "specs": "",\n "storage": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name")
.post(body)
.addHeader("ngc_key", "{{apiKey}}")
.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/api/v1/neural_networks/:neural_network_name/actions/:action_name',
headers: {
ngc_key: '{{apiKey}}',
'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({callback: '', mlops: '', ptm: '', specs: '', storage: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
body: {callback: '', mlops: '', ptm: '', specs: '', storage: ''},
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}}/api/v1/neural_networks/:neural_network_name/actions/:action_name');
req.headers({
ngc_key: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
callback: '',
mlops: '',
ptm: '',
specs: '',
storage: ''
});
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}}/api/v1/neural_networks/:neural_network_name/actions/:action_name',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
data: {callback: '', mlops: '', ptm: '', specs: '', storage: ''}
};
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/neural_networks/:neural_network_name/actions/:action_name';
const options = {
method: 'POST',
headers: {ngc_key: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"callback":"","mlops":"","ptm":"","specs":"","storage":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"ngc_key": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"callback": @"",
@"mlops": @"",
@"ptm": @"",
@"specs": @"",
@"storage": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name"]
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}}/api/v1/neural_networks/:neural_network_name/actions/:action_name" in
let headers = Header.add_list (Header.init ()) [
("ngc_key", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name",
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([
'callback' => '',
'mlops' => '',
'ptm' => '',
'specs' => '',
'storage' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"ngc_key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name', [
'body' => '{
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
}',
'headers' => [
'content-type' => 'application/json',
'ngc_key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'ngc_key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'callback' => '',
'mlops' => '',
'ptm' => '',
'specs' => '',
'storage' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'callback' => '',
'mlops' => '',
'ptm' => '',
'specs' => '',
'storage' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'ngc_key' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("ngc_key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
}'
$headers=@{}
$headers.Add("ngc_key", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}"
headers = {
'ngc_key': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/api/v1/neural_networks/:neural_network_name/actions/:action_name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name"
payload = {
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
}
headers = {
"ngc_key": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name"
payload <- "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('ngc_key' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ngc_key"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\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/api/v1/neural_networks/:neural_network_name/actions/:action_name') do |req|
req.headers['ngc_key'] = '{{apiKey}}'
req.body = "{\n \"callback\": \"\",\n \"mlops\": \"\",\n \"ptm\": \"\",\n \"specs\": \"\",\n \"storage\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name";
let payload = json!({
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("ngc_key", "{{apiKey}}".parse().unwrap());
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}}/api/v1/neural_networks/:neural_network_name/actions/:action_name \
--header 'content-type: application/json' \
--header 'ngc_key: {{apiKey}}' \
--data '{
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
}'
echo '{
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
}' | \
http POST {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name \
content-type:application/json \
ngc_key:'{{apiKey}}'
wget --quiet \
--method POST \
--header 'ngc_key: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "callback": "",\n "mlops": "",\n "ptm": "",\n "specs": "",\n "storage": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name
import Foundation
let headers = [
"ngc_key": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"callback": "",
"mlops": "",
"ptm": "",
"specs": "",
"storage": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/neural_networks/:neural_network_name/actions/:action_name")! 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()