mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 11:27:32 +00:00
doc: add cert template api usage
This commit is contained in:
@@ -55,4 +55,61 @@ In the following steps, we explore how to issue a X.509 certificate using a cert
|
|||||||
</Step>
|
</Step>
|
||||||
</Steps>
|
</Steps>
|
||||||
</Tab>
|
</Tab>
|
||||||
|
<Tab title="API">
|
||||||
|
<Steps>
|
||||||
|
<Step title="Creating the certificate template">
|
||||||
|
To create a certificate template, make an API request to the [Create Certificate Template](/api-reference/endpoints/certificate-templates/create) API endpoint.
|
||||||
|
|
||||||
|
### Sample request
|
||||||
|
|
||||||
|
```bash Request
|
||||||
|
curl --request POST \
|
||||||
|
--url https://app.infisical.com/api/v1/pki/certificate-templates \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"caId": "<string>",
|
||||||
|
"pkiCollectionId": "<string>",
|
||||||
|
"name": "<string>",
|
||||||
|
"commonName": "<string>",
|
||||||
|
"subjectAlternativeName": "<string>",
|
||||||
|
"ttl": "<string>"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Sample response
|
||||||
|
|
||||||
|
```bash Response
|
||||||
|
{
|
||||||
|
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||||
|
"caId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||||
|
"name": "<string>",
|
||||||
|
"commonName": "<string>",
|
||||||
|
"subjectAlternativeName": "<string>",
|
||||||
|
"pkiCollectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||||
|
"ttl": "<string>",
|
||||||
|
"projectId": "<string>",
|
||||||
|
"caName": "<string>"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
</Step>
|
||||||
|
<Step title="Using the certificate template">
|
||||||
|
To use the certificate template, attach the certificate template ID when invoking the API endpoint for [issuing](/api-reference/endpoints/certificates/issue-certificate) or [signing](/api-reference/endpoints/certificates/sign-certificate) new certificates.
|
||||||
|
|
||||||
|
### Sample request
|
||||||
|
|
||||||
|
```bash Request
|
||||||
|
curl --request POST \
|
||||||
|
--url https://app.infisical.com/api/v1/pki/certificates/issue-certificate \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"certificateTemplateId": "<string>",
|
||||||
|
"friendlyName": "<string>",
|
||||||
|
"commonName": "<string>",
|
||||||
|
...
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
</Step>
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
</Tab>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|||||||
Reference in New Issue
Block a user