POST | Create or edit Apache publication profile
Creates or edits a publication profile for an Apache plugin.
- Endpoint:
/api/v1/publication-profiles/apache
- Method:
POST
- Request:
POST /api/v1/publication-profiles/apache
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
code_profile |
Integer |
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 |
Integer |
No | Port. Default: 443 . |
code_credential |
Integer |
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/v1/publication-profiles/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]
}
Create or edit F5 BigIP publication profile
Creates or edits an F5 BigIP plugin publication profile.
- Endpoint:
/api/v1/publication-profiles/f5-bigip
- Method:
POST
- Request:
POST /api/v1/publication-profiles/f5-bigip
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
code_profile |
Integer |
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 |
Integer |
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/v1/publication-profiles/f5-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]
}
Create or edit WebSphere WAS publication profile
Creates or edits a WebSphere WAS plugin publication profile.
- Endpoint:
/api/v1/publication-profiles/websphere-was
- Method:
POST
- Request:
POST /api/v1/publication-profiles/websphere-was
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
code_profile |
Integer |
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 |
Integer |
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/v1/publication-profiles/websphere-was \
-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]
}
Create or edit IIS publication profile
Creates or edits an IIS plugin publication profile.
- Endpoint:
/api/v1/publication-profiles/iis
- Method:
POST
- Request:
POST /api/v1/publication-profiles/iis
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
code_profile |
Integer |
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 |
Integer |
No | Port. Default: 443. |
code_credential |
Integer |
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/v1/publication-profiles/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]
}