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

Organization 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 /organizations

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 /organizations
Content-Type: */*
Accept: application/json;charset=UTF-8
Authorization: ...

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

                
...
                
              

POST /organizations

An Organization is mainly described by the following attributes (* indicate mandatory attributes):

name* (string)
the name of the organization, a string between 2 and 100 characters long, containing only lowercase alphanumeric characters, '-' and '_' ;
id (string)
the id of the organization;
title (string)
the title of the organization;
description (string)
the description of the organization;
image_url (string)
the URL to an image to be displayed on the organization's page;
state (string, default: 'active')
the current state of the organization, e.g. 'active' or 'deleted', only active organizations show up in search results and other lists of organizations, this parameter will be ignored if you are not authorized to change the state of the organization;
extras (list of dataset extra dictionaries)
the organization's extras, extras are arbitrary (key: value) metadata that can be added to organizations, 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 /organizations
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 /organizations/{ORGANIZATION_ID}

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

Example

Request
DELETE /organizations/{ORGANIZATION_ID}
Content-Type: */*
Accept: */*
Authorization: ...

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

                
...
                
              

GET /organizations/{ORGANIZATION_ID}

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

Example

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

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

                
...
                
              

PATCH /organizations/{ORGANIZATION_ID}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
ORGANIZATION_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 /organizations/{ORGANIZATION_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 /organizations/{ORGANIZATION_ID}

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

Example

Request
PURGE /organizations/{ORGANIZATION_ID}
Content-Type: */*
Accept: */*
Authorization: ...

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

                
...
                
              

PUT /organizations/{ORGANIZATION_ID}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
ORGANIZATION_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 /organizations/{ORGANIZATION_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

                
...