drupal Nodes API
Content node resources representing structured content items of any type (article, page, etc.) stored in Drupal's content management system.
Content node resources representing structured content items of any type (article, page, etc.) stored in Drupal's content management system.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/drupal:drupal-nodes-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Drupal REST Nodes API
description: The Drupal RESTful Web Services API is a core module that exposes Drupal entities and data as REST resources over HTTP.
version: '1.0'
contact:
name: Drupal Community
url: https://www.drupal.org/community
termsOfService: https://www.drupal.org/about/legal
servers:
- url: https://example.com
description: Drupal Site (replace with your Drupal installation base URL)
security:
- basicAuth: []
- cookieAuth: []
tags:
- name: Nodes
description: Content node resources representing structured content items of any type (article, page, etc.) stored in Drupal's content management system.
paths:
/node/{id}:
get:
operationId: getNode
summary: Get a node
description: 'Retrieves a single content node entity by its numeric ID. The response format depends on the Accept header supplied: JSON, HAL+JSON, or XML. Returns the node''s fields, metadata, and any configured display output.'
tags:
- Nodes
parameters:
- $ref: '#/components/parameters/EntityId'
- $ref: '#/components/parameters/AcceptFormat'
responses:
'200':
description: Node entity returned successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
application/hal+json:
schema:
$ref: '#/components/schemas/Node'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
patch:
operationId: updateNode
summary: Update a node
description: Updates an existing content node entity by its numeric ID. Only the fields included in the request body are modified. The caller must have edit permissions for the target node type. Requires authentication.
tags:
- Nodes
parameters:
- $ref: '#/components/parameters/EntityId'
- $ref: '#/components/parameters/ContentTypeFormat'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NodeInput'
application/hal+json:
schema:
$ref: '#/components/schemas/NodeInput'
responses:
'200':
description: Node updated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
operationId: deleteNode
summary: Delete a node
description: Permanently deletes a content node entity by its numeric ID. The caller must have delete permissions for the target node type. This operation cannot be undone. Requires authentication.
tags:
- Nodes
parameters:
- $ref: '#/components/parameters/EntityId'
responses:
'204':
description: Node deleted successfully. No content returned.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/node:
post:
operationId: createNode
summary: Create a node
description: Creates a new content node entity. The request body must include the content type (bundle), title, and any required fields. The caller must have create permissions for the specified node type. Requires authentication.
tags:
- Nodes
parameters:
- $ref: '#/components/parameters/ContentTypeFormat'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NodeInput'
application/hal+json:
schema:
$ref: '#/components/schemas/NodeInput'
responses:
'201':
description: Node created successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
components:
schemas:
StringValue:
type: object
description: Drupal field value wrapper for a string value.
properties:
value:
type: string
description: The string value.
TextContent:
type: object
description: Drupal text field value with optional summary and text format.
properties:
value:
type: string
description: The full text content, may include HTML markup depending on format.
summary:
type: string
description: Optional trimmed summary of the text content.
format:
type: string
description: The text format machine name applied to this field (e.g., basic_html, full_html, plain_text).
TargetId:
type: object
description: Drupal entity reference value wrapper pointing to a related entity.
properties:
target_id:
type: integer
description: The numeric ID of the referenced entity.
Node:
type: object
description: A Drupal content node entity representing structured content of a specific type (bundle) such as article or page.
properties:
nid:
type: array
description: The numeric node ID.
items:
$ref: '#/components/schemas/IntegerValue'
uuid:
type: array
description: The universally unique identifier of the node.
items:
$ref: '#/components/schemas/StringValue'
vid:
type: array
description: The current revision ID.
items:
$ref: '#/components/schemas/IntegerValue'
langcode:
type: array
description: The language code for the node (e.g., en, fr).
items:
$ref: '#/components/schemas/StringValue'
type:
type: array
description: The node type (bundle) machine name (e.g., article, page).
items:
$ref: '#/components/schemas/TargetId'
title:
type: array
description: The node title.
items:
$ref: '#/components/schemas/StringValue'
status:
type: array
description: Publication status. 1 for published, 0 for unpublished.
items:
$ref: '#/components/schemas/BooleanValue'
created:
type: array
description: Unix timestamp of when the node was created.
items:
$ref: '#/components/schemas/IntegerValue'
changed:
type: array
description: Unix timestamp of when the node was last modified.
items:
$ref: '#/components/schemas/IntegerValue'
uid:
type: array
description: Reference to the user who authored the node.
items:
$ref: '#/components/schemas/TargetId'
body:
type: array
description: The main body field containing the node's primary text content.
items:
$ref: '#/components/schemas/TextContent'
NodeInput:
type: object
description: Request body for creating or updating a Drupal content node. Only include the fields that should be set or modified.
properties:
type:
type: array
description: The target node bundle (content type) machine name.
items:
$ref: '#/components/schemas/TargetId'
title:
type: array
description: The node title.
items:
$ref: '#/components/schemas/StringValue'
status:
type: array
description: Publication status. 1 for published, 0 for unpublished.
items:
$ref: '#/components/schemas/BooleanValue'
body:
type: array
description: The body text content with optional summary and format.
items:
$ref: '#/components/schemas/TextContent'
IntegerValue:
type: object
description: Drupal field value wrapper for an integer value.
properties:
value:
type: integer
description: The integer value.
BooleanValue:
type: object
description: Drupal field value wrapper for a boolean value.
properties:
value:
type: integer
description: Boolean represented as integer. 1 for true, 0 for false.
enum:
- 0
- 1
ErrorResponse:
type: object
description: Standard error response returned for 4xx HTTP error codes.
properties:
message:
type: string
description: Human-readable description of the error.
parameters:
EntityId:
name: id
in: path
required: true
description: The numeric ID of the entity.
schema:
type: integer
minimum: 1
AcceptFormat:
name: Accept
in: header
required: false
description: The desired response serialization format. Defaults to application/json. Use application/hal+json for HAL+JSON hypermedia format.
schema:
type: string
enum:
- application/json
- application/hal+json
- application/xml
default: application/json
ContentTypeFormat:
name: Content-Type
in: header
required: true
description: The serialization format of the request body. Must match the format of the data being sent.
schema:
type: string
enum:
- application/json
- application/hal+json
default: application/json
responses:
Forbidden:
description: The authenticated user does not have permission to perform this operation on this resource.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
BadRequest:
description: The request body or parameters are invalid or malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Unauthorized:
description: Authentication is required to access this resource.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
NotFound:
description: The requested entity does not exist or is not accessible.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
securitySchemes:
basicAuth:
type: http
scheme: basic
description: HTTP Basic Authentication using Drupal username and password.
cookieAuth:
type: apiKey
in: cookie
name: SESS
description: Cookie-based session authentication obtained via Drupal login. The session cookie is returned after a successful login request.
oAuth2:
type: oauth2
description: OAuth 2.0 authentication via the Simple OAuth module.
flows:
authorizationCode:
authorizationUrl: https://example.com/oauth/authorize
tokenUrl: https://example.com/oauth/token
scopes:
content: Access and manage content entities
user: Access and manage user entities
externalDocs:
description: Drupal RESTful Web Services API Documentation
url: https://www.drupal.org/docs/drupal-apis/restful-web-services-api/restful-web-services-api-overview