akamai / cli-property-manager

Use this Property Manager CLI to automate Akamai property changes and deployments across many environments.
Apache License 2.0
29 stars 22 forks source link

create-cpcode not showing API response link #72

Open javiergarza opened 2 years ago

javiergarza commented 2 years ago

Using the create-cpcode parameter to create a CP code should return the response from the API (cpcodeLink followed with the endpoint to use to get details about the new CP code), however, the CLI does not return any output.

I can see the output using the --verbose parameter, so it seems a very easy fix to just print the API response body to standard output.

Here is the API documentation for your convenience: https://developer.akamai.com/api/core_features/property_manager/v1.html#postcpcodes

Here is the command I am using: akamai property-manager create-cpcode --contractId $CONTRACT_ID --groupId $GROUP_ID --productId $PRODUCT_ID --cpcodeName test-cp1

You can run the same command using HTTPie to see the desired output: http --auth-type=edgegrid --auth default: --body POST :/papi/v1/cpcodes contractId==$CONTRACT_ID groupId==$GROUP_ID productId=$PRODUCT_ID cpcodeName=test-cp2

aetsai commented 1 year ago

i don't know that we need to see the full api response, but could the output just return cp code id that was created?

johanneseckerdal commented 1 year ago

As a user of the property manager cli I only care about the cpcode id, and I really look forward to this being fixed.