Ask Your Question

what does the return code 201 mean when POST /v2.0/security-groups

asked 2018-01-13 03:56:20 -0500

tanggc gravatar image (

when creating security group, the nomal return code is 201. what does that mean? means the security group was created and ready for use? if not ,why the response body not include some key-value represent the status("active/creating/error")?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2018-01-13 05:43:19 -0500

According to the API description:

This operation creates a security group with default security group rules for the IPv4 and IPv6 ether types.


Normal response codes: 201

201 means that the operation did not result in an error. In other words, it succeeded, and the security group was created.

Security groups have no status. They either exist or not. Therefore, no need for a status code.

edit flag offensive delete link more


if the security group was successful created .why use 201 instead of 200?

tanggc gravatar imagetanggc ( 2018-01-13 05:46:21 -0500 )edit

Wikipedia has a page on HTTP status codes. It says:

201 Created

The request has been fulfilled, resulting in the creation of a new resource.


Bernd Bausch gravatar imageBernd Bausch ( 2018-01-13 06:34:29 -0500 )edit

answered 2018-01-14 23:19:27 -0500

tony.pearce gravatar image

Hi guys, error or status codes nowadays are usually following the HTTP codes:



The request has been fulfilled and has resulted in one or more new resources being created.


edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-01-13 03:56:20 -0500

Seen: 851 times

Last updated: Jan 14 '18