ADARx Pharmaceuticals Media API

The site media library.

OpenAPI Specification

adarx-pharmaceuticals-media-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Adarx Pharmaceuticals Media API
  version: '1.0'
  contact:
    name: ADARx Pharmaceuticals
    url: https://www.adarx.com/contact/
    email: info@adarx.com
  description: 'Operations tagged media across 2 of this provider''s published API definitions: adarx-pharmaceuticals-content-openapi.yml, adarx-pharmaceuticals-stop-hae-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://www.adarx.com/wp-json
  description: Production WordPress REST API
- url: https://stophae.com/wp-json
  description: Production WordPress REST API for the STOP-HAE patient site
security: []
tags:
- name: media
  description: The site media library.
paths:
  /wp/v2/media:
    servers:
    - url: https://www.adarx.com/wp-json
      description: Production WordPress REST API
    get:
      operationId: listMedia
      summary: List the media library
      description: 105 attachments as of 2026-08-06 — logos, team headshots, pipeline graphics and press-release imagery.
      tags:
      - media
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/fields'
      - name: parent
        in: query
        description: Limit to attachments of the given post ids.
        schema:
          type: array
          items:
            type: integer
      responses:
        '200':
          description: A page of media items.
          headers:
            X-WP-Total:
              $ref: '#/components/headers/XWPTotal'
            X-WP-TotalPages:
              $ref: '#/components/headers/XWPTotalPages'
            Link:
              $ref: '#/components/headers/LinkPagination'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MediaItem'
        '400':
          $ref: '#/components/responses/BadRequest'
  /wp/v2/media/{id}:
    servers:
    - url: https://www.adarx.com/wp-json
      description: Production WordPress REST API
    get:
      operationId: getMediaItem
      summary: Get one media item
      tags:
      - media
      parameters:
      - $ref: '#/components/parameters/idPath'
      - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: The media item.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaItem'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    idPath:
      name: id
      in: path
      required: true
      schema:
        type: integer
    page:
      name: page
      in: query
      description: 1-indexed page of the collection.
      schema:
        type: integer
        minimum: 1
        default: 1
    fields:
      name: _fields
      in: query
      description: Comma-separated sparse-fieldset projection, e.g. `id,slug,title,link`.
      schema:
        type: string
      example: id,slug,title,link,date
    search:
      name: search
      in: query
      description: Limit results to those matching a string.
      schema:
        type: string
    perPage:
      name: per_page
      in: query
      description: Records per page.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
  schemas:
    RestError:
      type: object
      description: The WordPress REST error envelope. Not RFC 9457 problem+json.
      properties:
        code:
          type: string
          example: rest_post_invalid_id
        message:
          type: string
        data:
          type: object
          properties:
            status:
              type: integer
      required:
      - code
      - message
      - data
    MediaItem:
      type: object
      properties:
        id:
          type: integer
        date:
          type: string
          format: date-time
        slug:
          type: string
        type:
          type: string
          const: attachment
        link:
          type: string
          format: uri
        title:
          $ref: '#/components/schemas/RenderedText'
        media_type:
          type: string
          example: image
        mime_type:
          type: string
          example: image/jpeg
        source_url:
          type: string
          format: uri
        alt_text:
          type: string
        post:
          type: integer
          description: The parent post/page id, when attached.
        media_details:
          type: object
          properties:
            width:
              type: integer
            height:
              type: integer
            sizes:
              type: object
      required:
      - id
      - slug
      - type
      - source_url
    RenderedText:
      type: object
      properties:
        rendered:
          type: string
        protected:
          type: boolean
  headers:
    XWPTotalPages:
      description: Total number of pages available at the current per_page.
      schema:
        type: integer
    XWPTotal:
      description: Total number of records in the collection.
      schema:
        type: integer
    LinkPagination:
      description: RFC 8288 Link header carrying rel="next" / rel="prev".
      schema:
        type: string
  responses:
    BadRequest:
      description: Invalid parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RestError'
    NotFound:
      description: No object found with that id.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RestError'
  securitySchemes:
    applicationPassword:
      type: http
      scheme: basic
      description: WordPress Application Passwords (HTTP Basic with a user login and a generated application password). Advertised by the route index at https://www.adarx.com/wp-admin/authorize-application.php. Only required for the write and administrative routes, which are NOT modelled in this document — every operation above is readable anonymously.
x-refined-from:
- adarx-pharmaceuticals-content-openapi.yml
- adarx-pharmaceuticals-stop-hae-openapi.yml