curl Examples
These examples show how to write Online Tags using the Command Prompt/PowerShell.
Write Online Tags
Command Prompt
curl -k -X PUT
"https://localhost:2444/ProcessManagement/PMServer/PMAgentOpenArchitecture/v1/Subscription/RT/TagValues"
-H "Content-Type: application/json" -d "{\"Tags\":
[{\"TagName\":\"System1:ExampleDP_Result.\",\"Value\":28.76,\"AggregationMode\":"None"}]}{"Tags":[{"TagName":"System1:ExampleDP_Result.","State":1}]}PowerShell example
curl -Method PUT -Uri
"https://localhost:2444/ProcessManagement/PMServer/PMAgentOpenArchitecture/v1/Subscription/RT/TagValues"
-Headers @{ "Content-Type" = "application/json" } -Body '{ "Tags":[{ "TagName":"System1:ExampleDP_Result.",
"Value":12.3, "AggregationMode":"None" }] }'StatusCode: 200
StatusDescription: OK
Content: {"Tags":[{"TagName":"System1:ExampleDP_Result.","State":1}]}
RawContent: HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Length: 60
Cache-Control: no-cache...
Forms: {}
Headers: {[X-Frame-Options, SAMEORIGIN], [Strict-Transport-Security, max-age=31536000],
[X-XSS-Protection, 1; mode=block], [X-Content-Type-Options, nosniff]...}
Images: {}
InputFields: {}
Links: {}
ParsedHtml: mshtml.HTMLDocumentClass
RawContentLength: 60Note:
When using PowerShell,
curl does not refer to
curl.exe, but it is instead an alias for
Invoke-WebRequest.