- Create - Start Upload Session
- Get - Get Upload Session
- Upload - Upload part of File to Upload Session
- Delete - Abort Upload Session
- Finish - Finish Upload Session
Start an Upload Session. Upload sessions are used to upload large files, use the Upload File endpoint to upload smaller files (up to 100MB). Note that the base URL is upload.apideck.com instead of unify.apideck.com. For more information on uploads, refer to the file upload guide.
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
using System.Collections.Generic;
var sdk = new Apideck(
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: "<YOUR_BEARER_TOKEN_HERE>"
);
FileStorageUploadSessionsAddRequest req = new FileStorageUploadSessionsAddRequest() {
ServiceId = "salesforce",
CreateUploadSessionRequest = new CreateUploadSessionRequest() {
Name = "Documents",
ParentFolderId = "1234",
DriveId = "1234",
Size = 1810673,
PassThrough = new List<PassThroughBody>() {
new PassThroughBody() {
ServiceId = "<id>",
ExtendPaths = new List<ExtendPaths>() {
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
},
},
new PassThroughBody() {
ServiceId = "<id>",
ExtendPaths = new List<ExtendPaths>() {
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
},
},
new PassThroughBody() {
ServiceId = "<id>",
ExtendPaths = new List<ExtendPaths>() {
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
},
},
},
},
};
var res = await sdk.FileStorage.UploadSessions.CreateAsync(req);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
request |
FileStorageUploadSessionsAddRequest | ✔️ | The request object to use for the request. |
serverURL |
string | ➖ | An optional server URL to use. |
FileStorageUploadSessionsAddResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
| ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
| ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
| ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
| ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
| ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |
Get Upload Session. Use the part_size to split your file into parts. Upload the parts to the Upload part of File endpoint. Note that the base URL is upload.apideck.com instead of unify.apideck.com. For more information on uploads, refer to the file upload guide.
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
var sdk = new Apideck(
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: "<YOUR_BEARER_TOKEN_HERE>"
);
FileStorageUploadSessionsOneRequest req = new FileStorageUploadSessionsOneRequest() {
Id = "<id>",
ServiceId = "salesforce",
Fields = "id,updated_at",
};
var res = await sdk.FileStorage.UploadSessions.GetAsync(req);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
request |
FileStorageUploadSessionsOneRequest | ✔️ | The request object to use for the request. |
serverURL |
string | ➖ | An optional server URL to use. |
FileStorageUploadSessionsOneResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
| ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
| ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
| ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
| ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
| ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |
Upload part of File to Upload Session (max 100MB). Get part_size from Get Upload Session first. Every File part (except the last one) uploaded to this endpoint should have Content-Length equal to part_size. Note that the base URL is upload.apideck.com instead of unify.apideck.com. For more information on uploads, refer to the file upload guide.
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
using System;
var sdk = new Apideck(
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: "<YOUR_BEARER_TOKEN_HERE>"
);
FileStorageUploadSessionsUploadRequest req = new FileStorageUploadSessionsUploadRequest() {
Id = "<id>",
ServiceId = "salesforce",
PartNumber = 0D,
Digest = "sha=fpRyg5eVQletdZqEKaFlqwBXJzM=",
RequestBody = System.Text.Encoding.UTF8.GetBytes("<binary string>"),
};
var res = await sdk.FileStorage.UploadSessions.UploadAsync(req);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
request |
FileStorageUploadSessionsUploadRequest | ✔️ | The request object to use for the request. |
serverURL |
string | ➖ | An optional server URL to use. |
FileStorageUploadSessionsUploadResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
| ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
| ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
| ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
| ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
| ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |
Abort Upload Session. Note that the base URL is upload.apideck.com instead of unify.apideck.com. For more information on uploads, refer to the file upload guide.
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
var sdk = new Apideck(
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: "<YOUR_BEARER_TOKEN_HERE>"
);
FileStorageUploadSessionsDeleteRequest req = new FileStorageUploadSessionsDeleteRequest() {
Id = "<id>",
ServiceId = "salesforce",
};
var res = await sdk.FileStorage.UploadSessions.DeleteAsync(req);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
request |
FileStorageUploadSessionsDeleteRequest | ✔️ | The request object to use for the request. |
FileStorageUploadSessionsDeleteResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
| ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
| ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
| ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
| ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
| ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |
Finish Upload Session. Only call this endpoint after all File parts have been uploaded to Upload part of File. Note that the base URL is upload.apideck.com instead of unify.apideck.com. For more information on uploads, refer to the file upload guide.
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
var sdk = new Apideck(
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: "<YOUR_BEARER_TOKEN_HERE>"
);
FileStorageUploadSessionsFinishRequest req = new FileStorageUploadSessionsFinishRequest() {
Id = "<id>",
ServiceId = "salesforce",
Digest = "sha=fpRyg5eVQletdZqEKaFlqwBXJzM=",
};
var res = await sdk.FileStorage.UploadSessions.FinishAsync(req);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
request |
FileStorageUploadSessionsFinishRequest | ✔️ | The request object to use for the request. |
serverURL |
string | ➖ | An optional server URL to use. |
FileStorageUploadSessionsFinishResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
| ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
| ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
| ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
| ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
| ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |