Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HCRitter/PSMSGraphBatchRequest
This Module assists the creation of Batch Requests for Microsoft Graph by converting PSObjects to JSON with proper schema validation
https://github.com/HCRitter/PSMSGraphBatchRequest
Last synced: about 2 months ago
JSON representation
This Module assists the creation of Batch Requests for Microsoft Graph by converting PSObjects to JSON with proper schema validation
- Host: GitHub
- URL: https://github.com/HCRitter/PSMSGraphBatchRequest
- Owner: HCRitter
- License: mit
- Created: 2024-01-26T10:42:00.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-26T12:46:21.000Z (12 months ago)
- Last Synced: 2024-08-03T05:01:46.553Z (5 months ago)
- Language: PowerShell
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-entra - PSMSGraphBatchRequest - PowerShell module to transform data into Microsoft Graph Batch Requests. [![stars](https://badgen.net/github/stars/HCRitter/PSMSGraphBatchRequest)](https://badgen.net/github/stars/HCRitter/PSMSGraphBatchRequest) (Tools / CLI)
README
# PSMSGraphBatchRequest
The MSGraphBatchRequest PowerShell module provides a convenient way to transform data into Microsoft Graph Batch Requests by converting PowerShell objects to JSON with proper schema validation.## Features
- Batch Request Schema: Enforces adherence to a specified JSON schema for Microsoft Graph Batch Requests.
- Batch Size Control: Allows batching of requests based on a specified batch size.
- Schema Validation: Validates the transformed JSON against the predefined schema.## Usage
```PowerShell
$Calls = @(
[PSCustomObject]@{
id = '1'
method = "GET"
url = '/users/me'
},
[PSCustomObject]@{
id = '2'
method = "GET"
url = '/devices'
}
)ConvertTo-MSGraphBatchRequest -Requests $Calls
```
returns:
```json
{
"requests": [
{
"id": "1",
"method": "GET",
"url": "/users/me"
},
{
"id": "2",
"method": "GET",
"url": "/devices"
}
]
}
```