Azure / Azure/api-center

Provide object property docs for` az apic api update --custom-properties` + example

Open
#20 2 comments 0 reactions 1 assignee Claimed by @neilpeterson View on GitHub
Solution provided
Dominant language
PowerShell
Stars
45
Forks
21
Avg merge
21m
Merged PRs (30d)
1

Description

I am trying to add custom data to an API with the Azure CLI and cannot get the shorthand syntax correct. Are there properties and / or examples that can be added to the CLI docs / help to assist?

CLI help output

```
PS > az apic api update --custom-properties ??

Argument
--custom-properties : Object
The custom metadata defined for API catalog entities.
See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about
shorthand syntax.

Object Properties
```

I've tried several things, based on the REST spec this seems most likely. Notes, the API schema has been updated to include `internal_id`.

```
az apic api update -g $API_CENTER_RESOURCE_GROUP_NAME -s $API_CENTER_INSTANCE_NAME -w default --name $APICAPIName --custom-properties "{properties:{internal_id:'3c3544e5-d623-4650-aaa4-b06c5467f162'}}"
```

However, this results in the following error.

```
Failed to parse '--custom-properties' argument: Shorthand Syntax Error: Expect character ',' or ']':
{properties:[internal_id:
```

Thanks a bunch.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.