Upload a blob
import requests
url = "https://{FUSION HOST}/api/blobs/{id}"
payload = {}
headers = {"Content-Type": "*/*"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.put("https://{FUSION HOST}/api/blobs/{id}")
.header("Content-Type", "*/*")
.body("{}")
.asString();const options = {method: 'PUT', headers: {'Content-Type': '*/*'}, body: JSON.stringify({})};
fetch('https://{FUSION HOST}/api/blobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/blobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = '*/*'
request.body = "{}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/blobs/{id}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/blobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request PUT \
--url https://{FUSION HOST}/api/blobs/{id} \
--header 'Content-Type: */*' \
--data '{}'{
"name": "mydriver",
"contentType": "application/java-archive",
"size": 707261,
"modifiedTime": "2017-06-09T19:00:48.919Z",
"version": 0,
"md5": "c67163ca764bfe632f28229c142131b5",
"metadata": {
"subtype": "driver:jdbc",
"drivers": "org.postgresql.Driver",
"resourceType": "driver:jdbc"
}
}Upload a blob and define its ID.
PUT
/
blobs
/
{id}
Upload a blob
import requests
url = "https://{FUSION HOST}/api/blobs/{id}"
payload = {}
headers = {"Content-Type": "*/*"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.put("https://{FUSION HOST}/api/blobs/{id}")
.header("Content-Type", "*/*")
.body("{}")
.asString();const options = {method: 'PUT', headers: {'Content-Type': '*/*'}, body: JSON.stringify({})};
fetch('https://{FUSION HOST}/api/blobs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/blobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = '*/*'
request.body = "{}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/blobs/{id}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/blobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request PUT \
--url https://{FUSION HOST}/api/blobs/{id} \
--header 'Content-Type: */*' \
--data '{}'{
"name": "mydriver",
"contentType": "application/java-archive",
"size": 707261,
"modifiedTime": "2017-06-09T19:00:48.919Z",
"version": 0,
"md5": "c67163ca764bfe632f28229c142131b5",
"metadata": {
"subtype": "driver:jdbc",
"drivers": "org.postgresql.Driver",
"resourceType": "driver:jdbc"
}
}Headers
An optional tag to match against the specified blob.
The media type of the blob body.
The blob sub-type.
Path Parameters
The blob ID.
Pattern:
.*Query Parameters
true to commit to Solr's Blob store.
Whether to update the data, metadata, or both.
Body
*/*
The blob to store.
The body is of type object.
Response
200 - application/json
Successful operation
Was this page helpful?
⌘I