Creates a new Group.
Note: By default the new Group will not be linked from any other group in the domain. A link element can be included in the request body to have an existing group link to the new group. Alternatively, use the PUT link operation to link the new group.
POST /groups HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>
POST /groups?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>
This implementation of the operation does not use request parameters.
This implementation of the operation uses only the request headers that are common to most requests. See ../CommonRequestHeaders
Optionally the request body can be a JSON object that has a link key with sub-keys:
The UUID of the group that the new group should be linked to. If the UUID is not valid, the request will fail and a new group will not be created.
The name of the new link.
This implementation of the operation uses only response headers that are common to most responses. See ../CommonResponseHeaders
.
On success, a JSON response will be returned with the following elements:
The UUID of the newly created group.
The root group of the domain which the group was created in.
The number of attributes belonging to the group.
The number of links belonging to the group.
A timestamp giving the time the group was created in UTC (ISO-8601 format).
A timestamp giving the most recent time the group has been modified (i.e. attributes or links updated) in UTC (ISO-8601 format).
This implementation of the operation does not return special errors. For general information on standard error codes, see ../CommonErrorResponses
.
Create a new, un-linked Group.
POST /groups HTTP/1.1
Host: hsdshdflab.hdfgroup.org
X-Hdf-domain: /shared/tall.h5
Content-Length: 0
Accept: */*
Accept-Encoding: gzip, deflate
$ curl -X POST -u username:password --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/groups
HTTP/1.1 201 Created
Content-Length: 202
Server: nginx/1.15.0
Date: Thu, 12 Jul 2018 16:49:10 GMT
Content-Type: application/json
{
"id": "g-7fbbf52a-85f3-11e8-9cc2-0242ac120008",
"root": "g-b116b6f0-85e9-11e8-9cc2-0242ac120008",
"created": 1531414150.1522243,
"lastModified": 1531414150.1522243,
"linkCount": 0,
"attributeCount": 0
}
Create a new Group, link to root (which has uuid of "g-b116b6f0-...") as "linked_group".
POST /groups HTTP/1.1
Host: hsdshdflab.hdfgroup.org
X-Hdf-domain: /shared/tall.h5
Content-Length: 82
Accept: */*
Accept-Encoding: gzip, deflate
{
"link": {
"id": "g-b116b6f0-85e9-11e8-9cc2-0242ac120008",
"name": "linked_group"
}
}
$ curl -X POST -u username:password --header "X-Hdf-domain: /shared/tall.h5"
-d "{\"link\": {\"id\": \"g-b116b6f0-85e9-11e8-9cc2-0242ac120008\", \"name\": \"linked_group\"}}" hsdshdflab.hdfgroup.org/groups
HTTP/1.1 201 Created
Content-Length: 200
Server: nginx/1.15.0
Date: Thu, 12 Jul 2018 16:57:57 GMT
Content-Type: application/json
{
"id": "g-b9bd362a-85f4-11e8-a549-0242ac12000b",
"root": "g-b116b6f0-85e9-11e8-9cc2-0242ac120008",
"linkCount": 0,
"attributeCount": 0,
"lastModified": 1531414676.963812,
"created": 1531414676.963812
}
DELETE_Group
GET_Links
PUT_Link
GET_Group
GET_Groups