canonical: https://jentic.com/apis/comunidad.madrid/comunidad

# Comunidad Madrid Adaptador API

The Adaptador API exposes work-item and address-page records from a Comunidad de Madrid intranet backend to AI agents over a REST interface. Agents create a work item with its address and subjects, read or revise it by UUID, and withdraw it through a logical delete. A companion set of operations registers and maintains the address pages tied to each work item. Every operation is secured with OAuth 2.0.

## For AI agents

Create, read, update, and withdraw Comunidad de Madrid work-item and address-page records over REST. Secured with OAuth 2.0.

## Scope

Does not cover municipality, province, or scholarship data in this adapter. Use for work-item and address-page records only.

## Capabilities

- Create a work-item record with its address and subjects
- Retrieve a single work item by its UUID
- Update a work item, its address, or its subjects
- Withdraw a work item through a logical delete
- Register a new address page for a work item
- Look up an address page by its id
- Revise or remove an address page tied to a work item

## Use cases

### Regional Work-Item Automation via Jentic

AI agents reach the Adaptador operations through Jentic without handling the OAuth flow. An agent searches by intent, receives the matching operation schema, and creates or revises a work-item record end to end. Jentic obtains and injects the OAuth access token at execution time, so the agent never sees the secret while it maintains records in the Comunidad de Madrid backend.

Example prompt: Search Jentic for 'create a Comunidad de Madrid work item', load the POST /trabajos schema, and create the record with Jentic-managed OAuth

### Work-Item Lifecycle Management

An agent walks a work item through its full lifecycle: it creates the record, reads it back to confirm state, applies updates to the address or subjects, and finally withdraws it with a logical delete when the item closes. The Adaptador keeps each record addressable by a stable UUID, so the agent can revisit and revise the same item across sessions.

Example prompt: Call POST /trabajos to create the record, then GET `/trabajos/{uuid_trabajo}` and PUT `/trabajos/{uuid_trabajo}` to read and revise it

### Address Page Maintenance

Beyond the work items themselves, an agent maintains the address pages tied to each record. It registers a new address, looks one up by id, and revises or removes it as the underlying information changes. This keeps the address data attached to a work item accurate without a human editing the intranet directly.

Example prompt: Call POST /paginas to register an address, then GET `/paginas/{id_pagina}` to read it back by id

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/trabajos` | Create a work-item record |
| GET | `/trabajos/{uuid_trabajo}` | Retrieve a work item by its UUID |
| PUT | `/trabajos/{uuid_trabajo}` | Update a work item, its address, or its subjects |
| DELETE | `/trabajos/{uuid_trabajo}` | Withdraw a work item through a logical delete |
| POST | `/paginas` | Register a new address page |
| GET | `/paginas/{id_pagina}` | Look up an address page by its id |

## Key resources

- **Trabajos** — Create, read, update, and withdraw work-item records addressed by UUID
- **Paginas** — Register, read, revise, and remove the address pages tied to a work item

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 40 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 99 / 100
  - Developer Experience & Jentic Compatibility: 78 / 100
  - AI-Readiness & Agent Experience: 17 / 100
  - Agent Usability: 94 / 100
  - Security: 35 / 100
  - AI Discoverability: 59 / 100
- **View full report:** https://jentic.com/apis/comunidad.madrid/comunidad/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the Adaptador API by hand means obtaining an OAuth 2.0 access token from the Comunidad de Madrid authorization server, refreshing it, and sequencing the work-item and address-page calls yourself. Through Jentic you install once, import the Adaptador API from the API Directory, store the OAuth credential, and your agent calls it.
- **Permission scoping:** The Adaptador API puts the work-item UUID and address-page id in the URL path, so a rule can pin your agent to one work item or page and the operations you choose. You decide which operations it may call, so a logical delete or an update stays out unless you grant it.
- **Credential handling:** Your Comunidad de Madrid OAuth token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a work item' or 'update an address', and Jentic returns the matching Adaptador operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **Asana** — Alternative work and task management platform
- **Trello** — Alternative board-based task tracking
- **Jira** — Alternative issue and work tracking for teams

## FAQ

### What authentication does the Adaptador API use?

The Adaptador API secures its operations with OAuth 2.0, declared as an oauth2 scheme in its OpenAPI spec, so your agent presents a bearer access token from the Comunidad de Madrid authorization server. Through Jentic, the token is stored encrypted by your own Jentic One instance and injected at call time, so it never enters the agent's prompt or logs.

### Can I create and update work items with the Adaptador API?

Yes. Create a work item with POST /trabajos, retrieve it with GET `/trabajos/{uuid_trabajo}`, and apply changes to the record, its address, or its subjects with PUT `/trabajos/{uuid_trabajo}.`

### What are the rate limits for the Adaptador API?

The OpenAPI spec does not specify rate limits; check the Comunidad de Madrid documentation for current limits. Through Jentic, requests run from your own instance, so you control the pacing of the agent's calls.

### How do I create a work item with the Adaptador API through Jentic?

Search Jentic for 'create a Comunidad de Madrid work item', load the returned POST /trabajos operation with its input schema, and your agent submits the record with the OAuth token injected at call time. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a Comunidad de Madrid Adaptador MCP server?

You don't need an MCP server to give your agent the Adaptador API. Jentic connects it directly from the API Directory: import it, store your OAuth credential, and your agent calls it, discovering operations on demand instead of loading a separate server's tool definitions into its context.

### Can I limit what my agent is allowed to do with the Adaptador API?

Yes. The Adaptador API puts the work-item UUID and address-page id in the URL path, so a rule can scope your agent to one work item or page and the operations you pick, such as reading a record without modifying it. You choose which operations it may call, so a logical delete or an update stays out unless you add it.
