Ana içeriğe geç

Update NTLM Settings

Endpoint

PATCH /apiops/projects/{projectName}/apiProxies/{apiProxyName}/settings/ntlm/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyNamestringYesAPI Proxy name

Request Body

Full JSON Body Example

{
"ntlmSettings": {
"enabled": true,
"domain": "EXAMPLE",
"username": "user",
"password": "password",
"workstation": "WORKSTATION01"
},
"deploy": false,
"deployTargetEnvironmentNameList": []
}

Request Body Fields

FieldTypeRequiredDefaultDescription
ntlmSettingsobjectYes-NTLM settings object (see fields below)
deploybooleanNofalseIf true, deploy the API proxy after saving changes
deployTargetEnvironmentNameListarray[string]No[]List of environment names to deploy to (required when deploy=true)

ntlmSettings Fields

FieldTypeRequiredDefaultDescription
enabledbooleanNofalseEnable/disable NTLM authentication
domainstringNo*-Windows domain name (required if enabled=true)
usernamestringNo*-Windows username (required if enabled=true)
passwordstringNo*-Windows password (required if enabled=true)
workstationstringNo-Workstation name (optional)

Note: All fields are optional. Only provided fields are updated.

Password Security: Password is encrypted when stored.

Response

Success Response (200 OK)

{
"success": true
}

When deploy=true is specified:

{
"success": true,
"deploymentResult": {
"deploymentResults": [
{
"environmentName": "prod-env",
"success": true
}
]
}
}

Response Fields

FieldTypeDescription
successbooleanIndicates if the request was successful
deploymentResultobjectDeployment result details (only present when deploy=true)
deploymentResult.deploymentResultsarrayList of deployment results per environment
deploymentResult.deploymentResults[].environmentNamestringName of the target environment
deploymentResult.deploymentResults[].successbooleanWhether deployment to this environment succeeded

Error Response (400 Bad Request)

{
"error": "bad_request",
"error_description": "Domain, username, and password are required when NTLM is enabled"
}

Error Response (401 Unauthorized)

{
"error": "unauthorized_client",
"error_description": "Invalid token"
}

Error Response (404 Not Found)

{
"error": "not_found",
"error_description": "ApiProxy (name: MyAPI) was not found!"
}

cURL Example

Example 1: Enable NTLM Authentication

curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/ntlm/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ntlmSettings": {
"enabled": true,
"domain": "EXAMPLE",
"username": "user",
"password": "password",
"workstation": "WORKSTATION01"
}
}'

Example 2: Enable NTLM without Workstation

curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/ntlm/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ntlmSettings": {
"enabled": true,
"domain": "EXAMPLE",
"username": "user",
"password": "password"
}
}'

Example 3: Save and Deploy

curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/ntlm/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ntlmSettings": {
"enabled": true,
"domain": "EXAMPLE",
"username": "user",
"password": "password",
"workstation": "WORKSTATION01"
},
"deploy": true,
"deployTargetEnvironmentNameList": ["prod-env"]
}'

Notes and Warnings

  • Domain: Windows domain name (required when enabled=true)
  • Username: Windows username (required when enabled=true)
  • Password: Windows password (required when enabled=true, encrypted when stored)
  • Workstation: Optional workstation name
  • NTLM Protocol: Uses NTLM v1/v2 authentication
  • Security: Password is encrypted using default encryption algorithm
  • Deploy: When deploy=true, the API proxy is automatically deployed to the specified environments after saving

Permissions

User must have API_MANAGEMENT + MANAGE permission in the project.