Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Developer App creation with Management API

Hi @dchiesa1 ,

 

I am making a request to create Developer App in Apigee edge with the below request.

 

 

curl -X POST -v -u abc@xyz.com -H "Content-Type:application/json" localhost:8080/v1/organizations/org/developers/abc@xyz.com/apps -d '{"name":"Test-App3","apiProducts": ["Test-App3"],"keyExpiresIn": "1711436000"}'

 

 

If we look at keyExpiresIn is around 1 year from now. If I look in the Developer App Test-App3 in the UI, expiry is just 20 days from now.

If I use the below request, Developer App expiry is "Never"

 

 

curl -X POST -v -u abc@xyz.com -H "Content-Type:application/json" localhost:8080/v1/organizations/org/developers/abc@xyz.com/apps -d '{"name":"Test-App3","apiProducts": ["Test-App3"],"expiresAt": "-1"}'

 

 

Can you please help?

Solved Solved
1 4 656
1 ACCEPTED SOLUTION

1. keyexpiresin is not a timestamp since epoch, it's just duration in milliseconds.. That's why you got ~20 days initially.

2. An app does not have an expiresAt attribute. This attribute belongs to a credential. Please refer to the docs.

3. You're mixing different units (a seconds timestamp with a milliseconds duration). Again, you don't need to do this if using keyExpiresIn 

 

'{"name":"Test-App3","apiProducts": ["Test-App3"],"keyExpiresIn": 31536000000}'

 

View solution in original post

4 REPLIES 4
Top Solution Authors