Ana içeriğe geç

Delete Endpoint

Endpoint​

POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/endpoints/delete/

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 (must be REST type)

Request Body​

Full JSON Body Example​

{
"name": "/api/users",
"httpMethod": "GET"
}

Request Body Fields​

FieldTypeRequiredDescription
namestringYesEndpoint path/name (used to identify the endpoint)
httpMethodstringYesHTTP method for the endpoint (used to identify the endpoint). See EnumHttpRequestMethod

Query Parameters​

None

Response​

Success Response (200 OK)​

{
"success": true
}

Response Fields​

FieldTypeDescription
successbooleanIndicates if the request was successful

Error Response (400 Bad Request)​

{
"status": "FAILURE",
"resultMessage": "Endpoint can only be deleted from REST API Proxies!"
}

Common Causes​

  • API Proxy is not REST type (SOAP endpoints cannot be deleted manually)
  • Missing name or httpMethod fields
  • Endpoint with specified name and httpMethod does not exist

Error Response (401 Unauthorized)​

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

cURL Example​

curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/endpoints/delete/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "/api/users",
"httpMethod": "GET"
}'

Full JSON Body Example​

{
"name": "/api/users",
"httpMethod": "GET"
}

Permissions​

User must have API_MANAGEMENT + MANAGE permission in the project.

Notes and Warnings​

  • REST Only: Endpoints can only be deleted from REST API proxies. SOAP endpoints are managed through WSDL reparsing
  • Permanent Deletion: Endpoint deletion is permanent and cannot be undone
  • Policies: All policies associated with the endpoint are also deleted
  • Endpoint Identifier: Endpoint is identified by name and httpMethod combination (not by ID)