Hello,
I'm trying to upload a certificate via API to a truststore but I can't see it on the web interface.
That's the URL:
The environment is "dev"
Truststore name is "you-can-delete-me"
The interesting thing is that I get a 204 the first time, but a 409 if I try to upload it twice.
If I try to upload to a non-existent truststore, I get a 404.
If I try to list all certificates from the truststore via API, I see the uploaded certificate.
Adding new truststores via API works just fine.
I don't see the uploaded certificate on the Apigee web interface, though, even if I logout and login again.
Thanks
Solved! Go to Solution.
It seems that the endpoint ending with /certs indeed doesn't work, but the one ending with /aliases does do job.
So instead of using:
POST: https://api.enterprise.apigee.com/v1/organizations/knab/environments/dev/keystores/test/certs
Use:
POST: https://api.enterprise.apigee.com/v1/organizations/knab/environments/dev/keystores/test/aliases
It works
Maybe you're doing it wrong.
Maybe you're looking in the wrong environment.
Maybe something else is amiss. an assumption you're making that isn't quite true. Or possibly a mistake in your code.
I don't understand the 204.
When I upload a cert (using this script), I get a 201 status. The URL is:
POST $mgmtserver/v1/o/$ORG/e/$ENV/keystores/$TRUSTSTORE/aliases?alias=dpc.users.googlers.com&format=keycertfile
The UI uses the API to retrieve keystores / truststores. So if your program performs a GET on the truststore and receives data, the UI will do the same.
Check with your program to verify that what you retrieve refers to the same env + org that you are examining with the UI. Double check everything.
Thanks for you answer.
I double-checked everything, but maybe I'm still doing something wrong.
Also, I can see that the web is not calling the API directly as you said (F12), it's another address, another authentication mechanism, although I know that this is probably just a pipe to the original API.
Anyway, I recorded all my steps in a screen recorder, how could I share this with you in private?
Thanks in advance,
Andre
It seems that the endpoint ending with /certs indeed doesn't work, but the one ending with /aliases does do job.
So instead of using:
POST: https://api.enterprise.apigee.com/v1/organizations/knab/environments/dev/keystores/test/certs
Use:
POST: https://api.enterprise.apigee.com/v1/organizations/knab/environments/dev/keystores/test/aliases