Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
page = client.applications.upload_files(
files=["string"],
)
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Applications.UploadFiles(context.TODO(), sgp.ApplicationUploadFilesParams{
Files: sgp.F([]string{"string"}),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}curl --request POST \
--url https://api.egp.scale.com/v4/applications/upload-files \
--header 'Content-Type: multipart/form-data' \
--form 'files=<string>'const form = new FormData();
form.append('files', '<string>');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.egp.scale.com/v4/applications/upload-files', 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://api.egp.scale.com/v4/applications/upload-files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v4/applications/upload-files")
.header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/applications/upload-files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"file_name": "<string>",
"file_size_bytes": 123,
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"file_artifact_blob_path": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Applications
Upload Application Files
POST
/
v4
/
applications
/
upload-files
Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
page = client.applications.upload_files(
files=["string"],
)
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Applications.UploadFiles(context.TODO(), sgp.ApplicationUploadFilesParams{
Files: sgp.F([]string{"string"}),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}curl --request POST \
--url https://api.egp.scale.com/v4/applications/upload-files \
--header 'Content-Type: multipart/form-data' \
--form 'files=<string>'const form = new FormData();
form.append('files', '<string>');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.egp.scale.com/v4/applications/upload-files', 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://api.egp.scale.com/v4/applications/upload-files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v4/applications/upload-files")
.header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/applications/upload-files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"file_name": "<string>",
"file_size_bytes": 123,
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"file_artifact_blob_path": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
multipart/form-data
Upload files to be used in an application.
Response
Successful Response
The ID of the account that owns the given entity.
The user who originally created the entity.
The type of identity that created the entity.
Available options:
user, service_account The date and time when the entity was created in ISO format.
⌘I

