Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update a asset #24

Open
Oliver-NC opened this issue Apr 1, 2019 · 1 comment
Open

Unable to update a asset #24

Oliver-NC opened this issue Apr 1, 2019 · 1 comment

Comments

@Oliver-NC
Copy link

Hi,

I am in the process of creating my own Flexible_assets. I have created the Asset type and the fields however I cannot update the flex assets with either Set or New.

Can you please see my follow commands and what I am doing wrong?

$data2 = @{
type = 'flexible_assets'
attributes = @{
organization_id = ''
flexible_asset_type_id = ''
traits = @{
mailbox_forwards = '''
}
}
}

New-ITGlueFlexibleAssets -data $data2

Error:

New-ITGlueFlexibleAssets : {"errors":[{"status":422,"title":"Unprocessable Entity","detail":"Request contains invalid trait keys","source":{"pointer":"data/attributes/traits"}}]}
At line:1 char:1

  • New-ITGlueFlexibleAssets -data $data2
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-ITGlueFlexibleAssets
    
@ngesnetworks
Copy link

@Oliver-NC I know you said you created the FA, but did you confirm the required fields for creating/updating it? I tend to use the below to at a minimum double check what the API is looking for.


$output = Get-ITGlueFlexibleAssetFields -flexible_asset_type_id <xxx> #insert your flex asset type id
$output.data.attributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants