> ## Documentation Index
> Fetch the complete documentation index at: https://developers-docs.r25.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# メディア一件取得

> メディアを一件取得



## OpenAPI

````yaml GET /static/projects/{projectId}/spaces/{spaceId}/collection/medias/{mediaId}
openapi: 3.0.0
info:
  title: CDN API
  version: 1.0.0
  description: CDN 経由でデータを取得します。公開済みのコンテンツの配信に使用します。
servers:
  - url: https://cdn.r25.io
    description: CDN APIサーバー
security: []
tags:
  - name: news
    description: ニュースコンテンツに関するAPI
paths:
  /static/projects/{projectId}/spaces/{spaceId}/collection/medias/{mediaId}:
    get:
      description: メディアを一件取得
      parameters:
        - $ref: '#/components/parameters/ProjectIdPathParam'
        - $ref: '#/components/parameters/SpaceIdPathParam'
        - $ref: '#/components/parameters/MediaIdPathParam'
        - $ref: '#/components/parameters/XR25AcApiKeyHeader'
        - $ref: '#/components/parameters/XR25AcApiSecretHeader'
      responses:
        '200':
          description: メディア一件
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaResponse'
        '401':
          description: 認証エラー
        '403':
          description: アクセス権限エラー
        '404':
          description: リソースが見つかりません
        '500':
          description: サーバーエラー
components:
  parameters:
    ProjectIdPathParam:
      description: ご自身のプロジェクトIDを指定してください。
      name: projectId
      in: path
      required: true
      schema:
        type: string
    SpaceIdPathParam:
      description: ご自身のスペースIDを指定してください。
      name: spaceId
      in: path
      required: true
      schema:
        type: string
    MediaIdPathParam:
      description: メディアのIDを指定してください。
      in: path
      name: mediaId
      required: true
      schema:
        type: string
    XR25AcApiKeyHeader:
      description: コンソールで取得したAPIキーを指定してください。
      in: header
      name: x-r25-ac-api-key
      required: true
      schema:
        type: string
    XR25AcApiSecretHeader:
      description: コンソールで取得したAPIシークレットを指定してください。
      in: header
      name: x-r25-ac-api-secret
      required: true
      schema:
        type: string
  schemas:
    MediaResponse:
      allOf:
        - $ref: '#/components/schemas/Media'
    Media:
      type: object
      properties:
        name:
          type: string
          description: メディア名
        assets:
          type: array
          items:
            $ref: '#/components/schemas/MediaAssets'
        type:
          $ref: '#/components/schemas/MediaType'
        mediaId:
          type: string
          description: メディアのID
        projectId:
          type: string
          description: プロジェクトのID
        spaceId:
          type: string
          description: スペースのID
        accessUrl:
          type: string
          format: uri
          description: メディアにアクセスするためのURL。type が video の場合、HLS（.m3u8）のURLを返します。
        thumbnailAccessUrl:
          type: string
          format: uri
          description: サムネイル画像のアクセスURL
        meta:
          $ref: '#/components/schemas/MediaMeta'
        fileSize:
          type: integer
          format: int64
          example: 1234567
          description: ファイルサイズ
        duration:
          type: integer
          format: int64
          example: 1234567
          description: メディアの再生時間
        operations:
          type: array
          items:
            $ref: '#/components/schemas/MediaOperation'
        thumbnailOperations:
          type: array
          items:
            $ref: '#/components/schemas/MediaOperation'
        alias:
          type: string
          description: メディアを一意に識別する文字列
        originalUrl:
          type: string
          format: uri
          description: オリジナル画像のアクセスURL
        status:
          $ref: '#/components/schemas/MediaStatus'
        signed:
          type: boolean
          example: true
          description: 署名付きURLが有効かどうか
      required:
        - name
        - type
        - mediaId
        - spaceId
        - projectId
    MediaAssets:
      type: object
      properties:
        path:
          type: string
          example: media/00000000000000000000000.png
        accessUrl:
          type: string
          format: uri
    MediaType:
      type: string
      enum:
        - image
        - video
      example: image
    MediaMeta:
      type: object
      properties:
        ext:
          type: string
          example: png
        mimetype:
          type: string
          example: image/png
        asset:
          type: string
          enum:
            - AdobeAnimate_cjs_1_0_0
      required:
        - ext
        - mimetype
    MediaOperation:
      oneOf:
        - $ref: '#/components/schemas/MediaOperationTrim'
        - $ref: '#/components/schemas/MediaOperationCrop'
        - $ref: '#/components/schemas/MediaOperationFitIn'
        - $ref: '#/components/schemas/MediaOperationSize'
        - $ref: '#/components/schemas/MediaOperationHorizontalAlign'
        - $ref: '#/components/schemas/MediaOperationVerticalAlign'
        - $ref: '#/components/schemas/MediaOperationSmart'
        - $ref: '#/components/schemas/MediaOperationFilters'
      required:
        - type
    MediaStatus:
      type: string
      enum:
        - published
    MediaOperationTrim:
      type: object
      properties:
        type:
          type: string
          enum:
            - trim
          example: trim
        orientation:
          type: string
          enum:
            - top-left
            - bottom-right
          example: top-left
      required:
        - type
        - orientation
    MediaOperationCrop:
      type: object
      properties:
        type:
          type: string
          enum:
            - crop
          example: crop
        left:
          type: integer
          example: 10
        top:
          type: integer
          example: 10
        right:
          type: integer
          example: 200
        down:
          type: integer
          example: 200
      required:
        - type
        - left
        - top
        - right
        - down
    MediaOperationFitIn:
      type: object
      properties:
        type:
          type: string
          enum:
            - fit-in
          example: fit-in
        value:
          type: string
          enum:
            - fit-in
            - full-fit-in
            - adaptive-fit-in
      required:
        - type
        - value
    MediaOperationSize:
      type: object
      properties:
        type:
          type: string
          enum:
            - size
          example: size
        width:
          type: integer
          example: 512
        height:
          type: integer
          example: 288
      required:
        - type
        - width
        - height
    MediaOperationHorizontalAlign:
      type: object
      properties:
        type:
          type: string
          enum:
            - h-align
          example: h-align
        value:
          type: string
          enum:
            - left
            - center
            - right
          default: center
          example: center
      required:
        - type
        - value
    MediaOperationVerticalAlign:
      type: object
      properties:
        type:
          type: string
          enum:
            - v-align
          example: v-align
        value:
          type: string
          enum:
            - top
            - middle
            - bottom
          default: middle
          example: middle
      required:
        - type
        - value
    MediaOperationSmart:
      type: object
      properties:
        type:
          type: string
          enum:
            - smart
          example: smart
      required:
        - type
    MediaOperationFilters:
      type: object
      properties:
        type:
          type: string
          enum:
            - filters
          example: filters
        fill:
          type: string
          example: FF00CC
        brightness:
          type: string
          example: '-50'
        contrast:
          type: string
          example: '-50'
        backgroundColor:
          type: string
          example: FF00CC
        quality:
          type: integer
          example: 40
        noise:
          type: integer
          example: 10
        blur:
          type: integer
          example: 5
        sharpen:
          type: string
          example: 2.0,1.0,true
        rotate:
          type: integer
          enum:
            - 0
            - 90
            - 180
            - 270
        convolution:
          type: string
          example: '-1;-1;-1;-1;8;-1;-1;-1;-1,3,false'
        roundCorner:
          type: string
          example: 100,255,255,255
        rgb:
          type: string
          example: 20,-20,20
        grayscale:
          type: boolean
          example: true
        equalize:
          type: boolean
          example: true
      required:
        - type

````