Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions docs/source/api/v3/servicecategories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,54 @@ Response Structure
"tenant": null
}
}

``DELETE``
==========
Deletes a specific :term:`Service Category`.

:Auth. Required: Yes
:Roles Required: "admin" or "operations"
:Response Type: ``undefined``


Request Structure
-----------------

.. code-block:: http
:caption: Request Example

DELETE /api/3.0/service_categories/my-service-category HTTP/1.1
User-Agent: python-requests/2.23.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Cookie: mojolicious=...
Content-Length: 0

Response Structure
------------------

.. code-block:: http
:caption: Response Example

HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Content-Encoding: gzip
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 17 Aug 2020 16:13:31 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: yErJobzG9IA0khvqZQK+Yi7X4pFVvOqxn6PjrdzN5DnKVm/K8Kka3REul1XmKJnMXVRY8RayoEVGDm16mBFe4Q==
X-Server-Name: traffic_ops_golang/
Date: Mon, 17 Aug 2020 15:13:31 GMT
Content-Length: 93

{
"alerts": [
{
"text": "serviceCategory was deleted.",
"level": "success"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var FormEditServiceCategoryController = function(serviceCategory, $scope, $contr
}
});
modalInstance.result.then(function() {
deleteServiceCategory(serviceCategory.name);
deleteServiceCategory(serviceCategory);
}, function () {
// do nothing
});
Expand Down