-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTestRequests.PS1
More file actions
85 lines (75 loc) · 3.26 KB
/
TestRequests.PS1
File metadata and controls
85 lines (75 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Requires Powershell 7
# Hinweis: Sobald ein Device als discarded gemeldet wird, funktioniert die Abfrage nach der PrimaryDI nicht mehr!!
# $url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData/c7418f9f-3f31-4329-b2c1-956377dbe23b?languageIso2Code=de' # siehe auch Erläuterung unten
$url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData/daa0ebcd-5773-4280-a1c8-0fb3160e9603?languageIso2Code=de'
"Los gehts mit $url"
$start = Get-Date
$r = Invoke-WebRequest -UseBasicParsing -Uri $Url -ErrorAction SilentlyContinue -SkipHttpErrorCheck -Verbose
$ende = Get-Date
"Dauer: $(($ende-$start).TotalSeconds)"
"Ergebnis: $($r.Status)"
If ($r.StatusCode -eq 200) {
"Ausgabe:"
$r.Content
}
If ($r.StatusCode -eq 500) {
"Request timed out"
}
# $url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData?primaryDi=E4947660611' # Material E4947660611 gibts anscheinend nicht mehr in der Datenbank, deshalb wurde auf E4947662361 gewechselt
$url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData?primaryDi=E4947662361'
"Los gehts mit $url"
$start = Get-Date
$r = Invoke-WebRequest -UseBasicParsing -Uri $Url -TimeoutSec 200 -ErrorAction SilentlyContinue -SkipHttpErrorCheck -Verbose
$ende = Get-Date
"Dauer: $(($ende-$start).TotalSeconds)"
"Ergebnis: $($r.Status)"
If ($r.StatusCode -eq 200) {
"Ausgabe:"
$r.Content
}
If ($r.StatusCode -eq 500) {
"Request timed out"
}
# so wird ein Device als Discarded gemeldet:
#
# "versionState" : {
# "code" : "refdata.eudamed-entity-version-status.discarded"
# },
# "latestVersion" : true,
# "versionNumber" : 1,
# "newDevice" : null,
# "discardedDate" : "2025-06-24",
#
# es kommt also auf den VersionState "refdata.eudamed-entity-version-status.discarded" und discardedDate an.
# $url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData/c7418f9f-3f31-4329-b2c1-956377dbe23b?languageIso2Code=de' # siehe auch Erläuterung unten
# $url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData/daa0ebcd-5773-4280-a1c8-0fb3160e9603?languageIso2Code=de'
$url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData/83026ea4-b935-44f6-b86e-011772c84990?languageIso2Code=de'
"Los gehts mit $url"
$start = Get-Date
$r = Invoke-WebRequest -UseBasicParsing -Uri $Url -ErrorAction SilentlyContinue -SkipHttpErrorCheck -Verbose
$ende = Get-Date
"Dauer: $(($ende-$start).TotalSeconds)"
"Ergebnis: $($r.Status)"
If ($r.StatusCode -eq 200) {
"Ausgabe:"
$r.Content
}
If ($r.StatusCode -eq 500) {
"Request timed out"
}
# $url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData?primaryDi=E4947660611' # Material E4947660611 gibts anscheinend nicht mehr in der Datenbank, deshalb wurde auf E4947662361 gewechselt
$url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData?primaryDi=E4947662361' # Material E4947660611 wird seit Juli 2025 offziell als Discarded geführt
$url = 'https://ec.europa.eu/tools/eudamed/api/devices/udiDiData?primaryDi=E4947681351'
"Los gehts mit $url"
$start = Get-Date
$r = Invoke-WebRequest -UseBasicParsing -Uri $Url -TimeoutSec 200 -ErrorAction SilentlyContinue -SkipHttpErrorCheck -Verbose
$ende = Get-Date
"Dauer: $(($ende-$start).TotalSeconds)"
"Ergebnis: $($r.Status)"
If ($r.StatusCode -eq 200) {
"Ausgabe:"
$r.Content
}
If ($r.StatusCode -eq 500) {
"Request timed out"
}