---
title: "Update a given community resource"
method: PUT
path: "/datasets/community_resources/{community}/"
tags: ["datasets"]
---

# Update a given community resource

`PUT /datasets/community_resources/{community}/`

## Request

- Base URL: `https://dados.gov.pt/api/1`
- URL: `https://dados.gov.pt/api/1/datasets/community_resources/{community}/`
- Auth: none declared

## Headers

- `X-Fields` string, mask

## Request body

- CommunityResource
  - `checksum` Checksum
    - `type` 'sha1' | 'sha2' | 'sha256' | 'md5' | 'crc': The hashing algorithm used to compute the checksum
    - `value` string, required: The resulting checksum/hash
  - `created_at` string, date-time: The resource creation date
  - `description` string, markdown: The resource markdown description
  - `extras` object: Extra attributes as key-value pairs
  - `filesize` integer: The resource file size in bytes
  - `filetype` 'file' | 'remote', required: Whether the resource is an uploaded file, a remote file or an API
  - `format` string, required: The resource format
  - `harvest` HarvestResourceMetadata
    - `issued_at` string, date-time: The resource harvested release date
    - `modified_at` string, date-time: The resource harvest last modification date
    - `uri` string: The resource harvest uri
  - `id` string: The resource unique ID
  - `internal` ResourceInternals
    - `created_at_internal` string, date-time, required: The resource's internal creation date on the site
    - `last_modified_internal` string, date-time, required: The resource's internal last modification date
  - `last_modified` string, date-time: The resource last modification date
  - `latest` string: The permanent URL redirecting to the latest version of the resource. When the resource data is updated, the URL will change, the latest URL won't.
  - `metrics` object: The resource metrics
  - `mime` string: The resource mime type
  - `preview_url` string: An optional preview URL to be loaded as a standalone page (ie. iframe or new page)
  - `schema` Schema
    - `name` string
    - `url` string
    - `version` string
  - `title` string, required: The resource title
  - `type` 'main' | 'documentation' | 'update' | 'api' | 'code' | 'other', required: Resource type (documentation, API...)
  - `url` string, required: The resource URL
  - `dataset` DatasetReference
    - `class` string, required: The object class
    - `id` string, required: The object unique identifier
  - `organization` OrganizationReference
    - `class` string, required: The object class
    - `id` string, required: The object unique identifier
    - `acronym` string: The organization acronym
    - `badges` BadgeRead[]: The organization badges
      - `kind` string, required
    - `logo` string: The organization logo URL
    - `logo_thumbnail` string: The organization logo thumbnail URL. This is the square (100x100) and cropped version.
    - `name` string: The organization name
    - `page` string: The organization web page URL
    - `permissions` OrganizationPermissions
      - `delete` boolean
      - `edit` boolean
      - `harvest` boolean
      - `members` boolean
      - `private` boolean
    - `slug` string: The organization string used as permalink
    - `uri` string: The API URI for this organization
  - `owner` UserReference
    - `class` string, required: The object class
    - `id` string, required: The object unique identifier
    - `avatar` string: The user avatar URL
    - `avatar_thumbnail` string: The user avatar thumbnail URL. This is the square (500x500) and cropped version.
    - `first_name` string: The user first name
    - `last_name` string: The user larst name
    - `page` string: The user web page URL
    - `slug` string: The user permalink string
    - `uri` string: The API URI for this user
  - `permissions` DatasetPermissions
    - `delete` boolean
    - `edit` boolean
    - `edit_resources` boolean

## Response `200`

Success

- CommunityResource
  - `checksum` Checksum
    - `type` 'sha1' | 'sha2' | 'sha256' | 'md5' | 'crc': The hashing algorithm used to compute the checksum
    - `value` string, required: The resulting checksum/hash
  - `created_at` string, date-time: The resource creation date
  - `description` string, markdown: The resource markdown description
  - `extras` object: Extra attributes as key-value pairs
  - `filesize` integer: The resource file size in bytes
  - `filetype` 'file' | 'remote', required: Whether the resource is an uploaded file, a remote file or an API
  - `format` string, required: The resource format
  - `harvest` HarvestResourceMetadata
    - `issued_at` string, date-time: The resource harvested release date
    - `modified_at` string, date-time: The resource harvest last modification date
    - `uri` string: The resource harvest uri
  - `id` string: The resource unique ID
  - `internal` ResourceInternals
    - `created_at_internal` string, date-time, required: The resource's internal creation date on the site
    - `last_modified_internal` string, date-time, required: The resource's internal last modification date
  - `last_modified` string, date-time: The resource last modification date
  - `latest` string: The permanent URL redirecting to the latest version of the resource. When the resource data is updated, the URL will change, the latest URL won't.
  - `metrics` object: The resource metrics
  - `mime` string: The resource mime type
  - `preview_url` string: An optional preview URL to be loaded as a standalone page (ie. iframe or new page)
  - `schema` Schema
    - `name` string
    - `url` string
    - `version` string
  - `title` string, required: The resource title
  - `type` 'main' | 'documentation' | 'update' | 'api' | 'code' | 'other', required: Resource type (documentation, API...)
  - `url` string, required: The resource URL
  - `dataset` DatasetReference
    - `class` string, required: The object class
    - `id` string, required: The object unique identifier
  - `organization` OrganizationReference
    - `class` string, required: The object class
    - `id` string, required: The object unique identifier
    - `acronym` string: The organization acronym
    - `badges` BadgeRead[]: The organization badges
      - `kind` string, required
    - `logo` string: The organization logo URL
    - `logo_thumbnail` string: The organization logo thumbnail URL. This is the square (100x100) and cropped version.
    - `name` string: The organization name
    - `page` string: The organization web page URL
    - `permissions` OrganizationPermissions
      - `delete` boolean
      - `edit` boolean
      - `harvest` boolean
      - `members` boolean
      - `private` boolean
    - `slug` string: The organization string used as permalink
    - `uri` string: The API URI for this organization
  - `owner` UserReference
    - `class` string, required: The object class
    - `id` string, required: The object unique identifier
    - `avatar` string: The user avatar URL
    - `avatar_thumbnail` string: The user avatar thumbnail URL. This is the square (500x500) and cropped version.
    - `first_name` string: The user first name
    - `last_name` string: The user larst name
    - `page` string: The user web page URL
    - `slug` string: The user permalink string
    - `uri` string: The API URI for this user
  - `permissions` DatasetPermissions
    - `delete` boolean
    - `edit` boolean
    - `edit_resources` boolean

## Other responses

- `400`: Validation error

## Changes

- **2025-02-18** `8a6c4a5665e6`: 1 info
  - added the non-success response with the status `400`

[Operation history](https://skmtc.dev/dados/apis/udata-api/changes/datasets/community_resources/:community/put.md)

---

[API](https://skmtc.dev/dados/apis/udata-api.md) - [All operations](https://skmtc.dev/dados/apis/udata-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dados/apis/udata-api/revisions/77edaf8a00ea?raw)
