POST | Create or edit Apache publication profile
Creates or edits a publication profile for an Apache plugin.
- Endpoint:
/api/certificate/profile/apache
- Method:
POST
- Request:
POST /api/certificate/profile/apache
Request parameters
| Parameter |
Type |
Required |
Description |
code_profile |
int |
No |
Existing profile code. We will create a new profile if you don't provide the existing one. |
name_profile |
string |
Yes |
Profile name. |
site |
string |
No |
Site where the certificate should be installed. If not provided, the certificate will be installed on the default Apache site. |
config_path |
string |
No |
Configuration path. Default: /etc/apache2/sites-available/default.com.conf. |
port |
int |
No |
Port. Default: 443. |
code_credential |
int |
Conditional |
A credential code is to be used in the publication. Required if a username is not provided. |
username |
string |
Conditional |
The username is used to locate credentials for publication. Required if code_credential is not provided. |
devices |
array |
Yes |
Array with device codes where the certificate should be published. |
Example using cURL
curl -X POST https://[segura_vault_url]/api/certificate/profile/apache \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name_profile": "Web Servers - Production",
"site": "api.example.com",
"config_path": "/etc/apache2/sites-available/api.example.com.conf",
"port": 443,
"username": "admin",
"devices": [101, 102, 103]
}'
Response
{
"status": 200,
"message": "Profile created successfully",
"error": false,
"code_profile": 22,
"name_profile": "Web Servers - Production",
"site": "api.example.com",
"config_path": "/etc/apache2/sites-available/api.example.com.conf",
"port": 443,
"username": "admin",
"devices": [101, 102, 103]
}
Error responses
| HTTP Status Code |
Description |
| 400 Bad Request |
Invalid parameters provided. |
| 401 Unauthorized |
Unauthorized access. |
| 403 Forbidden |
Forbidden access. |
| 404 Not Found |
Resource not found. |
| 500 Internal Server Error |
Internal server error. |
POST | Create or edit F5 BigIP publication profile
Creates or edits an F5 BigIP plugin publication profile.
- Endpoint:
/api/certificate/profile/bigip
- Method:
POST
- Request:
POST /api/certificate/profile/bigip
Request parameters
| Parameter |
Type |
Required |
Description |
code_profile |
int |
No |
Existing profile code. We will create a new profile if you don't provide the existing one. |
name_profile |
string |
Yes |
Profile name. |
name_partition |
string |
No |
Partition name. |
name_cert |
string |
No |
Certificate name. If a certificate with the same name already exists, it will be replaced during publication. |
profile_client_vips |
array |
No |
Array of SSL Client Profiles and their VIPs. |
profile_server_vips |
array |
No |
Array of SSL Server Profiles and their VIPs. |
code_credential |
int |
Conditional |
A credential code is to be used in the publication. Required if a username is not provided. |
username |
string |
Conditional |
The username is used to locate credentials for publication. Required if code_credential is not provided. |
devices |
array |
Yes |
Array with device codes where the certificate should be published. |
Example using cURL
curl -X POST https://[segura_vault_url]/api/certificate/profile/bigip \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name_profile": "Load Balancers",
"name_partition": "Common",
"name_cert": "api_cert",
"profile_client_vips": [
{
"profile": "clientssl_profile",
"vips": ["vip1", "vip2"]
}
],
"username": "admin",
"devices": [301, 302]
}'
Response
{
"status": 200,
"message": "Profile created successfully",
"error": false,
"code_profile": 41,
"name_profile": "Load Balancers",
"name_partition": "Common",
"name_cert": "api_cert",
"profile_client_vips": [
{
"profile": "clientssl_profile",
"vips": ["vip1", "vip2"]
}
],
"username": "admin",
"devices": [301, 302]
}
Error responses
| HTTP Status Code |
Description |
| 400 Bad Request |
Invalid parameters provided. |
| 401 Unauthorized |
Unauthorized access. |
| 403 Forbidden |
Forbidden access. |
| 404 Not Found |
Resource not found. |
| 500 Internal Server Error |
Internal server error. |
POST | Create or edit WebSphere WAS publication profile
Creates or edits a WebSphere WAS plugin publication profile.
- Endpoint:
/api/certificate/profile/websphere
- Method:
POST
- Request:
POST /api/certificate/profile/websphere
Request parameters
| Parameter |
Type |
Required |
Description |
code_profile |
int |
No |
Existing profile code. We will create a new profile if you don't provide the existing one. |
name_profile |
string |
Yes |
Profile name. |
key_db_path |
string |
Yes |
Key database address and name. |
key_db_password |
string |
Yes |
Server password. |
label |
string |
Yes |
Server label. |
code_credential |
int |
Conditional |
A credential code is to be used in the publication. Required if a username is not provided. |
username |
string |
Conditional |
The username is used to locate credentials for publication. Required if code_credential is not provided. |
devices |
array |
Yes |
Array with device codes where the certificate should be published. |
Example using cURL
curl -X POST https://[segura_vault_url]/api/certificate/profile/websphere \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name_profile": "Application Servers",
"key_db_path": "/opt/IBM/WebSphere/AppServer/etc/key.kdb",
"key_db_password": "password123",
"label": "DefaultCert",
"username": "wasadmin",
"devices": [401, 402]
}'
Response
{
"status": 200,
"message": "Profile created successfully",
"error": false,
"code_profile": 53,
"name_profile": "Application Servers",
"key_db_path": "/opt/IBM/WebSphere/AppServer/etc/key.kdb",
"key_db_password": "********",
"label": "DefaultCert",
"username": "wasadmin",
"devices": [401, 402]
}
Error responses
| HTTP Status Code |
Description |
| 400 Bad Request |
Invalid parameters provided. |
| 401 Unauthorized |
Unauthorized access. |
| 403 Forbidden |
Forbidden access. |
| 404 Not Found |
Resource not found. |
| 500 Internal Server Error |
Internal server error. |
POST | Create or edit IIS publication profile
Creates or edits an IIS plugin publication profile.
- Endpoint:
/api/certificate/profile/iis
- Method:
POST
- Request:
POST /api/certificate/profile/iis
Request parameters
| Parameter |
Type |
Required |
Description |
code_profile |
int |
No |
Existing profile code. If not provided, a new profile will be created. |
name_profile |
string |
Yes |
Profile name. |
site |
string |
No |
Site where the certificate should be installed. If not provided, the certificate will be installed on the default IIS site. |
cert_store |
string |
No |
IIS certificate management repository. Default: MY. |
port |
int |
No |
Port. Default: 443. |
code_credential |
int |
Conditional |
Credential code to be used in publication. Required if username is not provided. |
username |
string |
Conditional |
Username used to locate credentials for publication. Required if code_credential is not provided. |
devices |
array |
Yes |
Array with device codes where the certificate should be published. |
Example using cURL
curl -X POST https://[segura_vault_url]/api/certificate/profile/iis \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name_profile": "Windows Servers",
"site": "intranet.example.com",
"cert_store": "MY",
"port": 443,
"code_credential": 15,
"devices": [201, 202]
}'
Response
{
"status": 200,
"message": "Profile created successfully",
"error": false,
"code_profile": 35,
"name_profile": "Windows Servers",
"site": "intranet.example.com",
"cert_store": "MY",
"port": 443,
"code_credential": 15,
"devices": [201, 202]
}
Error responses
| HTTP Status Code |
Description |
| 400 Bad Request |
Invalid parameters provided. |
| 401 Unauthorized |
Unauthorized access. |
| 403 Forbidden |
Forbidden access. |
| 404 Not Found |
Resource not found. |
| 500 Internal Server Error |
Internal server error. |
POST | Create or edit Kubernetes publication profile
Creates or edits an Kubernetes plugin publication profile.
- Endpoint:
/api/certificate/profile/kubernetes
- Method:
POST
- Request:
POST /api/certificate/profile/kubernetes
Request parameters
| Field |
Type |
Required |
Description |
code_profile |
int |
No |
The code of an already created profile. If not provided, the system will interpret it as the creation of a new profile. |
name_profile |
string |
Yes |
The name of the profile to be created. |
code_credential |
int |
Conditional |
The credential code to be used for the publication. A previously registered credential will be used. This is required if no username is provided. |
username |
string |
Conditional |
The username to locate credentials for the publication. Required if no code_credential is provided. |
devices |
array |
Yes |
Array with the codes of the devices where the certificate should be published. |
secrets |
array |
No |
Array of objects with names and namespaces of the secrets to be created or updated in the respective namespaces. Each item must have a name and namespace. |
auto_redeploy |
array |
No |
The system contains an array of automatic redeploy objects. Each object must specify a valid Kubernetes resource_type along with name and namespace. |
Example using cURL
curl -X POST \
https://[segura_vault_url]/api/certificate/profile/kubernetes \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [seu-token]' \
-d '{
"name_profile": "teste",
"code_credential": 1,
"devices": [1],
"secrets": [
{
"name": "teste",
"namespace": "teste"
}
],
"auto_redeploy": [
{
"resource_type": "Deployment",
"name": "teste",
"namespace": "teste"
}
]
}
Response
{
"name_profile": "teste",
"code_credential": 1,
"devices": [
1
],
"secrets": [
{
"name": "teste",
"namespace": "teste"
}
],
"auto_redeploy": [
{
"resource_type": "Deployment",
"name": "teste",
"namespace": "teste"
}
]
}
Error responses
| HTTP Status Code |
Description |
| 400 Bad Request |
Invalid parameters provided. |
| 401 Unauthorized |
Unauthorized access. |
| 403 Forbidden |
Forbidden access. |
| 404 Not Found |
Resource not found. |
| 500 Internal Server Error |
Internal server error. |