Starfish Space Media API

Media library attachments (images, documents).

OpenAPI Specification

starfish-space-media-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Starfish Space Website Content API (WordPress REST v2) Media API
  version: '2'
  description: 'The public WordPress REST API served by Starfish Space at https://www.starfishspace.com/wp-json/wp/v2. Starfish Space is a Tukwila, Washington satellite-servicing company building the Otter spacecraft; this API is the content interface behind starfishspace.com (news/press releases, pages, media, taxonomies), not a spacecraft, telemetry or mission-data API. Read operations are available anonymously; write operations require an authenticated WordPress user.


    This document was DERIVED by API Evangelist from documents the API itself publishes: the machine-readable route index at /wp-json/wp/v2 and the item JSON Schemas returned by HTTP OPTIONS on each collection route. No paths, parameters or schema properties were invented.'
  contact:
    name: Starfish Space
    url: https://www.starfishspace.com/contact/
  x-derived-from:
  - https://www.starfishspace.com/wp-json/wp/v2
  - https://www.starfishspace.com/wp-json/wp/v2/{resource} (HTTP OPTIONS)
servers:
- url: https://www.starfishspace.com/wp-json
  description: Production
tags:
- name: media
  description: Media library attachments (images, documents).
paths:
  /wp/v2/media:
    get:
      operationId: listMedia
      tags:
      - media
      summary: List media
      description: Retrieve a collection of media from the Starfish Space WordPress REST API.
      parameters:
      - name: context
        in: query
        required: false
        description: Scope under which the request is made; determines fields present in response.
        schema:
          type: string
          enum:
          - view
          - embed
          - edit
          default: view
      - name: page
        in: query
        required: false
        description: Current page of the collection.
        schema:
          type: integer
          default: 1
          minimum: 1
      - name: per_page
        in: query
        required: false
        description: Maximum number of items to be returned in result set.
        schema:
          type: integer
          default: 10
          minimum: 1
          maximum: 100
      - name: search
        in: query
        required: false
        description: Limit results to those matching a string.
        schema:
          type: string
      - name: after
        in: query
        required: false
        description: Limit response to posts published after a given ISO8601 compliant date.
        schema:
          type: string
          format: date-time
      - name: modified_after
        in: query
        required: false
        description: Limit response to posts modified after a given ISO8601 compliant date.
        schema:
          type: string
          format: date-time
      - name: author
        in: query
        required: false
        description: Limit result set to posts assigned to specific authors.
        schema:
          type: array
          items:
            type: integer
          default: []
      - name: author_exclude
        in: query
        required: false
        description: Ensure result set excludes posts assigned to specific authors.
        schema:
          type: array
          items:
            type: integer
          default: []
      - name: before
        in: query
        required: false
        description: Limit response to posts published before a given ISO8601 compliant date.
        schema:
          type: string
          format: date-time
      - name: modified_before
        in: query
        required: false
        description: Limit response to posts modified before a given ISO8601 compliant date.
        schema:
          type: string
          format: date-time
      - name: exclude
        in: query
        required: false
        description: Ensure result set excludes specific IDs.
        schema:
          type: array
          items:
            type: integer
          default: []
      - name: include
        in: query
        required: false
        description: Limit result set to specific IDs.
        schema:
          type: array
          items:
            type: integer
          default: []
      - name: search_semantics
        in: query
        required: false
        description: How to interpret the search input.
        schema:
          type: string
          enum:
          - exact
      - name: offset
        in: query
        required: false
        description: Offset the result set by a specific number of items.
        schema:
          type: integer
      - name: order
        in: query
        required: false
        description: Order sort attribute ascending or descending.
        schema:
          type: string
          default: desc
          enum:
          - asc
          - desc
      - name: orderby
        in: query
        required: false
        description: Sort collection by post attribute.
        schema:
          type: string
          default: date
          enum:
          - author
          - date
          - id
          - include
          - modified
          - parent
          - relevance
          - slug
          - include_slugs
          - title
      - name: parent
        in: query
        required: false
        description: Limit result set to items with particular parent IDs.
        schema:
          type: array
          items:
            type: integer
          default: []
      - name: parent_exclude
        in: query
        required: false
        description: Limit result set to all items except those of a particular parent ID.
        schema:
          type: array
          items:
            type: integer
          default: []
      - name: search_columns
        in: query
        required: false
        description: Array of column names to be searched.
        schema:
          default: []
          type: array
          items:
            enum:
            - post_title
            - post_content
            - post_excerpt
            type: string
      - name: slug
        in: query
        required: false
        description: Limit result set to posts with one or more specific slugs.
        schema:
          type: array
          items:
            type: string
      - name: status
        in: query
        required: false
        description: Limit result set to posts assigned one or more statuses.
        schema:
          default: inherit
          type: array
          items:
            enum:
            - inherit
            - private
            - trash
            type: string
      - name: media_type
        in: query
        required: false
        description: Limit result set to attachments of a particular media type or media types.
        schema:
          default: null
          type: array
          items:
            type: string
            enum:
            - image
            - video
            - text
            - application
            - audio
      - name: mime_type
        in: query
        required: false
        description: Limit result set to attachments of a particular MIME type or MIME types.
        schema:
          default: null
          type: array
          items:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Attachment'
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
    post:
      operationId: createMedia
      tags:
      - media
      summary: Create or update media
      description: Create or update a media via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters: []
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type:
                  - string
                  - 'null'
                  format: date-time
                  description: The date the post was published, in the site's timezone.
                date_gmt:
                  type:
                  - string
                  - 'null'
                  format: date-time
                  description: The date the post was published, as GMT.
                slug:
                  type: string
                  description: An alphanumeric identifier for the post unique to its type.
                status:
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: A named status for the post.
                title:
                  type: object
                  properties:
                    raw:
                      description: Title for the post, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML title for the post, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: The title for the post.
                author:
                  type: integer
                  description: The ID for the author of the post.
                featured_media:
                  type: integer
                  description: The ID of the featured media for the post.
                comment_status:
                  type: string
                  enum:
                  - open
                  - closed
                  description: Whether or not comments are open on the post.
                ping_status:
                  type: string
                  enum:
                  - open
                  - closed
                  description: Whether or not the post can be pinged.
                meta:
                  type: object
                  properties: []
                  description: Meta fields.
                template:
                  type: string
                  description: The theme file to use to display the post.
                alt_text:
                  type: string
                  description: Alternative text to display when attachment is not displayed.
                caption:
                  type: object
                  properties:
                    raw:
                      description: Caption for the attachment, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML caption for the attachment, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: The attachment caption.
                description:
                  type: object
                  properties:
                    raw:
                      description: Description for the attachment, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML description for the attachment, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      readonly: true
                  description: The attachment description.
                post:
                  type: integer
                  description: The ID for the associated post of the attachment.
      security:
      - basicAuth: []
      - cookieNonce: []
  /wp/v2/media/{id}:
    get:
      operationId: getMediaById
      tags:
      - media
      summary: Retrieve a single media
      description: Retrieve a single media by route parameter from the Starfish Space WordPress REST API.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      - name: context
        in: query
        required: false
        description: Scope under which the request is made; determines fields present in response.
        schema:
          type: string
          enum:
          - view
          - embed
          - edit
          default: view
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
    post:
      operationId: createMediaById
      tags:
      - media
      summary: Create or update media
      description: Create or update a media via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type:
                  - string
                  - 'null'
                  format: date-time
                  description: The date the post was published, in the site's timezone.
                date_gmt:
                  type:
                  - string
                  - 'null'
                  format: date-time
                  description: The date the post was published, as GMT.
                slug:
                  type: string
                  description: An alphanumeric identifier for the post unique to its type.
                status:
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: A named status for the post.
                title:
                  type: object
                  properties:
                    raw:
                      description: Title for the post, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML title for the post, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: The title for the post.
                author:
                  type: integer
                  description: The ID for the author of the post.
                featured_media:
                  type: integer
                  description: The ID of the featured media for the post.
                comment_status:
                  type: string
                  enum:
                  - open
                  - closed
                  description: Whether or not comments are open on the post.
                ping_status:
                  type: string
                  enum:
                  - open
                  - closed
                  description: Whether or not the post can be pinged.
                meta:
                  type: object
                  properties: []
                  description: Meta fields.
                template:
                  type: string
                  description: The theme file to use to display the post.
                alt_text:
                  type: string
                  description: Alternative text to display when attachment is not displayed.
                caption:
                  type: object
                  properties:
                    raw:
                      description: Caption for the attachment, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML caption for the attachment, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: The attachment caption.
                description:
                  type: object
                  properties:
                    raw:
                      description: Description for the attachment, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML description for the attachment, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      readonly: true
                  description: The attachment description.
                post:
                  type: integer
                  description: The ID for the associated post of the attachment.
      security:
      - basicAuth: []
      - cookieNonce: []
    put:
      operationId: updateMediaById
      tags:
      - media
      summary: Update media
      description: Update a media via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type:
                  - string
                  - 'null'
                  format: date-time
                  description: The date the post was published, in the site's timezone.
                date_gmt:
                  type:
                  - string
                  - 'null'
                  format: date-time
                  description: The date the post was published, as GMT.
                slug:
                  type: string
                  description: An alphanumeric identifier for the post unique to its type.
                status:
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: A named status for the post.
                title:
                  type: object
                  properties:
                    raw:
                      description: Title for the post, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML title for the post, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: The title for the post.
                author:
                  type: integer
                  description: The ID for the author of the post.
                featured_media:
                  type: integer
                  description: The ID of the featured media for the post.
                comment_status:
                  type: string
                  enum:
                  - open
                  - closed
                  description: Whether or not comments are open on the post.
                ping_status:
                  type: string
                  enum:
                  - open
                  - closed
                  description: Whether or not the post can be pinged.
                meta:
                  type: object
                  properties: []
                  description: Meta fields.
                template:
                  type: string
                  description: The theme file to use to display the post.
                alt_text:
                  type: string
                  description: Alternative text to display when attachment is not displayed.
                caption:
                  type: object
                  properties:
                    raw:
                      description: Caption for the attachment, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML caption for the attachment, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: The attachment caption.
                description:
                  type: object
                  properties:
                    raw:
                      description: Description for the attachment, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML description for the attachment, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      readonly: true
                  description: The attachment description.
                post:
                  type: integer
                  description: The ID for the associated post of the attachment.
      security:
      - basicAuth: []
      - cookieNonce: []
    patch:
      operationId: updateMediaById2
      tags:
      - media
      summary: Update media
      description: Update a media via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type:
                  - string
                  - 'null'
                  format: date-time
                  description: The date the post was published, in the site's timezone.
                date_gmt:
                  type:
                  - string
                  - 'null'
                  format: date-time
                  description: The date the post was published, as GMT.
                slug:
                  type: string
                  description: An alphanumeric identifier for the post unique to its type.
                status:
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: A named status for the post.
                title:
                  type: object
                  properties:
                    raw:
                      description: Title for the post, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML title for the post, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: The title for the post.
                author:
                  type: integer
                  description: The ID for the author of the post.
                featured_media:
                  type: integer
                  description: The ID of the featured media for the post.
                comment_status:
                  type: string
                  enum:
                  - open
                  - closed
                  description: Whether or not comments are open on the post.
                ping_status:
                  type: string
                  enum:
                  - open
                  - closed
                  description: Whether or not the post can be pinged.
                meta:
                  type: object
                  properties: []
                  description: Meta fields.
                template:
                  type: string
                  description: The theme file to use to display the post.
                alt_text:
                  type: string
                  description: Alternative text to display when attachment is not displayed.
                caption:
                  type: object
                  properties:
                    raw:
                      description: Caption for the attachment, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML caption for the attachment, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: The attachment caption.
                description:
                  type: object
                  properties:
                    raw:
                      description: Description for the attachment, as it exists in the database.
                      type: string
                      context:
                      - edit
                    rendered:
                      description: HTML description for the attachment, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      readonly: true
                  description: The attachment description.
                post:
                  type: integer
                  description: The ID for the associated post of the attachment.
      security:
      - basicAuth: []
      - cookieNonce: []
    delete:
      operationId: deleteMediaById
      tags:
      - m

# --- truncated at 32 KB (53 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/starfish-space/refs/heads/main/openapi/starfish-space-media-api-openapi.yml