Delete a service Run in API Explorer

DELETE /services/{id}

Path parameters

  • id string Required

    ID or name of service.

Responses

  • 200

    no error

  • 404 application/json

    no such service

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 500 application/json

    server error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 503 application/json

    node is not part of a swarm

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

DELETE /services/{id}
curl \
 --request DELETE 'http://api.example.com/v1.49/services/{id}'
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (503)
{
  "message": "Something went wrong."
}
Response examples (503)
{
  "message": "Something went wrong."
}