Routing API requests through StackOne directly to the underlying provider.
- Perform - Proxy Request
Proxy Request
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using System.Collections.Generic;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
var res = await sdk.Proxy.PerformAsync(
xAccountId: "<id>",
proxyRequestBody: new ProxyRequestBody() {
Url = "https://api.sample-integration.com/v1",
Path = "/employees/directory",
Headers = new Dictionary<string, object>() {
{ "Content-Type", "application/json" },
},
},
prefer: "heartbeat"
);
// handle response| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
XAccountId |
string | ✔️ | The account identifier | |
ProxyRequestBody |
ProxyRequestBody | ✔️ | The request body | |
Prefer |
string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
| Error Type | Status Code | Content Type |
|---|---|---|
| StackOneHQ.Client.Models.Errors.BadRequestResponseException | 400 | application/json |
| StackOneHQ.Client.Models.Errors.UnauthorizedResponseException | 401 | application/json |
| StackOneHQ.Client.Models.Errors.ForbiddenResponseException | 403 | application/json |
| StackOneHQ.Client.Models.Errors.NotFoundResponseException | 404 | application/json |
| StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException | 408 | application/json |
| StackOneHQ.Client.Models.Errors.ConflictResponseException | 409 | application/json |
| StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException | 412 | application/json |
| StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException | 422 | application/json |
| StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException | 429 | application/json |
| StackOneHQ.Client.Models.Errors.InternalServerErrorResponse | 500 | application/json |
| StackOneHQ.Client.Models.Errors.NotImplementedResponseException | 501 | application/json |
| StackOneHQ.Client.Models.Errors.BadGatewayResponseException | 502 | application/json |
| StackOneHQ.Client.Models.Errors.APIException | 4XX, 5XX | */* |