POST | Profiles

Prev Next

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]
}

Create or edit Kubernetes publication profile

Creates or edits an Kubernetesplugin 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 example

{
  "name_profile": "teste",
  "code_credential": 1,
  "devices": [
    1
  ],
  "secrets": [
    {
      "name": "teste",
      "namespace": "teste"
    }
  ],
  "auto_redeploy": [
    {
      "resource_type": "Deployment",
      "name": "teste",
      "namespace": "teste"
    }
  ]
}