cli-property-manager icon indicating copy to clipboard operation
cli-property-manager copied to clipboard

create-cpcode not showing API response link

Open javiergarza opened this issue 3 years ago • 2 comments

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

javiergarza avatar Sep 17 '21 03:09 javiergarza

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?

aetsai avatar Nov 17 '22 15:11 aetsai

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

johanneseckerdal avatar Nov 18 '22 08:11 johanneseckerdal