# Add a new application Add a new private access application. An application is defined by a domain (FQDN) and port combination. ## Endpoints **POST** `/sse/api/applications` ## Request URL `https://{server-hostname}:8383/sse/api/applications` ## Scope `SSE.CREATE` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** (`string`, Mandatory): `application/json` - **Accept** (`string`, Mandatory): `application/json` ### Request Body `application/json` **JSON Object** - **name** (`string`, Optional): Display name for the application. Must match regex `[a-zA-Z0-9 .-\t]+`. Required - **type** (`string`, Optional): Application type identifier. Required - **FQDN** (`JSON Object`, Optional): Nested object containing the FQDN, port, and protocol of the protected application. Required ## Sample Request ```bash curl --request POST \ --url https://appdomain/sse/api/applications \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"FQDN":{"protocol":"TCP","fqdn":"portal.internal.company.com","port":443},"name":"Internal Portal","type":1}' ``` ## Sample Request Body ### Create a new TCP application with FQDN, port, and protocol ```json { "FQDN": { "protocol": "TCP", "fqdn": "portal.internal.company.com", "port": 443 }, "name": "Internal Portal", "type": 1 } ``` ### Create a new UDP application ```json { "FQDN": { "protocol": "UDP", "fqdn": "dns.internal.company.com", "port": 53 }, "name": "DNS Server", "type": 1 } ``` ## Response Parameters ### HTTP code 201 Response Body — `application/json` **JSON Object** - **applicationID** (`long`): The unique identifier (auto-generated primary key) of the newly created application ### HTTP code 400 Response Body — `application/json` **JSON Object** - **errorCode** (`string`): Application-specific error code. Possible codes: `API_APPLICATION_004` (maximum 1000 application limit reached), `API_APPLICATION_005` (application with same name already exists), `API_APPLICATION_006` (application with same FQDN, port and protocol already exists), `API_APPLICATION_001` (service-layer duplicate detection), `API_APPLICATION_002` (unknown error while adding application) - **errorMsg** (`string`): Detailed error message describing the specific application creation failure ### HTTP code 401 Response Body — `application/json` **JSON Object** - **errorCode** (`long`): Unauthorized error code returned when authentication credentials are missing, expired, or invalid (authentication=required) - **errorMsg** (`string`): Authentication failure reason ### HTTP code 403 Response Body — `application/json` **JSON Object** - **errorCode** (`long`): Forbidden error code returned when the authenticated user does not have the required uem-roles (e.g., DataEncryption_Admin or DataEncryptionRecoveryKey_Admin) - **errorMsg** (`string`): Message indicating insufficient privileges to access this resource ## Possible Response Codes - **201** — HTTP code - **400** — HTTP code - **401** — HTTP code - **403** — HTTP code ## Sample Response: HTTP 201 Application created successfully — returns the auto-generated application ID ```json { "applicationID": 2001 } ``` ## Sample Response: HTTP 400 ### The tenant has reached the maximum limit of 1000 applications ```json { "errorCode": "API_APPLICATION_004", "errorMsg": "You are allowed to add only up to 1000 Applications" } ``` ### An application with the same name already exists in this tenant ```json { "errorCode": "API_APPLICATION_005", "errorMsg": "An Application with the same name already exists." } ``` ### An application with the same FQDN, port, and protocol combination already exists ```json { "errorCode": "API_APPLICATION_006", "errorMsg": "An Application with the same FQDN, port and protocol already exists." } ``` ### An unexpected error occurred during application creation ```json { "errorCode": "API_APPLICATION_002", "errorMsg": "Unknown error while adding application." } ``` ## Sample Response: HTTP 401 Authentication credentials are missing or invalid ```json { "errorMessage": "You are not authorized to perform this action", "errorCode": "UNAUTHORIZED" } ``` ## Sample Response: HTTP 403 User does not have the required SSE_Write role ```json { "errorMessage": "User does not have permission to perform this operation", "errorCode": "FORBIDDEN" } ```