MicrosoftformsClient
Attributes
TRIGGER_OPERATIONS
module-attribute
TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'CreateFormWebhook': {'operation_id': 'CreateFormWebhook', 'path': '/{connectionId}/formapi/api/forms/{form_id}/webhooks', 'method': 'post', 'required_parameters': ['form_id'], 'callback_payload_type': None}}
Classes
GetFormResponseByIdResult
dataclass
GetFormDetailsByIdResult
dataclass
GetFormDetailsByIdResult(*, title: Optional[str] = None, modified_date: Optional[str] = None, created_date: Optional[str] = None, status: Optional[str] = None, created_by: Optional[str] = None)
Response for Get form details
Attributes
title
class-attribute
instance-attribute
Title of the form.
modified_date
class-attribute
instance-attribute
modified_date: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'modifiedDate'})
Datetime when form was last modified.
created_date
class-attribute
instance-attribute
created_date: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'createdDate'})
Datetime when form was created.
status
class-attribute
instance-attribute
Status of the form.
WebhookRequestBody
dataclass
Definition: WebhookRequestBody
Attributes
event_type
class-attribute
instance-attribute
Webhook event
notification_url
class-attribute
instance-attribute
Webhook callback url
WebhookPayload
dataclass
Definition: WebhookPayload
MicrosoftformsClient
MicrosoftformsClient(connection_runtime_url: str, credential: AsyncTokenCredential | AzureKeyCredential, *, max_retry_attempts: int = 3, timeout: float = 30.0, use_exponential_backoff: bool = True, initial_retry_delay_seconds: float = 0.5, maximum_retry_delay_seconds: float = 120.0, retry_jitter_factor: float = 0.1, retry_unsafe_http_methods: bool = False, transport: Optional[AsyncHttpTransport] = None, **kwargs: Any)
Bases: ConnectorClientBase
Typed client for microsoftforms connector.
Initialize a MicrosoftformsClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
credential
|
AsyncTokenCredential | AzureKeyCredential
|
Caller-owned Azure Core credential. |
required |
max_retry_attempts
|
int
|
The maximum number of request attempts. |
3
|
timeout
|
float
|
The network timeout in seconds for each request. The value configures Azure Core retry and transport deadlines. Nonpositive values disable SDK and transport deadlines. |
30.0
|
use_exponential_backoff
|
bool
|
Whether retries use exponential backoff. |
True
|
initial_retry_delay_seconds
|
float
|
The initial retry delay in seconds. |
0.5
|
maximum_retry_delay_seconds
|
float
|
The maximum retry delay in seconds. |
120.0
|
retry_jitter_factor
|
float
|
The jitter fraction applied to retry delays. |
0.1
|
retry_unsafe_http_methods
|
bool
|
Whether unsafe HTTP methods may be retried. |
False
|
transport
|
Optional[AsyncHttpTransport]
|
Optional Azure Core async HTTP transport closed by the client through its asynchronous lifecycle. |
None
|
**kwargs
|
Any
|
Optional Azure Core pipeline policy settings. |
{}
|
Methods:
get_form_response_by_id
async
get_form_response_by_id(form_id: str, response_id: int, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Get response details
This action retrieves a form response
Swagger operation ID: GetFormResponseById.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_id
|
str
|
Unique identifier of the form. |
required |
response_id
|
int
|
Unique identifier of the response. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
get_form_details_by_id
async
get_form_details_by_id(form_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None
Get form details
This action retrieves the details of a form
Swagger operation ID: GetFormDetailsById.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_id
|
str
|
Unique identifier of the form. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
dict[str, Any] | None: The connector operation result. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
list_forms
list_forms(*, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]
List forms
This operation returns a list of forms in your account.
Returns a single-page Azure Core async collection.
Swagger operation ID: ListForms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Type | Description |
|---|---|
AsyncItemPaged[dict[str, Any]]
|
AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector
results. Consume it with |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |
get_questions
async
get_questions(form_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> None
Get questions
Get questions definition in a form.
Swagger operation ID: GetQuestions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_id
|
str
|
Unique id of the form. |
required |
timeout
|
Optional[float]
|
The request timeout in seconds. |
None
|
headers
|
Optional[Mapping[str, str]]
|
Additional HTTP request headers. |
None
|
client_request_id
|
Optional[str]
|
A caller-provided request identifier. |
None
|
response_hook
|
Optional[ConnectorResponseHook]
|
A callback invoked with the connector response. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
The operation completes without a response body. |
Raises:
| Type | Description |
|---|---|
ConnectorException
|
If the connector request fails. |