powershell - 使用 API powershell 将 ITGlue 联系人分配给字段
问题描述
我只想使用 API Powershell 将联系人分配给应用程序的字段和另一个字段,但我不知道该怎么做。谁能帮助我?
解决方案
根据他们的API 文档,没有“应用程序”资源类型。它是自定义资源,还是不同类型对象上的字段?(什么样的?)
尝试从图库(或github 链接)安装 ITGlue 的 PowerShell 包装模块ITGlueAPI:
Install-Module ITGlueAPI
Import-Module ITGlueAPI
# Check out all the available commands
Get-Command -Module ITGlueAPI
# initial setup:
Add-ITGlueBaseURI -base_uri 'http://myapi.gateway.example.com'
Add-ITGlueAPIKey -ApiKey 'your-key-here'
# Play around with these kinds of "Get-" commands which exist for each resource type:
# This is a good way to see how the data is formatted, and which fields exist per resource
Get-ITGlueFlexibleAssets
Get-ITGlueContacts -organization_id 1234 -filter_first_name 'Foo' -sort 'first_name'
# To make changes, run similar "Set-" or "New-" commands with the updates in hash table format:
Set-ITGlueContacts -id 1234 -data @{
location-id = 795
location-name = "San Francisco - HQ"
field-name = "Value"
}
推荐阅读
- python - 控制台关闭后保持 Python 程序运行
- delphi - Fastreport : 详细数据:限制记录数
- javascript - fs.WriteFile() 返回 NULL 并且不写入 JSON 文件
- google-analytics - Google Analytics(分析)在细分中显示令人困惑的数据
- azure - 从 AzureDevOps Replace Tokens 在 appsettings 中设置 JSON 键
- arrays - 关于 C 数组语法的问题
- python - 从组件类访问复合类字段
- oracle - Oracle APEX 5.1 在选项卡容器中选择特定选项卡
- c# - CsvHelper 和 IEnumerable