Skip to content

Communities

Community API:s#

Note! You can use community-slug in place of community-id.

List all communities and search for communities#

List all the communities based on search query

  HTTP method: GET

  URL path: /api/communities

  Required parameters: None

  Optional parameters: q, size, page, sort, type

  Status code on success: 200

  Returns: the list of communities (in JSON format) or an error message.

Command:

curl "https://$B2SHARE_HOST/api/communities"

Returns:

{
  "hits": {
    "hits": [
            {
        "id": "e9b9792e-79fb-4b07-b6b4-b9c2bd06d095",
        "created": "2025-10-27T11:13:15.629504+00:00",
        "updated": "2025-10-29T12:11:55.734130+00:00",
        "links": {
          "featured": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/featured",
          "self": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095",
          "self_html": "https://b2share.eudat.eu/communities/eudat/",
          "settings_html": "https://b2share.eudat.eu/communities/eudat/settings",
          "logo": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/logo",
          "rename": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/rename",
          "members": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members",
          "public_members": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members/public",
          "invitations": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/invitations",
          "requests": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/requests",
          "records": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/records",
          "membership_requests": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/membership-requests"
        },
        "revision_id": 6,
        "slug": "eudat",
        "metadata": {
          "title": "EUDAT",
          "description": "The big Eudat community. Use this community if no other is suited for you"
        },
        "access": {
          "visibility": "public",
          "members_visibility": "hidden",
          "member_policy": "open",
          "record_submission_policy": "open",
          "review_policy": "all",
          "record_restricted_policy": "restricted"
        },
        "custom_fields": {},
        "deletion_status": {
          "is_deleted": false,
          "status": "P"
        },
        "children": {
          "allow": false
        }
      },
      ...
    ],
    "total": 26
  },
  "aggregations": {
    "type": {
      "buckets": [
        {
          "key": "project",
          "doc_count": 1,
          "label": "Project",
          "is_selected": false
        }
      ],
      "label": "Type"
    },
    "visibility": {
      "buckets": [
        {
          "key": "public",
          "doc_count": 26,
          "label": "Public",
          "is_selected": false
        }
      ],
      "label": "Visibility"
    }
  },
  "sortBy": "newest",
  "links": {
    "self": "https://b2share.eudat.eu/api/communities?page=1&size=25&sort=newest",
    "next": "https://b2share.eudat.eu/api/communities?page=2&size=25&sort=newest"
  }
}

Get a community#

Get a specific community with community id or community slug

  HTTP method: GET

  URL path: /api/communities/<communit-id/community-slug>

  Required parameters: community-id/community-slug

  Status code on success: 200

  Returns: The community in JSON format.

Command:

curl "https://$B2SHARE_HOST/api/communities/eudat"
Returns:
{
  "id": "e9b9792e-79fb-4b07-b6b4-b9c2bd06d095",
  "created": "2025-10-27T11:13:15.629504+00:00",
  "updated": "2025-10-29T12:11:55.734130+00:00",
  "links": {
    "featured": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/featured",
    "self": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095",
    "self_html": "https://b2share.eudat.eu/communities/eudat/",
    "settings_html": "https://b2share.eudat.eu/communities/eudat/settings",
    "logo": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/logo",
    "rename": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/rename",
    "members": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members",
    "public_members": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members/public",
    "invitations": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/invitations",
    "requests": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/requests",
    "records": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/records",
    "membership_requests": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/membership-requests"
  },
  "revision_id": 6,
  "slug": "eudat",
  "metadata": {
    "title": "EUDAT",
    "description": "The big Eudat community. Use this community if no other is suited for you"
  },
  "access": {
    "visibility": "public",
    "members_visibility": "hidden",
    "member_policy": "open",
    "record_submission_policy": "open",
    "review_policy": "all",
    "record_restricted_policy": "restricted"
  },
  "custom_fields": {},
  "deletion_status": {
    "is_deleted": false,
    "status": "P"
  },
  "children": {
    "allow": false
  },
  "statistics": {
    "records": 1019,
    "files": 7766,
    "file_size": 1181466776793,
    "record_views": 7939,
    "record_downloads": 8620
  }
}

Search your communities#

Search for communities you as a user belong based on a search query

  HTTP method: GET

  URL path: /api/user/communities

  Required parameters: None

  Optional parameters: q, size, page, sort, type

  Status code on success: 200

  Returns: A list of communities the user belong in JSON format.

Command:

curl "https://$B2SHARE_HOST/api/user/communities"
Returns:
{
  "hits": {
    "hits": [
      {
        "id": "ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483",
        "created": "2025-11-14T10:31:48.417481+00:00",
        "updated": "2025-11-14T10:41:32.464340+00:00",
        "links": {
          "featured": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/featured",
          "self": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483",
          "self_html": "https://b2share.eudat.eu/communities/converge/",
          "settings_html": "https://b2share.eudat.eu/communities/converge/settings",
          "logo": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/logo",
          "rename": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/rename",
          "members": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/members",
          "public_members": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/members/public",
          "invitations": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/invitations",
          "requests": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/requests",
          "records": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/records",
          "membership_requests": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/membership-requests"
        },
        "revision_id": 10,
        "slug": "converge",
        "metadata": {
          "title": "CONVERGE",
          "description": "Telecommunications and Computer Vision Convergence Tools for Research Infrastructures",
          "type": {
            "id": "project",
            "title": {
              "cs": "Projekt",
              "de": "Projekt",
              "en": "Project",
              "sv": "Projekt"
            }
          },
          "website": "https://converge-project.eu",
          "funding": [
            {
              "funder": {
                "id": "00k4n6c32",
                "name": "European Commission"
              },
              "award": {
                "id": "00k4n6c32::101094831",
                "number": "101094831",
                "title": {
                  "en": "Telecommunications and Computer Vision Convergence Tools for Research Infrastructures"
                },
                "identifiers": [
                  {
                    "identifier": "https://cordis.europa.eu/projects/101094831",
                    "scheme": "url"
                  }
                ],
                "acronym": "CONVERGE"
              }
            }
          ],
          "organizations": [
            {
              "id": "04m8m1253",
              "name": "CSC - IT Center for Science (Finland)",
              "identifiers": [
                {
                  "identifier": "04m8m1253",
                  "scheme": "ror"
                },
                {
                  "identifier": "grid.20709.3c",
                  "scheme": "grid"
                },
                {
                  "identifier": "0000 0004 0512 9137",
                  "scheme": "isni"
                }
              ]
            },
            ...
          ]
        },
        "access": {
          "visibility": "public",
          "members_visibility": "restricted",
          "member_policy": "open",
          "record_submission_policy": "closed",
          "review_policy": "closed",
          "record_restricted_policy": "restricted"
        },
        "custom_fields": {},
        "deletion_status": {
          "is_deleted": false,
          "status": "P"
        },
        "children": {
          "allow": false
        }
      }
    ],
    "total": 1
  },
  "aggregations": {
    "type": {
      "buckets": [
        {
          "key": "project",
          "doc_count": 1,
          "label": "Project",
          "is_selected": false
        }
      ],
      "label": "Type"
    },
    "visibility": {
      "buckets": [
        {
          "key": "restricted",
          "doc_count": 1,
          "label": "Restricted",
          "is_selected": false
        }
      ],
      "label": "Visibility"
    }
  },
  "sortBy": "newest",
  "links": {
    "self": "https://b2share.eudat.eu/api/user/communities?page=1&size=25&sort=newest"
  }
}

Get the logo of a community.

  HTTP method: GET

  URL path: /api/communities/<community-id>/logo

  Required parameters: community-id

  Status code on success: 200

  Returns: The logo of a community.

Command:

curl "https://$B2SHARE_HOST/api/communities/eudat/logo"

Get community records#

Get records in a specific community.

  HTTP method: GET

  URL path: /api/communities/<community-id>/records

  Required parameters: community-id

  Optional parameters: q, size, page, sort

  Status code on success: 200

  Returns: List of records in a community in JSON format.

Command:

curl "https://$B2SHARE_HOST/api/communities/eudat/records"
Returns:
{
  "hits": {
    "hits": [
      {record},
      ...
    ],
    "total": 1019
  },
  "aggregations": {
    "access_status": {
      "buckets": [
        {
          "key": "open",
          "doc_count": 906,
          "label": "Open",
          "is_selected": false
        },
        {
          "key": "restricted",
          "doc_count": 73,
          "label": "Restricted",
          "is_selected": false
        },
        {
          "key": "metadata-only",
          "doc_count": 37,
          "label": "Metadata-only",
          "is_selected": false
        },
        {
          "key": "embargoed",
          "doc_count": 3,
          "label": "Embargoed",
          "is_selected": false
        }
      ],
      "label": "Access status"
    },
    ...
  },
  "sortBy": "newest",
  "links": {
    "self": "https://b2share.eudat.eu/api/communities/eudat/records?page=1&size=25&sort=newest",
    "next": "https://b2share.eudat.eu/api/communities/eudat/records?page=2&size=25&sort=newest"
  }
}

Get community schema#

Retrieves the latest JSON schema identifier for a specific community.

  HTTP method: GET

  URL path: /api/community-schema-extension/$COMMUNITY_SLUG

  Required parameters: None

  Status code on success: 200

  Returns: the community metadata schema id, embedded in a JSON object, or an error message.

Command:

curl "https://$B2SHARE_HOST/api/community-schema-extension/$COMMUNITY_SLUG"
Returns:
{
  "url": "https://b2share.eudat.eu/api/community-schema-extension/schema/$SCHEMA_ID/jsonschema",
  "uuid": "$SCHEMA_ID"
}

Retrieves the JSON schema by identifier.

  HTTP method: GET

  URL path: /api/community-schema-extension/schema/$COMMUNITY_ID/jsonschema

  Required parameters: None

  Status code on success: 200

  Returns: the community metadata schema, embedded in a JSON object, or an error message.

Command:

curl "https://$B2SHARE_HOST/api/community-schema-extension/schema/$COMMUNITY_ID/jsonschema"
Returns:
{
  "id": "$SCHEMA_ID",
  "json_schema": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "description": "",
    "properties": {
      "metadata_url": {
        "description": "Metadata URL",
        "title": "Metadata URL",
        "type": "string"
      }
    },
    "title": "",
    "type": "object"
  },
  "version": 0
}

List all community schema extensions#

List all community JSON schemas available.

  HTTP method: GET

  URL path: /api/community-schema-extension

  Required parameters: None

  Status code on success: 200

  Returns: the community metadata schemas, or an error message.

Command:

curl "https://$B2SHARE_HOST/api/community-schema-extension"
Returns:
[
  {
    "community_id": "c4234f93-da96-4d2f-a2c8-fa83d0775212",
    "community_schema_version": 1,
    "community_slug": "aalto",
    "schema_id": "36468ef3-30e6-4eee-ae0a-423b9911bac8",
    "section": "Aalto metadata"
  },
  {
    "community_id": "c4234f93-da96-4d2f-a2c8-fa83d0775212",
    "community_schema_version": 2,
    "community_slug": "aalto",
    "schema_id": "419e94c9-9c8b-4527-b12c-51fdd1f27947",
    "section": "Aalto metadata"
  },
  ...
]

Get community members#

Get community members

  HTTP method: GET

  URL path: /api/communities/<communit-id>/members

  Required parameters: community-id

  Optional parameters: q, size, page, sort, role

  Status code on success: 200

  Returns: The community members in JSON format.

Note! Needs to be the ID, slug does not

Command:

curl "https://$B2SHARE_HOST/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members"
Returns:
{
  "hits": {
    "hits": [
      {
        "id": "c10c3124-3bd4-4a0b-a7ee-647e3cab962c",
        "member": {
          "type": "user",
          "id": "1",
          "name": "B2share Superuser",
          "description": "",
          "avatar": "https://b2share.eudat.eu/api/users/1/avatar.svg"
        },
        "role": "owner",
        "visible": false,
        "is_current_user": false,
        "permissions": {
          "can_leave": false,
          "can_delete": false,
          "can_update_role": false,
          "can_update_visible": false
        },
        "created": "2025-10-30T10:32:55.162430+00:00",
        "updated": "2025-10-30T10:43:54.047899+00:00",
        "revision_id": 3
      }
    ],
    "total": 1
  },
  "aggregations": {
    "role": {
      "buckets": [
        {
          "key": "owner",
          "doc_count": 1,
          "label": "Owner",
          "is_selected": false
        }
      ],
      "label": "Role"
    },
    "visibility": {
      "buckets": [
        {
          "key": "false",
          "doc_count": 1,
          "label": "Hidden",
          "is_selected": false
        }
      ],
      "label": "Visibility"
    }
  },
  "sortBy": "name",
  "links": {
    "self": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members?page=1&size=25&sort=name"
  }
}

Search community public members#

Get public members of a community based on a serach query.

  HTTP method: GET

  URL path: /api/communities/<communit-id>/members/public

  Required parameters: community-id

  Status code on success: 200

  Returns: The community members in JSON format.

Command:

curl "https://$B2SHARE_HOST/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members/public"
Returns:
{
  "hits": {
    "hits": [
      {
        "id": "c10c3124-3bd4-4a0b-a7ee-647e3cab962c",
        "member": {
          "type": "user",
          "id": "1",
          "name": "B2share Superuser",
          "description": "",
          "avatar": "https://b2share.eudat.eu/api/users/1/avatar.svg"
        },
        "role": "owner",
        "visible": true,
        "is_current_user": false,
        "permissions": {
          "can_leave": false,
          "can_delete": false,
          "can_update_role": false,
          "can_update_visible": false
        },
        "created": "2025-10-30T10:32:55.162430+00:00",
        "updated": "2025-10-30T10:43:54.047899+00:00",
        "revision_id": 3
      }
    ],
    "total": 1
  },
  "aggregations": {
    "role": {
      "buckets": [
        {
          "key": "owner",
          "doc_count": 1,
          "label": "Owner",
          "is_selected": false
        }
      ],
      "label": "Role"
    },
    "visibility": {
      "buckets": [
        {
          "key": "false",
          "doc_count": 1,
          "label": "Public",
          "is_selected": false
        }
      ],
      "label": "Visibility"
    }
  },
  "sortBy": "name",
  "links": {
    "self": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members?page=1&size=25&sort=name"
  }
}

Search invitations#

Search invitations of a specific community

  HTTP method: GET

  URL path: /api/communities/<communit-id>/invitations

  Required parameters: community-id

  Optional parameters: q, size, page, sort, role, status, is_open

  Status code on success: 200

  Returns: The community invitations in JSON format.

Note! Needs to be the ID, slug does not

Command:

curl "https://$B2SHARE_HOST/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/invitations"
Returns:
{
  "hits": {
    "hits": [],
    "total": 0
  },
  "aggregations": {
    "role": {
      "buckets": [],
      "label": "Role"
    },
    "status": {
      "buckets": [],
      "label": "Status"
    },
    "is_open": {
      "buckets": [],
      "label": "Status"
    }
  },
  "sortBy": "name",
  "links": {
    "self": "https://b2share.eudat.eu/api/communities/ac1a12ab-95fc-40c3-ae5f-7f5bfe8e3483/members?page=1&size=25&sort=name"
  }
}

Invite members#

Invite a member to a community

  HTTP method: POST

  URL path: /api/communities/<communit-id>/invitations

  Required parameters: community-id

  Status code on success: 204

  Returns: No content

Request body

{
    "members":[
        {
            "id":"1",
            "type":"user"
        }
    ],
    "role":"reader",
    "message":"<p>Invitation message</p>"
}

Command:

curl -XPOST -H "Content-Type: application/json" -d '{"members":[{"id": "1", "type": "user"}], "role": "reader", "message": "<p>Invitation message</p>"}' "https://$B2SHARE_HOST/api/communities/eudat/invitations"

Remove members and leave a community#

Remove members from a community or leave a community

  HTTP method: DELETE

  URL path: /api/communities/<communit-id>/members

  Required parameters: community-id

  Status code on success: 204

  Returns: No content

Request payload

{
    "members": [
        {
            "type": "user",
            "id": "1"
        }
    ]
}

Command:

curl -XDELETE -H "Content-Type: application/json" -d '{"members": [{"type": "user", "id": "1"}]}' "https://$B2SHARE_HOST/api/communities/eudat"

Update members#

Update members of a community

  HTTP method: PUT

  URL path: /api/communities/<communit-id>/members

  Required parameters: community-id

  Status code on success: 204

  Returns: No content

Request body

{
    "members": [
        {
            "id": "1",
            "type": "user"
        }
    ],
    "visible": false,
    "role": "curator"
}

Command:

curl -XPUT -H "Content-Type: application/json" -d '{"members": [{"id": "1", "type": "user"}], "visibility": false, "role": "curator"}' "https://$B2SHARE_HOST/api/communities/eudat/members"

Update invitation#

Update an existing invitation to a community.

  HTTP method: PUT

  URL path: /api/communities/<communit-id>/invitations

  Required parameters: community-id

  Status code on success: 204

  Returns: No content

Request body

{
    "members": [
        {
            "id": "1",
            "type": "user"
        }
    ],
    "role": "curator"
}

Command:

curl -XPUT -H "Content-Type: application/json" -d '{"members": [{"id": "1", "type": "user"}], "role": "curator"}' "https://$B2SHARE_HOST/api/communities/eudat/invitations"
Returns:

For administrators#

Create a new community#

Create a new community

  HTTP method: POST

  URL path: /api/communities

  Required parameters: None

  Status code on success: 201

  Returns: The created community in JSON format.

Request body

{
    "access": {
        "visibility": "public",
        "member_policy": "open",
        "record_policy": "open"
    },
    "slug": "community-slug (unique)",
    "metadata": {
        "title": "community title",
        "description": "Community description.",
        "type": {
            "id": "project"
        },
        "curation_policy": "Curation policy.",
        "page": "Community information page.",
        "website": "https://eudat.eu/",
        "organizations": [{
                "name": "EUDAT"
        }, {
            "id": "ROR-identifier"
        }]
    }
}

Command:

curl -XPOST -H "Content-Type: application/json" -d 'community-json' "https://$B2SHARE_HOST/api/communities"
Returns:
{
  "id": "e9b9792e-79fb-4b07-b6b4-b9c2bd06d095",
  "created": "2025-10-27T11:13:15.629504+00:00",
  "updated": "2025-10-27T11:13:15.629504+00:00",
  "links": {
    "featured": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/featured",
    "self": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095",
    "self_html": "https://b2share.eudat.eu/communities/eudat/",
    "settings_html": "https://b2share.eudat.eu/communities/eudat/settings",
    "logo": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/logo",
    "rename": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/rename",
    "members": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members",
    "public_members": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members/public",
    "invitations": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/invitations",
    "requests": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/requests",
    "records": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/records",
    "membership_requests": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/membership-requests"
  },
  "revision_id": 1,
  "slug": "eudat",
  "metadata": {
    "title": "EUDAT",
    "description": "The big Eudat community. Use this community if no other is suited for you",
    ...
  },
  "access": {
    "visibility": "public",
    "members_visibility": "hidden",
    "member_policy": "open",
    "record_submission_policy": "open",
    "review_policy": "all",
    "record_restricted_policy": "restricted"
  },
  "custom_fields": {},
  "deletion_status": {
    "is_deleted": false,
    "status": "P"
  },
  "children": {
    "allow": false
  },
  "statistics": {
    "records": 0,
    "files": 0,
    "file_size": 0,
    "record_views": 0,
    "record_downloads": 0
  }
}

Update community metadata#

Update metadata of the community

  HTTP method: PUT

  URL path: /api/communities/<community-id>

  Required parameters: community-id

  Status code on success: 200

  Returns: The updated community in JSON format.

Request body

{
    "access": {
        "visibility": "public",
        "member_policy": "open",
        "record_policy": "open"
    },
    "slug": "community-slug (unique)",
    "metadata": {
        "title": "community title",
        "description": "Updated description.",
        "type": {
            "id": "project"
        },
        "curation_policy": "Curation policy.",
        "page": "Community information page.",
        "website": "https://eudat.eu/",
        "organizations": [{
                "name": "EUDAT"
        }, {
            "id": "ROR-identifier"
        }]
    }
}

Command:

curl -XPUT -H "Content-Type: application/json" -d 'community-json' "https://$B2SHARE_HOST/api/communities/eudat"
Returns:
{
  "id": "e9b9792e-79fb-4b07-b6b4-b9c2bd06d095",
  "created": "2025-10-27T11:13:15.629504+00:00",
  "updated": "2025-10-30T12:11:55.734130+00:00",
  "links": {
    "featured": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/featured",
    "self": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095",
    "self_html": "https://b2share.eudat.eu/communities/eudat/",
    "settings_html": "https://b2share.eudat.eu/communities/eudat/settings",
    "logo": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/logo",
    "rename": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/rename",
    "members": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members",
    "public_members": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/members/public",
    "invitations": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/invitations",
    "requests": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/requests",
    "records": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/records",
    "membership_requests": "https://b2share.eudat.eu/api/communities/e9b9792e-79fb-4b07-b6b4-b9c2bd06d095/membership-requests"
  },
  "revision_id": 2s,
  "slug": "eudat",
  "metadata": {
    "title": "EUDAT",
    "description": "Updated description",
    ...
  },
  "access": {
    "visibility": "public",
    "members_visibility": "hidden",
    "member_policy": "open",
    "record_submission_policy": "open",
    "review_policy": "all",
    "record_restricted_policy": "restricted"
  },
  "custom_fields": {},
  "deletion_status": {
    "is_deleted": false,
    "status": "P"
  },
  "children": {
    "allow": false
  },
  "statistics": {
    "records": 0,
    "files": 0,
    "file_size": 0,
    "record_views": 0,
    "record_downloads": 0
  }
}

Delete a community#

Delete a specific community.

  HTTP method: DELETE

  URL path: /api/communities/<community-id>

  Required parameters: community-id

  Status code on success: 204

  Returns: No content

Command:

curl -XDELETE "https://$B2SHARE_HOST/api/communities/eudat"

Update the logo of a community

  HTTP method: PUT

  URL path: /api/communities/<community-id>/logo

  Required parameters: community-id

  Status code on success: 200

  Content-type: application/octet-stream

  Returns: The community logo file information in JSON format.

Command:

curl -XPUT -H "Content-Type: application/octet-stream" "https://$B2SHARE_HOST/api/communities/eudat/logo --upload-file ./image.png"
Returns:
...

Delete the logo of a community

  HTTP method: DELETE

  URL path: /api/communities/<community-id>/logo

  Required parameters: community-id

  Status code on success: 204

  Returns: No content

Command:

curl -XDELETE "https://$B2SHARE_HOST/api/communities/eudat/logo"

Last update : 18.11.2025

Last review : 18.11.2025