Sign upload parts
curl --request POST \
--url https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"part_numbers": [
1,
2,
3
]
}
'import requests
url = "https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts"
payload = { "part_numbers": [1, 2, 3] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({part_numbers: [1, 2, 3]})
};
fetch('https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts",
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([
'part_numbers' => [
1,
2,
3
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts"
payload := strings.NewReader("{\n \"part_numbers\": [\n 1,\n 2,\n 3\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"part_numbers\": [\n 1,\n 2,\n 3\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"part_numbers\": [\n 1,\n 2,\n 3\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"code": "<string>",
"message": "<string>",
"data": {
"presigned_urls": [
{
"part_number": 123,
"url": "<string>"
}
]
},
"errors": [
{}
]
}{
"status": 400,
"success": false,
"code": "REQUEST_FAILED",
"message": "Bad request.",
"data": null,
"errors": []
}{
"status": 401,
"success": false,
"code": "REQUEST_FAILED",
"message": "Missing or invalid API key.",
"data": null,
"errors": []
}{
"status": 403,
"success": false,
"code": "REQUEST_FAILED",
"message": "Permission denied, inactive service provider, or unsupported key mode.",
"data": null,
"errors": []
}{
"status": 404,
"success": false,
"code": "REQUEST_FAILED",
"message": "Resource not found.",
"data": null,
"errors": []
}{
"status": 409,
"success": false,
"code": "REQUEST_FAILED",
"message": "Idempotency conflict or request already in progress.",
"data": null,
"errors": []
}{
"status": 422,
"success": false,
"code": "REQUEST_FAILED",
"message": "Validation failed.",
"data": null,
"errors": []
}{
"status": 429,
"success": false,
"code": "REQUEST_FAILED",
"message": "Rate limit exceeded.",
"data": null,
"errors": []
}{
"status": 500,
"success": false,
"code": "REQUEST_FAILED",
"message": "Internal server error.",
"data": null,
"errors": []
}Uploads
Sign Upload Parts
Sign upload parts through SoluDesks APIs.
Tenant API keys operate inside the tenant LearnHub workspace. Service-provider API keys use the same endpoint family for service-provider-owned admin training content where supported. Upload sessions return presigned storage URLs; upload the file to the returned URL and complete the session before referencing the upload ID in course or lesson payloads.
POST
/
v1
/
external
/
learnhub
/
uploads
/
{id}
/
sign-parts
Sign upload parts
curl --request POST \
--url https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"part_numbers": [
1,
2,
3
]
}
'import requests
url = "https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts"
payload = { "part_numbers": [1, 2, 3] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({part_numbers: [1, 2, 3]})
};
fetch('https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts",
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([
'part_numbers' => [
1,
2,
3
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts"
payload := strings.NewReader("{\n \"part_numbers\": [\n 1,\n 2,\n 3\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"part_numbers\": [\n 1,\n 2,\n 3\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.soludesks.com/v1/external/learnhub/uploads/{id}/sign-parts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"part_numbers\": [\n 1,\n 2,\n 3\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"code": "<string>",
"message": "<string>",
"data": {
"presigned_urls": [
{
"part_number": 123,
"url": "<string>"
}
]
},
"errors": [
{}
]
}{
"status": 400,
"success": false,
"code": "REQUEST_FAILED",
"message": "Bad request.",
"data": null,
"errors": []
}{
"status": 401,
"success": false,
"code": "REQUEST_FAILED",
"message": "Missing or invalid API key.",
"data": null,
"errors": []
}{
"status": 403,
"success": false,
"code": "REQUEST_FAILED",
"message": "Permission denied, inactive service provider, or unsupported key mode.",
"data": null,
"errors": []
}{
"status": 404,
"success": false,
"code": "REQUEST_FAILED",
"message": "Resource not found.",
"data": null,
"errors": []
}{
"status": 409,
"success": false,
"code": "REQUEST_FAILED",
"message": "Idempotency conflict or request already in progress.",
"data": null,
"errors": []
}{
"status": 422,
"success": false,
"code": "REQUEST_FAILED",
"message": "Validation failed.",
"data": null,
"errors": []
}{
"status": 429,
"success": false,
"code": "REQUEST_FAILED",
"message": "Rate limit exceeded.",
"data": null,
"errors": []
}{
"status": 500,
"success": false,
"code": "REQUEST_FAILED",
"message": "Internal server error.",
"data": null,
"errors": []
}Authorizations
External API key. Format: Bearer <API_KEY>
Path Parameters
A UUID string identifying this upload session.
Body
application/json
Required range:
x >= 1