Here are the examples of the csharp api System.Collections.Generic.Dictionary.Add(System.String, System.String) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
704 Examples
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdApprovePutAsyncWithHttpInfo (string organizationId, string id, string apiVersion)
{
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdApprovePut");
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdApprovePut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdApprovePut");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/{id}/Approve";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdApprovePut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPatchAsyncWithHttpInfo (string id, string apiVersion, string organizationId, List<Operation> body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPatch");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPatch");
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPatch");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPatch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< IActionResult > ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPutWithHttpInfo (string organizationId, string id, string apiVersion, AccessRequest body = null)
{
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPut");
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPut");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPutAsyncWithHttpInfo (string organizationId, string id, string apiVersion, AccessRequest body = null)
{
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPut");
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPut");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< IActionResult > ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPutWithHttpInfo (string organizationId, string id, string apiVersion)
{
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPut");
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPut");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/{id}/Reject";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPutAsyncWithHttpInfo (string organizationId, string id, string apiVersion)
{
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPut");
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPut");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/{id}/Reject";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsIdRejectPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< PendingAccessRequestPaginatedList > ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPendingGetWithHttpInfo (string organizationId, string apiVersion)
{
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPendingGet");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPendingGet");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/Pending";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPendingGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PendingAccessRequestPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(PendingAccessRequestPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PendingAccessRequestPaginatedList)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<PendingAccessRequestPaginatedList>> ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPendingGetAsyncWithHttpInfo (string organizationId, string apiVersion)
{
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPendingGet");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPendingGet");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/Pending";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPendingGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PendingAccessRequestPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(PendingAccessRequestPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PendingAccessRequestPaginatedList)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<AccessRequest>> ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPostAsyncWithHttpInfo (string organizationId, string apiVersion, AccessRequest body = null)
{
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPost");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPost");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionOrganizationsOrganizationIdAccessRequestsPost", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AccessRequest>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AccessRequest) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessRequest)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< AccessRequest > GetAccessRequestWithHttpInfo (string id, string apiVersion, string organizationId)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AccessRequestsApi->GetAccessRequest");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->GetAccessRequest");
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->GetAccessRequest");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetAccessRequest", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AccessRequest>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AccessRequest) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessRequest)));
}
19
View Source File : AccessRequestsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<AccessRequest>> GetAccessRequestAsyncWithHttpInfo (string id, string apiVersion, string organizationId)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AccessRequestsApi->GetAccessRequest");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AccessRequestsApi->GetAccessRequest");
// verify the required parameter 'organizationId' is set
if (organizationId == null)
throw new ApiException(400, "Missing required parameter 'organizationId' when calling AccessRequestsApi->GetAccessRequest");
var localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/AccessRequests/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (organizationId != null) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetAccessRequest", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AccessRequest>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AccessRequest) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessRequest)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< int? > ApiVapiVersionAgentGroupsCountGetWithHttpInfo (string apiVersion, string filter = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsCountGet");
var localVarPath = "/api/v{apiVersion}/AgentGroups/Count";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (filter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$filter", filter)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsCountGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<int?>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(int?) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(int?)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<int?>> ApiVapiVersionAgentGroupsCountGetAsyncWithHttpInfo (string apiVersion, string filter = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsCountGet");
var localVarPath = "/api/v{apiVersion}/AgentGroups/Count";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (filter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$filter", filter)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsCountGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<int?>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(int?) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(int?)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< AgentGroupPaginatedList > ApiVapiVersionAgentGroupsGetWithHttpInfo (string apiVersion, string filter = null, string orderby = null, int? top = null, int? skip = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsGet");
var localVarPath = "/api/v{apiVersion}/AgentGroups";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (filter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$filter", filter)); // query parameter
if (orderby != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$orderby", orderby)); // query parameter
if (top != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$top", top)); // query parameter
if (skip != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$skip", skip)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AgentGroupPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AgentGroupPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AgentGroupPaginatedList)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<AgentGroupPaginatedList>> ApiVapiVersionAgentGroupsGetAsyncWithHttpInfo (string apiVersion, string filter = null, string orderby = null, int? top = null, int? skip = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsGet");
var localVarPath = "/api/v{apiVersion}/AgentGroups";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (filter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$filter", filter)); // query parameter
if (orderby != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$orderby", orderby)); // query parameter
if (top != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$top", top)); // query parameter
if (skip != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$skip", skip)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AgentGroupPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AgentGroupPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AgentGroupPaginatedList)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionAgentGroupsIdDeleteAsyncWithHttpInfo (string id, string apiVersion)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdDelete");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdDelete");
var localVarPath = "/api/v{apiVersion}/AgentGroups/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsIdDelete", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionAgentGroupsIdPatchAsyncWithHttpInfo (string id, string apiVersion, List<Operation> body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdPatch");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdPatch");
var localVarPath = "/api/v{apiVersion}/AgentGroups/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsIdPatch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< IActionResult > ApiVapiVersionAgentGroupsIdPutWithHttpInfo (string id, string apiVersion, AgentGroup body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdPut");
var localVarPath = "/api/v{apiVersion}/AgentGroups/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsIdPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionAgentGroupsIdPutAsyncWithHttpInfo (string id, string apiVersion, AgentGroup body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdPut");
var localVarPath = "/api/v{apiVersion}/AgentGroups/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsIdPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< Agent > ApiVapiVersionAgentGroupsIdUpdateGroupMembersPutWithHttpInfo (string id, string apiVersion, List<AgentGroupMember> body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdUpdateGroupMembersPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdUpdateGroupMembersPut");
var localVarPath = "/api/v{apiVersion}/AgentGroups/{id}/UpdateGroupMembers";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsIdUpdateGroupMembersPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Agent>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Agent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agent)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<Agent>> ApiVapiVersionAgentGroupsIdUpdateGroupMembersPutAsyncWithHttpInfo (string id, string apiVersion, List<AgentGroupMember> body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdUpdateGroupMembersPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsIdUpdateGroupMembersPut");
var localVarPath = "/api/v{apiVersion}/AgentGroups/{id}/UpdateGroupMembers";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsIdUpdateGroupMembersPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Agent>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Agent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agent)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< Agent > ApiVapiVersionAgentGroupsPostWithHttpInfo (string apiVersion, AgentGroup body = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsPost");
var localVarPath = "/api/v{apiVersion}/AgentGroups";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsPost", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Agent>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Agent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agent)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<Agent>> ApiVapiVersionAgentGroupsPostAsyncWithHttpInfo (string apiVersion, AgentGroup body = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsPost");
var localVarPath = "/api/v{apiVersion}/AgentGroups";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsPost", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Agent>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Agent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agent)));
}
19
View Source File : AgentGroupsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<AgentGroupViewModelPaginatedList>> ApiVapiVersionAgentGroupsViewIdGetAsyncWithHttpInfo (string id, string apiVersion)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsViewIdGet");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentGroupsApi->ApiVapiVersionAgentGroupsViewIdGet");
var localVarPath = "/api/v{apiVersion}/AgentGroups/view/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentGroupsViewIdGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AgentGroupViewModelPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AgentGroupViewModelPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AgentGroupViewModelPaginatedList)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<ConnectedViewModel>> ApiVapiVersionAgentsAgentIDConnectPatchAsyncWithHttpInfo (string agentID, string machineName, string apiVersion, string macAddresses = null)
{
// verify the required parameter 'agentID' is set
if (agentID == null)
throw new ApiException(400, "Missing required parameter 'agentID' when calling AgentsApi->ApiVapiVersionAgentsAgentIDConnectPatch");
// verify the required parameter 'machineName' is set
if (machineName == null)
throw new ApiException(400, "Missing required parameter 'machineName' when calling AgentsApi->ApiVapiVersionAgentsAgentIDConnectPatch");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsAgentIDConnectPatch");
var localVarPath = "/api/v{apiVersion}/Agents/{agentID}/Connect";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (agentID != null) localVarPathParams.Add("agentID", this.Configuration.ApiClient.ParameterToString(agentID)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (machineName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "MachineName", machineName)); // query parameter
if (macAddresses != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "MacAddresses", macAddresses)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsAgentIDConnectPatch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ConnectedViewModel>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(ConnectedViewModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ConnectedViewModel)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< IActionResult > ApiVapiVersionAgentsAgentIDDisconnectPatchWithHttpInfo (string agentID, string apiVersion, string organizationId, ConnectAgentViewModel body = null)
{
// verify the required parameter 'agentID' is set
if (agentID == null)
throw new ApiException(400, "Missing required parameter 'agentID' when calling AgentsApi->ApiVapiVersionAgentsAgentIDDisconnectPatch");
// verify the required parameter 'machineName' is set
if (body.MachineName == null)
throw new ApiException(400, "Missing required parameter 'machineName' when calling AgentsApi->ApiVapiVersionAgentsAgentIDDisconnectPatch");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsAgentIDDisconnectPatch");
var localVarPath = "/api/v{apiVersion}/Agents/{agentID}/Disconnect";
if (!string.IsNullOrEmpty(organizationId))
localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/Agents/{agentID}/Disconnect";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (agentID != null) localVarPathParams.Add("agentID", this.Configuration.ApiClient.ParameterToString(agentID)); // path parameter
if (!string.IsNullOrEmpty(organizationId)) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
//if (machineName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "MachineName", machineName)); // query parameter
//if (macAddresses != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "MacAddresses", macAddresses)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("Disconnect Agent", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionAgentsAgentIDDisconnectPatchAsyncWithHttpInfo (string agentID, string machineName, string apiVersion, string macAddresses = null)
{
// verify the required parameter 'agentID' is set
if (agentID == null)
throw new ApiException(400, "Missing required parameter 'agentID' when calling AgentsApi->ApiVapiVersionAgentsAgentIDDisconnectPatch");
// verify the required parameter 'machineName' is set
if (machineName == null)
throw new ApiException(400, "Missing required parameter 'machineName' when calling AgentsApi->ApiVapiVersionAgentsAgentIDDisconnectPatch");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsAgentIDDisconnectPatch");
var localVarPath = "/api/v{apiVersion}/Agents/{agentID}/Disconnect";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (agentID != null) localVarPathParams.Add("agentID", this.Configuration.ApiClient.ParameterToString(agentID)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (machineName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "MachineName", machineName)); // query parameter
if (macAddresses != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "MacAddresses", macAddresses)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsAgentIDDisconnectPatch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse<NextJobViewModel> ApiVapiVersionAgentsAgentIdAddHeartbeatPostWithHttpInfo (string agentId, string apiVersion, string organizationId, HeartbeatViewModel body = null)
{
// verify the required parameter 'agentId' is set
if (agentId == null)
throw new ApiException(400, "Missing required parameter 'agentId' when calling AgentsApi->ApiVapiVersionAgentsAgentIdAddHeartbeatPost");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsAgentIdAddHeartbeatPost");
var localVarPath = "/api/v{apiVersion}/Agents/{agentId}/AddHeartbeat";
if (!string.IsNullOrEmpty(organizationId))
localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/Agents/{agentId}/AddHeartbeat";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (agentId != null) localVarPathParams.Add("agentId", this.Configuration.ApiClient.ParameterToString(agentId)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (!string.IsNullOrEmpty(organizationId)) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("AddHeartbeat", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<NextJobViewModel>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
JsonConvert.DeserializeObject<NextJobViewModel>(localVarResponse.Content));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<AgentHeartbeat>> ApiVapiVersionAgentsAgentIdAddHeartbeatPostAsyncWithHttpInfo (string agentId, string apiVersion, HeartbeatViewModel body = null)
{
// verify the required parameter 'agentId' is set
if (agentId == null)
throw new ApiException(400, "Missing required parameter 'agentId' when calling AgentsApi->ApiVapiVersionAgentsAgentIdAddHeartbeatPost");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsAgentIdAddHeartbeatPost");
var localVarPath = "/api/v{apiVersion}/Agents/{agentId}/AddHeartbeat";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (agentId != null) localVarPathParams.Add("agentId", this.Configuration.ApiClient.ParameterToString(agentId)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsAgentIdAddHeartbeatPost", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AgentHeartbeat>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AgentHeartbeat) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AgentHeartbeat)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< AgentGroupMemberPaginatedList > ApiVapiVersionAgentsAgentIdGetAllGroupMembersGetWithHttpInfo (string agentId, string apiVersion)
{
// verify the required parameter 'agentId' is set
if (agentId == null)
throw new ApiException(400, "Missing required parameter 'agentId' when calling AgentsApi->ApiVapiVersionAgentsAgentIdGetAllGroupMembersGet");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsAgentIdGetAllGroupMembersGet");
var localVarPath = "/api/v{apiVersion}/Agents/{agentId}/GetAllGroupMembers";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (agentId != null) localVarPathParams.Add("agentId", this.Configuration.ApiClient.ParameterToString(agentId)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsAgentIdGetAllGroupMembersGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AgentGroupMemberPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AgentGroupMemberPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AgentGroupMemberPaginatedList)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<AgentGroupMemberPaginatedList>> ApiVapiVersionAgentsAgentIdGetAllGroupMembersGetAsyncWithHttpInfo (string agentId, string apiVersion)
{
// verify the required parameter 'agentId' is set
if (agentId == null)
throw new ApiException(400, "Missing required parameter 'agentId' when calling AgentsApi->ApiVapiVersionAgentsAgentIdGetAllGroupMembersGet");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsAgentIdGetAllGroupMembersGet");
var localVarPath = "/api/v{apiVersion}/Agents/{agentId}/GetAllGroupMembers";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (agentId != null) localVarPathParams.Add("agentId", this.Configuration.ApiClient.ParameterToString(agentId)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsAgentIdGetAllGroupMembersGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AgentGroupMemberPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AgentGroupMemberPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AgentGroupMemberPaginatedList)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< int? > ApiVapiVersionAgentsCountGetWithHttpInfo (string apiVersion, string filter = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsCountGet");
var localVarPath = "/api/v{apiVersion}/Agents/Count";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (filter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$filter", filter)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsCountGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<int?>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(int?) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(int?)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<AgentPaginatedList>> ApiVapiVersionAgentsGetAsyncWithHttpInfo (string apiVersion, string filter = null, string orderby = null, int? top = null, int? skip = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsGet");
var localVarPath = "/api/v{apiVersion}/Agents";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (filter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$filter", filter)); // query parameter
if (orderby != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$orderby", orderby)); // query parameter
if (top != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$top", top)); // query parameter
if (skip != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$skip", skip)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AgentPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(AgentPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(AgentPaginatedList)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< IActionResult > ApiVapiVersionAgentsIdPatchWithHttpInfo (string id, string apiVersion, List<Operation> body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentsApi->ApiVapiVersionAgentsIdPatch");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsIdPatch");
var localVarPath = "/api/v{apiVersion}/Agents/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsIdPatch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionAgentsIdPatchAsyncWithHttpInfo (string id, string apiVersion, List<Operation> body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentsApi->ApiVapiVersionAgentsIdPatch");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsIdPatch");
var localVarPath = "/api/v{apiVersion}/Agents/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsIdPatch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< Agent > ApiVapiVersionAgentsPostWithHttpInfo (string apiVersion, CreateAgentViewModel body = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->ApiVapiVersionAgentsPost");
var localVarPath = "/api/v{apiVersion}/Agents";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionAgentsPost", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Agent>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Agent) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agent)));
}
19
View Source File : AgentsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< AgentViewModel > GetAgentWithHttpInfo (string id, string apiVersion, string organizationId)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling AgentsApi->GetAgent");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling AgentsApi->GetAgent");
var localVarPath = "/api/v{apiVersion}/Agents/{id}";
if (!string.IsNullOrEmpty(organizationId))
localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/Agents/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (!string.IsNullOrEmpty(organizationId)) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetAgent", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<AgentViewModel>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
JsonConvert.DeserializeObject<AgentViewModel>(localVarResponse.Content));
}
19
View Source File : AppApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< string > ApplicationApplicationVersionPatchReleasePutWithHttpInfo (string application, string key = null)
{
// verify the required parameter 'application' is set
if (application == null)
throw new ApiException(400, "Missing required parameter 'application' when calling AppApi->ApplicationApplicationVersionPatchReleasePut");
var localVarPath = "/Application/{application}/Version/Patch/Release";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (application != null) localVarPathParams.Add("application", this.Configuration.ApiClient.ParameterToString(application)); // path parameter
if (key != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "key", key)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApplicationApplicationVersionPatchReleasePut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< int? > ApiVapiVersionreplacedetsCountGetWithHttpInfo (string apiVersion, string filter = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsCountGet");
var localVarPath = "/api/v{apiVersion}/replacedets/Count";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (filter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$filter", filter)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionreplacedetsCountGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<int?>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(int?) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(int?)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<replacedetPaginatedList>> ApiVapiVersionreplacedetsGetAsyncWithHttpInfo (string apiVersion, string filter = null, string orderby = null, int? top = null, int? skip = null)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsGet");
var localVarPath = "/api/v{apiVersion}/replacedets";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (filter != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$filter", filter)); // query parameter
if (orderby != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$orderby", orderby)); // query parameter
if (top != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$top", top)); // query parameter
if (skip != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "$skip", skip)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionreplacedetsGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<replacedetPaginatedList>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(replacedetPaginatedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(replacedetPaginatedList)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< replacedet > ApiVapiVersionreplacedetsGetreplacedetByNamereplacedetNameGetWithHttpInfo (string replacedetName, string apiVersion, string replacedetType = null)
{
// verify the required parameter 'replacedetName' is set
if (replacedetName == null)
throw new ApiException(400, "Missing required parameter 'replacedetName' when calling replacedetsApi->ApiVapiVersionreplacedetsGetreplacedetByNamereplacedetNameGet");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsGetreplacedetByNamereplacedetNameGet");
var localVarPath = "/api/v{apiVersion}/replacedets/GetreplacedetByName/{replacedetName}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (replacedetName != null) localVarPathParams.Add("replacedetName", this.Configuration.ApiClient.ParameterToString(replacedetName)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (replacedetType != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "replacedetType", replacedetType)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionreplacedetsGetreplacedetByNamereplacedetNameGet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<replacedet>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(replacedet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(replacedet)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< IActionResult > ApiVapiVersionreplacedetsIdAddPutWithHttpInfo (string id, string apiVersion, int? value = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling replacedetsApi->ApiVapiVersionreplacedetsIdAddPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsIdAddPut");
var localVarPath = "/api/v{apiVersion}/replacedets/{id}/Add";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (value != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "value", value)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionreplacedetsIdAddPut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionreplacedetsIdAddPutAsyncWithHttpInfo (string id, string apiVersion, string organizationId, int? value = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling replacedetsApi->ApiVapiVersionreplacedetsIdAddPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsIdAddPut");
var localVarPath = "/api/v{apiVersion}/replacedets/{id}/Add";
if (!string.IsNullOrEmpty(organizationId))
localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/replacedets/{id}/Add";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (value != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "value", value)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("Addreplacedet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionreplacedetsIdAppendPutAsyncWithHttpInfo (string id, string apiVersion, string organizationId, string value = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling replacedetsApi->ApiVapiVersionreplacedetsIdAppendPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsIdAppendPut");
var localVarPath = string.Empty;
if (string.IsNullOrEmpty(organizationId))
localVarPath = "/api/v{apiVersion}/replacedets/{id}/Append";
else localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/replacedets/{id}/Append";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (!string.IsNullOrEmpty(organizationId)) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (value != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "value", value)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("Appendreplacedet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionreplacedetsIdDeleteAsyncWithHttpInfo (string id, string apiVersion, string driveName = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling replacedetsApi->ApiVapiVersionreplacedetsIdDelete");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsIdDelete");
var localVarPath = "/api/v{apiVersion}/replacedets/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (driveName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "driveName", driveName)); // query parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionreplacedetsIdDelete", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionreplacedetsIdPatchAsyncWithHttpInfo (string id, string apiVersion, List<Operation> body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling replacedetsApi->ApiVapiVersionreplacedetsIdPatch");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsIdPatch");
var localVarPath = "/api/v{apiVersion}/replacedets/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionreplacedetsIdPatch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<IActionResult>> ApiVapiVersionreplacedetsIdPutAsyncWithHttpInfo (string id, string apiVersion, string organizationId, replacedet body = null)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling replacedetsApi->ApiVapiVersionreplacedetsIdPut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsIdPut");
var localVarPath = string.Empty;
if (string.IsNullOrEmpty(organizationId))
localVarPath = "/api/v{apiVersion}/replacedets/{id}";
else localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/replacedets/{id}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json-patch+json",
"application/json",
"text/json",
"application/_*+json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (!string.IsNullOrEmpty(organizationId)) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("Updatereplacedet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<IActionResult>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(IActionResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(IActionResult)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< replacedet > ApiVapiVersionreplacedetsIdUpdatePutWithHttpInfo (string id, string apiVersion)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling replacedetsApi->ApiVapiVersionreplacedetsIdUpdatePut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsIdUpdatePut");
var localVarPath = "/api/v{apiVersion}/replacedets/{id}/Update";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"multipart/form-data"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (id != null) localVarFormParams.Add("Id", this.Configuration.ApiClient.ParameterToString(id)); // form parameter
//if (name != null) localVarFormParams.Add("Name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter
//if (type != null) localVarFormParams.Add("Type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter
//if (textValue != null) localVarFormParams.Add("TextValue", this.Configuration.ApiClient.ParameterToString(textValue)); // form parameter
//if (numberValue != null) localVarFormParams.Add("NumberValue", this.Configuration.ApiClient.ParameterToString(numberValue)); // form parameter
//if (jsonValue != null) localVarFormParams.Add("JsonValue", this.Configuration.ApiClient.ParameterToString(jsonValue)); // form parameter
//if (fileId != null) localVarFormParams.Add("FileId", this.Configuration.ApiClient.ParameterToString(fileId)); // form parameter
//if (_file != null) localVarFileParams.Add("File", this.Configuration.ApiClient.ParameterToFile("File", _file));
//if (driveName != null) localVarFormParams.Add("DriveName", this.Configuration.ApiClient.ParameterToString(driveName)); // form parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionreplacedetsIdUpdatePut", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<replacedet>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(replacedet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(replacedet)));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public async System.Threading.Tasks.Task<ApiResponse<replacedet>> ApiVapiVersionreplacedetsIdUpdatePutAsyncWithHttpInfo (string id, string apiVersion, string organizationId, string name, string type, Guid? fileId, System.IO.FileStream _file)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling replacedetsApi->ApiVapiVersionreplacedetsIdUpdatePut");
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsIdUpdatePut");
var localVarPath = "/api/v{apiVersion}/replacedets/{id}/Update";
if (!string.IsNullOrEmpty(organizationId))
localVarPath = "/api/v{apiVersion}/Organizations/{organizationId}/replacedets/{id}/Update";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"multipart/form-data"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
string textValue = null;
string numberValue = null;
string jsonValue = null;
if (id != null) localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
if (!string.IsNullOrEmpty(organizationId)) localVarPathParams.Add("organizationId", this.Configuration.ApiClient.ParameterToString(organizationId)); // path parameter
if (id != null) localVarFormParams.Add("Id", this.Configuration.ApiClient.ParameterToString(id)); // form parameter
if (name != null) localVarFormParams.Add("Name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter
if (type != null) localVarFormParams.Add("Type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter
if (textValue != null) localVarFormParams.Add("TextValue", null); // form parameter
if (numberValue != null) localVarFormParams.Add("NumberValue", "0"); // form parameter
if (jsonValue != null) localVarFormParams.Add("JsonValue", null); // form parameter
if (fileId != null) localVarFormParams.Add("FileId", this.Configuration.ApiClient.ParameterToString(fileId)); // form parameter
if (_file != null) localVarFileParams.Add(_file.Name, this.Configuration.ApiClient.ParameterToFile("File", _file));
//if (driveName != null) localVarFormParams.Add("DriveName", this.Configuration.ApiClient.ParameterToString(driveName)); // form parameter
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("UpdateFilereplacedet", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<replacedet>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
JsonConvert.DeserializeObject<replacedet>(localVarResponse.Content));
}
19
View Source File : AssetsApi.cs
License : MIT License
Project Creator : OpenBotsAI
License : MIT License
Project Creator : OpenBotsAI
public ApiResponse< GlobalreplacedetViewModel > ApiVapiVersionreplacedetsPostWithHttpInfo (string apiVersion)
{
// verify the required parameter 'apiVersion' is set
if (apiVersion == null)
throw new ApiException(400, "Missing required parameter 'apiVersion' when calling replacedetsApi->ApiVapiVersionreplacedetsPost");
var localVarPath = "/api/v{apiVersion}/replacedets";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"multipart/form-data"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (apiVersion != null) localVarPathParams.Add("apiVersion", this.Configuration.ApiClient.ParameterToString(apiVersion)); // path parameter
//if (id != null) localVarFormParams.Add("Id", this.Configuration.ApiClient.ParameterToString(id)); // form parameter
//if (name != null) localVarFormParams.Add("Name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter
//if (type != null) localVarFormParams.Add("Type", this.Configuration.ApiClient.ParameterToString(type)); // form parameter
//if (textValue != null) localVarFormParams.Add("TextValue", this.Configuration.ApiClient.ParameterToString(textValue)); // form parameter
//if (numberValue != null) localVarFormParams.Add("NumberValue", this.Configuration.ApiClient.ParameterToString(numberValue)); // form parameter
//if (jsonValue != null) localVarFormParams.Add("JsonValue", this.Configuration.ApiClient.ParameterToString(jsonValue)); // form parameter
//if (fileId != null) localVarFormParams.Add("FileId", this.Configuration.ApiClient.ParameterToString(fileId)); // form parameter
//if (sizeInBytes != null) localVarFormParams.Add("SizeInBytes", this.Configuration.ApiClient.ParameterToString(sizeInBytes)); // form parameter
//if (driveName != null) localVarFormParams.Add("DriveName", this.Configuration.ApiClient.ParameterToString(driveName)); // form parameter
//if (_file != null) localVarFileParams.Add("File", this.Configuration.ApiClient.ParameterToFile("File", _file));
// authentication (oauth2) required
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ApiVapiVersionreplacedetsPost", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GlobalreplacedetViewModel>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(GlobalreplacedetViewModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GlobalreplacedetViewModel)));
}
See More Examples