Organization

List organizations

get

Retrieves a list of all organizations. Each organization includes a name, an optional parent identifying its parent organization (forming a hierarchy), and a description. Returns 200 OK with a list of organizations in the response body.

Responses
200

OK

application/json
get
/organizations
GET /gbds/v2/organizations HTTP/1.1
Host: <ip>:8085
Accept: */*
200

OK

{
  "httpResponse": {
    "httpCode": 1,
    "body": "text"
  },
  "data": [
    {
      "parent": "text",
      "name": "text",
      "description": "text"
    }
  ]
}

Create or update organizations

post

Creates a new organization or updates an existing one. The request body includes the organization's name, optional description, and optional parent indicating the parent organization. A successful creation returns 201 Created, while updating an existing organization returns 202 Accepted.

Body
parentstringOptional
namestringOptional
descriptionstringOptional
Responses
201

Created

application/json
Responseobject
post
/organizations
POST /gbds/v2/organizations HTTP/1.1
Host: <ip>:8085
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "parent": "text",
  "name": "text",
  "description": "text"
}
{}

Get organization

get

Retrieves a single organization by its name. The name path parameter uniquely identifies the organization. The response includes the organization's name, optional parent, and description fields and returns 200 OK when found.

Path parameters
namestringRequired
Responses
200

OK

application/json
get
/organizations/{name}
GET /gbds/v2/organizations/{name} HTTP/1.1
Host: <ip>:8085
Accept: */*
200

OK

{
  "httpResponse": {
    "httpCode": 1,
    "body": "text"
  },
  "data": {
    "parent": "text",
    "name": "text",
    "description": "text"
  }
}

Delete organization

delete

Deletes an organization identified by the name path parameter. On successful deletion, returns 204 No Content.

Path parameters
namestringRequired
Responses
204

NO CONTENT (deleted)

application/json
Responseobject
delete
/organizations/{name}
DELETE /gbds/v2/organizations/{name} HTTP/1.1
Host: <ip>:8085
Accept: */*
204

NO CONTENT (deleted)

{}

Was this helpful?