Class CommandsRequestBuilder
Builds and executes requests for operations under \data\v1\projects{project_id}\commands
public class CommandsRequestBuilder : BaseRequestBuilder
- Inheritance
-
BaseRequestBuilderCommandsRequestBuilder
- Inherited Members
-
BaseRequestBuilder.PathParametersBaseRequestBuilder.RequestAdapterBaseRequestBuilder.UrlTemplate
Constructors
CommandsRequestBuilder(Dictionary<string, object>, IRequestAdapter)
Instantiates a new CommandsRequestBuilder and sets the default values.
public CommandsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter)
Parameters
pathParameters
Dictionary<string, object>Path parameters for the request
requestAdapter
IRequestAdapterThe request adapter to use to execute the requests.
CommandsRequestBuilder(string, IRequestAdapter)
Instantiates a new CommandsRequestBuilder and sets the default values.
public CommandsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter)
Parameters
rawUrl
stringThe raw URL to use for the request builder.
requestAdapter
IRequestAdapterThe request adapter to use to execute the requests.
Methods
PostAsync(CreateCommand, Action<RequestConfiguration<DefaultQueryParameters>>?, CancellationToken)
Commands enable you to perform general operations on multiple resources.For example, you can check whether a user has permission to delete specific versions, items, and folders.Commands are executed by sending requests in the body payload. See the Commands section for more information.
public Task<Command?> PostAsync(CreateCommand body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)
Parameters
body
CreateCommandThe POST body is a JSON object with the following attributes.
requestConfiguration
Action<RequestConfiguration<DefaultQueryParameters>>Configuration for the request such as headers, query parameters, and middleware options.
cancellationToken
CancellationTokenCancellation token to use when cancelling requests
Returns
Exceptions
- Command400Error
When receiving a 400 status code
- Command403Error
When receiving a 403 status code
- Command404Error
When receiving a 404 status code
ToPostRequestInformation(CreateCommand, Action<RequestConfiguration<DefaultQueryParameters>>?)
Commands enable you to perform general operations on multiple resources.For example, you can check whether a user has permission to delete specific versions, items, and folders.Commands are executed by sending requests in the body payload. See the Commands section for more information.
public RequestInformation ToPostRequestInformation(CreateCommand body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = null)
Parameters
body
CreateCommandThe POST body is a JSON object with the following attributes.
requestConfiguration
Action<RequestConfiguration<DefaultQueryParameters>>Configuration for the request such as headers, query parameters, and middleware options.
Returns
- RequestInformation
A Microsoft.Kiota.Abstractions.RequestInformation
WithUrl(string)
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
public CommandsRequestBuilder WithUrl(string rawUrl)
Parameters
rawUrl
stringThe raw URL to use for the request builder.