D4Science D4Science Don't have a D4Science account? Create one Could not find what you are looking for? Contact us.

Group APIs Resource

This concept is mutated by Ckan which is used as underling technology to persist items. Only Catalogue-Admins or above are able to invoke non-safe methods.

GET /groups

Request Parameters
name type description default constraints
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources    
count query false boolean
limit query 10 int
offset query 0 int
Response Body
media type data type description
application/json;charset=UTF-8 string

Example

Request
GET /groups
Content-Type: */*
Accept: application/json;charset=UTF-8
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

                
...
                
              

POST /groups

A group is mainly described by the following attributes (* indicate mandatory attributes):

name* (string)
the name of the group, a string between 2 and 100 characters long, containing only lowercase alphanumeric characters, '-' and '_' ;
id (string)
the id of the group;
title (string)
the title of the group;
description (string)
the description of the group;
image_url (string)
the URL to an image to be displayed on the group’s page;
state (string, default: 'active')
the current state of the group, e.g. 'active' or 'deleted', only active groups show up in search results and other lists of groups, this parameter will be ignored if you are not authorized to change the state of the group;
extras (list of dataset extra dictionaries)
the group’s extras, extras are arbitrary (key: value) metadata that can be added to groups, each extra dictionary should have keys 'key' (a string), 'value' (a string), and optionally 'deleted'.

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
Request Body
media type data type
application/json;charset=UTF-8 string
Response Body
media type data type description
application/json;charset=UTF-8 object

Example

Request
POST /groups
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Authorization: ...

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8

                
...
                
              

DELETE /groups/{GROUP_ID}

Request Parameters
name type description default constraints
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources    
GROUP_ID path    
purge query false boolean
Response Body
media type data type description
*/* object

Example

Request
DELETE /groups/{GROUP_ID}
Content-Type: */*
Accept: */*
Authorization: ...

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: */*

                
...
                
              

GET /groups/{GROUP_ID}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
GROUP_ID path
Response Body
media type data type description
application/json;charset=UTF-8 string

Example

Request
GET /groups/{GROUP_ID}
Content-Type: */*
Accept: application/json;charset=UTF-8
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

                
...
                
              

PATCH /groups/{GROUP_ID}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
GROUP_ID path
Request Body
media type data type
application/json;charset=UTF-8 string
Response Body
media type data type description
application/json;charset=UTF-8 string

Example

Request
PATCH /groups/{GROUP_ID}
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

                
...
                
              

PURGE /groups/{GROUP_ID}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
GROUP_ID path
Response Body
media type data type description
*/* object

Example

Request
PURGE /groups/{GROUP_ID}
Content-Type: */*
Accept: */*
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: */*

                
...
                
              

PUT /groups/{GROUP_ID}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
GROUP_ID path
Request Body
media type data type
application/json;charset=UTF-8 string
Response Body
media type data type description
application/json;charset=UTF-8 string

Example

Request
PUT /groups/{GROUP_ID}
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Authorization: ...

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json;charset=UTF-8

                
...