Example 5: Google Cloud Private CA credential
This example shows you how to call POST Credentials/Create to upload a Google Service Account Key File. The file contains account, credential, and private key information.
The Values array needs these elements:
- Name: Json, Type:string and Value with /n escaped values from the Google Service Account Key File (GSAK) file. You can paste this set of fields:
type
project_id
private_key_id
private_key
client_email
client_id
auth_uri
token_uri
auth_provider_x509_cert_url
client_x509_cert_url
Example: Create a Google Cloud Private CA credential
Request
This sample omits the actual private key and other information. Use your company's Google Service Account Key (GASK) information.
POST https://tpp.venafi.example/vedsdk/Credentials/Create
Authorization:Bearer 4MyGeneratedBearerTknz== { "CredentialPath":"\\VED\\Policy\\Credentials\\Google_credential", "FriendlyName":"Google", "Expiration":"/Date(1893456000000)/", "Values":[ { "Name":"Json", "Type":"string", "Value":"{\n \"type\": \"service_account\",\n \"project_id\": \"gcp-driver\",\n \"All other values from GSAK file\": \"etc...\"\n}" } ] }
HTTP/1.1 200 OK { "Result":1 }