It worked for me when I was exporting work items from one tenant to another.
I am using Refit with this in C#
- Get the workitems that have attachments and attachment ids:
$subscriptionId = "-GUID-" | |
$resourceGroupName = "-STRING-" | |
$apimName = "-STRING-" | |
$tokenResponse = az account get-access-token --resource https://management.azure.com | ConvertFrom-Json | |
$accessToken = $tokenResponse.accessToken | |
$baseUrl = "https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.ApiManagement/service/${apimName}" | |
$url = "${baseUrl}/portalRevisions?api-version=2022-08-01" |
flowchart TD
Start((start)) --> RequestAssign(Request Assign\nTradesman)
RequestAssign --> VerifyRequest(Request Assign\nTradesman)
VerifyRequest --> Validation{ }
Validation --> |Not Valid| Error(Error)
Validation --> |Valid| AssignToProject(AssignT to Project)
git checkout yourBranch | |
git reset $(git merge-base main $(git branch --show-current)) | |
git add -A | |
git commit -m "one commit on yourBranch" | |
git push -f |
$json = (Invoke-WebRequest -uri "https://location-api.f-secure.com/v1/ip-country").Content | ConvertFrom-JSON | |
Write-Output $json.ip | |
Write-Output $json.country |