mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
misc: updated certificates v3 endpoint to be under /pki
This commit is contained in:
@@ -11,5 +11,5 @@ export const registerV3Routes = async (server: FastifyZodProvider) => {
|
||||
await server.register(registerUserRouter, { prefix: "/users" });
|
||||
await server.register(registerDeprecatedSecretRouter, { prefix: "/secrets" });
|
||||
await server.register(registerExternalMigrationRouter, { prefix: "/external-migration" });
|
||||
await server.register(registerCertificatesRouter, { prefix: "/certificates" });
|
||||
await server.register(registerCertificatesRouter, { prefix: "/pki/certificates" });
|
||||
};
|
||||
|
||||
@@ -675,7 +675,7 @@ export const certificateV3ServiceFactory = ({
|
||||
status: CertificateOrderStatus.VALID
|
||||
})),
|
||||
authorizations: [],
|
||||
finalize: `/api/v3/certificates/orders/${orderId}/completed`,
|
||||
finalize: `/api/v3/pki/certificates/orders/${orderId}/completed`,
|
||||
certificate: certificateResult.certificate,
|
||||
projectId: certificateResult.projectId,
|
||||
profileName: certificateResult.profileName
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: "Issue certificate"
|
||||
openapi: "POST /api/v1/pki/ca/{caId}/issue-certificate"
|
||||
---
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: "Sign certificate"
|
||||
openapi: "POST /api/v1/pki/ca/{caId}/sign-certificate"
|
||||
---
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
title: "Issue Certificate"
|
||||
openapi: "POST /api/v1/pki/certificates/issue-certificate"
|
||||
openapi: "POST /api/v3/pki/certificates/issue-certificate"
|
||||
---
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
title: "Renew Certificate"
|
||||
openapi: "POST /api/v3/certificates/{certificateId}/renew"
|
||||
openapi: "POST /api/v3/pki/certificates/{certificateId}/renew"
|
||||
---
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
title: "Sign Certificate"
|
||||
openapi: "POST /api/v1/pki/certificates/sign-certificate"
|
||||
openapi: "POST /api/v3/pki/certificates/sign-certificate"
|
||||
---
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
title: "Update Certificate Config"
|
||||
openapi: "PATCH /api/v3/certificates/{certificateId}/config"
|
||||
openapi: "PATCH /api/v3/pki/certificates/{certificateId}/config"
|
||||
---
|
||||
@@ -2585,8 +2585,6 @@
|
||||
"api-reference/endpoints/certificate-authorities/cert",
|
||||
"api-reference/endpoints/certificate-authorities/sign-intermediate",
|
||||
"api-reference/endpoints/certificate-authorities/import-cert",
|
||||
"api-reference/endpoints/certificate-authorities/issue-cert",
|
||||
"api-reference/endpoints/certificate-authorities/sign-cert",
|
||||
"api-reference/endpoints/certificate-authorities/crl"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -105,7 +105,7 @@ Here, select the certificate profile from step 1 that will be used to issue the
|
||||
### Sample request
|
||||
|
||||
```bash Request
|
||||
curl --location --request POST 'https://app.infisical.com/api/v3/certificates/issue-certificate' \
|
||||
curl --location --request POST 'https://app.infisical.com/api/v3/pki/certificates/issue-certificate' \
|
||||
--header 'Authorization: Bearer <access-token>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
@@ -151,7 +151,7 @@ Here, select the certificate profile from step 1 that will be used to issue the
|
||||
### Sample request
|
||||
|
||||
```bash Request
|
||||
curl --location --request POST 'https://app.infisical.com/api/v3/certificates/sign-certificate' \
|
||||
curl --location --request POST 'https://app.infisical.com/api/v3/pki/certificates/sign-certificate' \
|
||||
--header 'Authorization: Bearer <access-token>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
|
||||
@@ -157,7 +157,7 @@ export const useCreateCertificateV3 = (options?: { projectId?: string }) => {
|
||||
return useMutation<TCreateCertificateV3Response, object, TCreateCertificateV3DTO>({
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.post<TCreateCertificateV3Response>(
|
||||
"/api/v3/certificates/issue-certificate",
|
||||
"/api/v3/pki/certificates/issue-certificate",
|
||||
body
|
||||
);
|
||||
return data;
|
||||
@@ -185,7 +185,7 @@ export const useOrderCertificateWithProfile = () => {
|
||||
return useMutation<TOrderCertificateResponse, object, TOrderCertificateDTO>({
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.post<TOrderCertificateResponse>(
|
||||
"/api/v3/certificates/order-certificate",
|
||||
"/api/v3/pki/certificates/order-certificate",
|
||||
body
|
||||
);
|
||||
return data;
|
||||
|
||||
@@ -86,7 +86,7 @@ export const useRenewCertificate = () => {
|
||||
return useMutation<TRenewCertificateResponse, object, TRenewCertificateDTO>({
|
||||
mutationFn: async ({ certificateId }) => {
|
||||
const { data } = await apiRequest.post<TRenewCertificateResponse>(
|
||||
`/api/v3/certificates/${certificateId}/renew`,
|
||||
`/api/v3/pki/certificates/${certificateId}/renew`,
|
||||
{}
|
||||
);
|
||||
return data;
|
||||
@@ -119,7 +119,7 @@ export const useUpdateRenewalConfig = () => {
|
||||
>({
|
||||
mutationFn: async ({ certificateId, renewBeforeDays, enableAutoRenewal }) => {
|
||||
const { data } = await apiRequest.patch<{ message: string; renewBeforeDays?: number }>(
|
||||
`/api/v3/certificates/${certificateId}/config`,
|
||||
`/api/v3/pki/certificates/${certificateId}/config`,
|
||||
{ renewBeforeDays, enableAutoRenewal }
|
||||
);
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user