File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ # ITFlow API - PowerShell examples
2
+ # https://itflow.org
3
+
4
+ # Update credential(s)
5
+
6
+ # API Key
7
+ $apiKey = " a1wEoh1F3omPhea6"
8
+
9
+ # Credential decryption key
10
+ $credKey = " JKyA0daoyOv7oKpw"
11
+
12
+ # Base site URL
13
+ $siteUrl = " https://demo.itflow.org"
14
+
15
+ # Data
16
+ # Required fields are API Key, API Decryption Key, Login ID and Client ID
17
+ # Only specify the fields you need to update, see create.ps1 for column names
18
+ $body = @"
19
+ {
20
+ "api_key" : "$apiKey ",
21
+ "api_key_decrypt_password" : "$credKey ",
22
+ "login_id" : "6",
23
+ "login_username" : "new_username",
24
+ "login_password" : "changedPassword-123",
25
+ "client_id" : "1"
26
+ }
27
+ "@
28
+
29
+ # Module / Endpoint
30
+ $module = " /api/v1/credentials/update.php"
31
+
32
+ # Build URI from defined data
33
+ $uri = $siteUrl + $module
34
+
35
+ # Request
36
+ # Use Invoke-WebRequest instead to see more info about the request/response
37
+ Invoke-RestMethod - Method Post - Uri $uri - Body $body
You can’t perform that action at this time.
0 commit comments