Skip to content
Back to skills

2594 Rest Api Endpoints Eead28d4

ASecurity

All write operations require authentication via Application Password:

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
securitygobashapi

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2594-rest-api-endpoints_eead28d4 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2594 Rest Api Endpoints Eead28d4?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2594 Rest Api Endpoints Eead28d4
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2594-rest-api-endpoints-eead28d4/badge)](https://www.skillsdirectory.com/skills/tools-only-2594-rest-api-endpoints-eead28d4)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# WordPress REST API Endpoints

## Authentication

All write operations require authentication via Application Password:

```bash
# Base64 encode credentials
AUTH=$(echo -n "username:xxxx xxxx xxxx xxxx xxxx xxxx" | base64)

# Use in requests
curl -s https://example.com/wp-json/wp/v2/posts \
  -H "Authorization: Basic $AUTH" \
  -H "Content-Type: application/json"
```

## Posts

| Operation | Method | Endpoint |
|-----------|--------|----------|
| List posts | GET | `/wp-json/wp/v2/posts` |
| Get single post | GET | `/wp-json/wp/v2/posts/{id}` |
| Create post | POST | `/wp-json/wp/v2/posts` |
| Update post | PUT | `/wp-json/wp/v2/posts/{id}` |
| Delete post | DELETE | `/wp-json/wp/v2/posts/{id}` |

Create example:

```bash
curl -s https://example.com/wp-json/wp/v2/posts \
  -H "Authorization: Basic $AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My New Post",
    "content": "<p>Post content here.</p>",
    "status": "draft",
    "categories": [3, 5],
    "tags": [10, 12],
    "excerpt": "Brief summary",
    "featured_media": 456
  }' | jq '{id, link, status}'
```

## Pages

Same pattern as posts but at `/wp-json/wp/v2/pages`:

```bash
curl -s https://example.com/wp-json/wp/v2/pages \
  -H "Authorization: Basic $AUTH" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "About Us",
    "content": "<h2>Our Story</h2><p>Content...</p>",
    "status": "publish",
    "parent": 0
  }'
```

## Media

```bash
# Upload image
curl -s https://example.com/wp-json/wp/v2/media \
  -H "Authorization: Basic $AUTH" \
  -H "Content-Disposition: attachment; filename=photo.jpg" \
  -H "Content-Type: image/jpeg" \
  --data-binary @photo.jpg | jq '{id, source_url}'
```

## Categories & Tags

| Resource | Endpoint |
|----------|----------|
| Categories | `/wp-json/wp/v2/categories` |
| Tags | `/wp-json/wp/v2/tags` |

```bash
# Create category
curl -s https://example.com/wp-json/wp/v2/categories \
  -H "Authorization: Basic $AUTH" \
  -H "Content-Type: application/json" \
  -d '{"name": "News", "slug": "news", "description": "Company updates"}'
```

## Useful Query Parameters

| Parameter | Purpose | Example |
|-----------|---------|---------|
| `per_page` | Results per page (max 100) | `?per_page=50` |
| `page` | Pagination | `?page=2` |
| `search` | Search term | `?search=keyword` |
| `status` | Filter by status | `?status=draft` |
| `categories` | Filter by category ID | `?categories=3` |
| `orderby` | Sort field | `?orderby=date` |
| `order` | Sort direction | `?order=desc` |
| `_fields` | Limit response fields | `?_fields=id,title,link` |

## Menus (requires plugin or WP 5.9+)

Navigation menus have limited REST API support. The `/wp-json/wp/v2/navigation` endpoint exists for block-based navigation in FSE themes. For classic menus, use WP-CLI or browser automation.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.