import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const applicationFiles = await client.applications.uploadFiles({
files: [fs.createReadStream('path/to/file')],
});
console.log(applicationFiles);[
{
"id": "<string>",
"file_name": "<string>",
"file_size_bytes": 123,
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"created_at": "2023-11-07T05:31:56Z",
"file_artifact_blob_path": "<string>"
}
]import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const applicationFiles = await client.applications.uploadFiles({
files: [fs.createReadStream('path/to/file')],
});
console.log(applicationFiles);[
{
"id": "<string>",
"file_name": "<string>",
"file_size_bytes": 123,
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"created_at": "2023-11-07T05:31:56Z",
"file_artifact_blob_path": "<string>"
}
]Account which the file will be tied to. Use this account id query param if you are using the API or the SDK.
Upload files to be used in an application.
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.
user, service_account The date and time when the entity was created in ISO format.