v1

latestSwagger 2.0Apache 2.02026-07-1334102.9 MB
Nodes

Update a contributor

Updates a contributor by setting the values of the attributes specified in the request body. Any unspecified attributes will be left unchanged.

Contributors can be updated with either a PUT or PATCH request. Since this endpoint has no mandatory attributes, PUT and PATCH are functionally the same.

Permissions

Only project administrators can update the contributors on a node.

Returns

Returns a JSON object with a data key containing the new representation of the updated contributor, if the request is successful.

If the request is unsuccessful, an errors key containing information about the failure will be returned. Refer to the list of error codes to understand why this request may have failed.

If the given user is not already in the contributor list, a 404 Not Found error will be returned. A node must always have at least one admin, and any attempt to downgrade the permissions of a sole admin will result in a 400 Bad Request error.

patch/nodes/{node_id}/contributors/{user_id}/

Path parameters

node_idstring required

The unique identifier of the node.

user_idstring required

The unique identifier of the user.

Request body

idstring

The identifier of the contributor entity. Contributor identifiers have the form {node_id}-{user_id}.

typestring required

The type identifier of the contributor entity (contributors).

Example request

{
  "data": {
    "type": "contributors",
    "attributes": {},
    "relationships": {
      "user": {
        "data": {
          "type": "users",
          "id": "guid0"
        }
      }
    }
  }
}

Response

OK