openapi: 3.0.0
info:
  title: Pinata V3 API
  version: 1.0.0
servers:
  - url: https://api.pinata.cloud/v3
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
security:
  - bearerAuth: []
paths:
  /api_keys:
    get:
      tags:
        - default
      summary: List API Keys
      description: |
        `org:write`
      parameters:
        - name: revoked
          in: query
          schema:
            type: boolean
          description: Returns only API keys that have been revoked
          example: "true"
        - name: limitedUse
          in: query
          schema:
            type: boolean
          description: Returns only API keys with a max_uses value set
          example: "true"
        - name: exhausted
          in: query
          schema:
            type: boolean
          description: >-
            Can only be used in conjunction with limitedUse query set to true.
            Returns only API keys with max_uses that have hit their use limit.
          example: "true"
        - name: name
          in: query
          schema:
            type: string
          description: Returns API keys that match ilike on the API keys name column
          example: 70707d38-d683-4cc5-9e46-162d6f57d320
        - name: offset
          in: query
          schema:
            type: number
          description: Paginate through list of keys by offsetting number of results
          example: 10
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 12 Jun 2024 15:57:42 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "571"
            Connection:
              schema:
                type: string
                example: keep-alive
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                keys:
                  - id: d4ea5a38-4e0a-4126-8fd4-7534d258a995
                    name: 5d945010-d9f0-4ef5-a7a9-4eb487dcdf53
                    key: 6270c5f4ed520756d498effbb6eb4b5f
                    max_uses: 2
                    uses: 2
                    user_id: 32bd7147-51d5-4df2-8771-7aeb9dcac7a2
                    scopes:
                      endpoints:
                        pinning:
                          pinFileToIPFS: true
                          pinJSONToIPFS: true
                      admin: false
                    revoked: true
                    createdAt: "2024-06-12T15:34:50.324Z"
                    updatedAt: "2024-06-12T15:34:51.204Z"
                count: 1
    post:
      tags:
        - default
      summary: Create API Key
      description: |
        `org:write`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                keyName:
                  type: string
                  description: Name of the API key
                permissions:
                  type: object
                  properties:
                    admin:
                      type: boolean
                      description: Provides full access to permissions
                    resources:
                      type: array
                      description: Provide an array of scopes in the form `org:<RESOURCE>:<PERMISSION>`. Resources include `files`, `groups`, `gateways`, and `analytics`. Permissions are either `read` or `write` (`write` includes `read` permissions)
                      items:
                        type: string
                    endpoints:
                      type: object
                      description: |
                        ### Legacy endpoints
                        These properties are to be used with [legacy endpoints](/api-reference/endpoint/ipfs/pin-file-to-ipfs), any V3 endpoints should use `resources` instead
                      properties:
                        data:
                          type: object
                          properties:
                            pinList:
                              type: boolean
                            userPinnedDataTotal:
                              type: boolean
                        pinning:
                          type: object
                          properties:
                            hashMetadata:
                              type: boolean
                            hashPinPolicy:
                              type: boolean
                            pinByHash:
                              type: boolean
                            pinFileToIPFS:
                              type: boolean
                            pinJSONToIPFS:
                              type: boolean
                            pinJobs:
                              type: boolean
                            unpin:
                              type: boolean
                            userPinPolicy:
                              type: boolean
              required:
                - keyName
              example:
                keyname: A test
                permissions:
                  admin: true
                maxUses: 2
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 18 Jun 2024 18:52:56 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "818"
            Connection:
              schema:
                type: string
                example: keep-alive
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                JWT: >-
                  JWT
                pinata_api_key: key
                pinata_api_secret: >-
                  secret
  /api_keys/{key}:
    delete:
      tags:
        - default
      summary: Revoke API Key
      description: |
        `org:write`
      parameters:
        - name: key
          in: path
          schema:
            type: string
          required: true
          example: 8624b6dd1e6f04
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 18 Jun 2024 18:26:07 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "9"
            Connection:
              schema:
                type: string
                example: keep-alive
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example: Revoked
  /gateways:
    get:
      tags:
        - default
      summary: List Gateways
      description: |
        `org:gateways:read`
      parameters:
        - name: pageSize
          in: query
          schema:
            type: integer
          description: Limits the number of results
          example: "1"
        - name: page
          in: query
          schema:
            type: integer
          description: Paginates through results by offsetting the results
          example: "2"
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:10:48 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "919"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: e321b967c4f4ba6a43947bc195b12bbc
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  count: 5
                  rows:
                    - id: 01dae16b-699c-472a-a61e-975a7b9777bd
                      created_at: "2023-01-24T19:51:17.493Z"
                      domain: restricted-example
                      restrict: false
                      custom_domains:
                        - domain: ipfs.pinata.cloud
                          domain_validation_status: pending
                          custom_domain_id: 87980e39-fe71-4dba-9b05-3dfc66593539
                          ssl_validation_status: initializing
    post:
      tags:
        - default
      summary: Create Gateway
      description: |
        `org:gateways:write`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  description: Desired name for Gateway subdomain
              example:
                domain: dweb5
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:21:49 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "250"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 1c734bcad3dce59b9164d1088045a5be
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  id: 5eb8b151-77b3-4e46-8243-5b6282131a9e
                  created_at: "2024-07-12T15:21:47.966866Z"
                  domain: dweb3
                  restrict: false
                  custom_domains: []
                  settings:
                    restriction_policies:
                      accessTokens: []
                      allowedHosts: []
                      allowedIPAddresses: []
  /gateways/{id}:
    get:
      tags:
        - default
      summary: Gateway Details
      description: |
        `org:gateways:read`
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 01dae16b-699c-472a-a61e-975a7b9777bd
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:10:18 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "823"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 5f66a3d6dca358f8351f5840160cd956
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  id: 01dae16b-699c-472a-a61e-975a7b9777bd
                  created_at: "2023-01-24T19:51:17.493Z"
                  domain: restricted-example
                  restrict: false
                  custom_domains:
                    - domain: ipfs.pinata.cloud
                      domain_validation_status: pending
                      custom_domain_id: 87980e39-fe71-4dba-9b05-3dfc66593539
                      ssl_validation_status: initializing
                  settings:
                    restriction_policies:
                      accessTokens:
                        - id: d199be6a-3bee-461b-b7fb-e1225eafe28e
                          value: >-
                            key
                          createdAt: "2024-07-12T15:09:47.564042199Z"
                      allowedHosts:
                        - id: 8934893a-093c-4d3a-9cd8-2c034a7f4fb8
                          value: https://ipfs.pinata.cloud
                          createdAt: "2024-07-12T15:10:03.192988915Z"
                      allowedIPAddresses:
                        - id: e7d98003-d2b3-46ff-901e-2c666022004a
                          value: 1.1.1.1
                          createdAt: "2024-07-12T15:09:53.879274435Z"
    delete:
      tags:
        - default
      summary: Delete Gateway
      description: |
        `org:gateways:write`
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 50b7716a-3279-4b2e-a5c4-34a4af704823
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 18:41:32 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 7e72fbb08a915e444b858a45ed31307c
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /gateways/{id}/custom_domain/{custom_domain_id}:
    get:
      tags:
        - default
      summary: Gateway Custom Domain Details
      description: |
        `org:gateways:read`
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 92c4666c-f9ec-4c72-ad47-7cef48440eaf
        - name: custom_domain_id
          in: path
          schema:
            type: string
          required: true
          description: Custom domain ID of the target Gateway
          example: 87980e39-fe71-4dba-9b05-3dfc66593539
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:09:12 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "174"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 4ffa207d6f5bcd430acb6e04c3346ab3
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  domain: ipfs.pinata.cloud
                  domain_validation_status: pending
                  custom_domain_id: 87980e39-fe71-4dba-9b05-3dfc66593539
                  ssl_validation_status: initializing
    delete:
      tags:
        - default
      summary: Delete Gateway Custom Domain
      description: |
        `org:gateways:write`
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 5eb8b151-77b3-4e46-8243-5b6282131a9e
        - name: custom_domain_id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Custom Domain
          example: 81bc0135-346d-4d81-ad81-1e313297702f
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 18:48:59 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: b5cab9febddabadf19b0d03ed2fe2de0
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /gateways/exists/{domain}:
    get:
      tags:
        - default
      summary: Gateway Domain Available
      description: |
        `org:gateways:read`
      parameters:
        - name: domain
          in: path
          schema:
            type: string
          required: true
          example: dweb
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:12:23 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "25"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: ef5b3faec6d43df9556a0d3d697d9a31
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  exists: true
  /gateways/{id}/custom_domain:
    post:
      tags:
        - default
      summary: Create Custom Domain for Gateway
      description: |
        `org:gateways:write`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  description: Custom domain for the target Gateway
              example:
                domain: ipfs2.pinata.cloud
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 5eb8b151-77b3-4e46-8243-5b6282131a9e
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:31:13 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "175"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: ce0d865f56e8178bec28c0609ae7a9fc
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  domain: ipfs2.pinata.cloud
                  domain_validation_status: pending
                  custom_domain_id: 81bc0135-346d-4d81-ad81-1e313297702f
                  ssl_validation_status: initializing
  /gateways/{id}/access_tokens:
    post:
      tags:
        - default
      summary: Create Gateway Key Restriction
      description: |
        `org:gateways:write`
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 5eb8b151-77b3-4e46-8243-5b6282131a9e
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:35:04 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "175"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 1d0a98a992503275b20c1998eb17ea0a
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  id: e8fe078b-38e8-4472-94e7-9023205232d2
                  value: >-
                    key
                  createdAt: "2024-07-12T15:34:59.786198063Z"
  /gateways/{id}/ips:
    post:
      tags:
        - default
      summary: Create Gateway IP Address Restriction
      description: |
        `org:gateways:write`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ip:
                  type: string
                  description: IP for the target Gateway
              example:
                ip: 1.1.1.1
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 5eb8b151-77b3-4e46-8243-5b6282131a9e
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:37:05 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "118"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: e51cd4cebe7349e410218d80f18650d3
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  id: 66b6f3c5-2733-442b-a558-960be4b5a921
                  value: 1.1.1.1
                  createdAt: "2024-07-12T15:37:04.871996078Z"
  /gateways/{id}/hosts:
    post:
      tags:
        - default
      summary: Create Gateway Host Origin Restriction
      description: |
        `org:gateways:write`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                host:
                  type: string
                  description: Host for target Gateway
              example:
                host: https://ipfs.pinata.cloud
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 5eb8b151-77b3-4e46-8243-5b6282131a9e
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 15:40:41 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "136"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 2084338cd283435cb925529798cf8f83
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  id: b0165cb6-59e2-476e-aa60-b63b9326bcc6
                  value: https://ipfs.pinata.cloud
                  createdAt: "2024-07-12T15:40:40.258353687Z"
  /gateways/{id}/access_tokens/{access_token_id}:
    delete:
      tags:
        - default
      summary: Revoke Gateway Key
      description: |
        `org:gateways:write`
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 5eb8b151-77b3-4e46-8243-5b6282131a9e
        - name: access_token_id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway Key
          example: 5cfe30af-1de5-409e-be09-f261445a2df6
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 18:52:08 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: bef4599a5d0de8322fff20dda15c82f9
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /gateways/{id}/ips/{ip_id}:
    delete:
      tags:
        - default
      summary: Revoke IP Address Restricton
      description: |
        `org:gateways:write:
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 5eb8b151-77b3-4e46-8243-5b6282131a9e
        - name: ip_id
          in: path
          schema:
            type: string
          required: true
          description: ID of the IP address entry
          example: 66b6f3c5-2733-442b-a558-960be4b5a921
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 18:54:46 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: c70075fc6823ef5234b62d35551be106
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /gateways/{id}/hosts/{host_id}:
    delete:
      tags:
        - default
      summary: Revoke Host Origin Restriction
      description: |
        `org:gateways:write`
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target Gateway
          example: 5eb8b151-77b3-4e46-8243-5b6282131a9e
        - name: host_id
          in: path
          schema:
            type: string
          required: true
          description: ID of the target host restriction
          example: b0165cb6-59e2-476e-aa60-b63b9326bcc6
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Fri, 12 Jul 2024 18:59:34 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 366233a5fc2376b21620a1059e82be38
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /analytics/gateways/top:
    get:
      tags:
        - Gateway Analytics
      summary: Top Gateway Analytics
      description: |
        `org:analytics:read`
      parameters:
        - name: gateway_domain
          in: query
          schema:
            type: string
          description: Gateway domain to filter by
          required: true
          example: dweb.mypinata.cloud
        - name: start_date
          in: query
          schema:
            type: string
          description: Start date of aggregation in the format `YYYY-MM-DD`
          required: true
          example: "2024-07-01"
        - name: end_date
          in: query
          schema:
            type: string
          description: End date of aggregation in the format `YYYY-MM-DD`
          required: true
          example: "2024-08-15"
        - name: by
          in: query
          schema:
            type: string
            enum:
              [
                "cid",
                "country",
                "region",
                "user_agent",
                "referrer",
                "file_name",
              ]
          description: >-
            Attribute to aggregaate results by, must be `cid`, `country`, `region`,
            `user_agent`, `referer`, or `file_name`.
          required: true
          example: cid
        - name: sort_by
          in: query
          schema:
            type: string
            enum: ["requests", "bandwidth"]
          description: Sort data by either `requests` or `bandwidth`
          required: true
          example: requests
        - name: cid
          in: query
          schema:
            type: string
          description: Filter by CID
          example: bafybeiegx7bgm5gpiutivw6e234gflheqjmp7hxlxfkihd3zdfx6omocia
        - name: file_name
          in: query
          schema:
            type: string
          description: Filter by file name
          example: 8.png
        - name: user_agent
          in: query
          schema:
            type: string
          description: Filter by user agent
          example: Go-http-client/2.0
        - name: country
          in: query
          schema:
            type: string
          description: Filter by country
          example: us
        - name: region
          in: query
          schema:
            type: string
          description: Filter by region
          example: us - TN
        - name: referer
          in: query
          schema:
            type: string
          description: Filter by referer
          example: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
        - name: http_status_code
          in: query
          schema:
            type: string
            enum:
              ["200", "206", "301", "302", "304", "307", "308", "404", "499"]
          description: Filter results by HTTP status code
          example: "200"
        - name: limit
          in: query
          schema:
            type: integer
          description: Limit the number of results returned, default is 100
          example: "100"
        - name: sort_order
          in: query
          schema:
            type: string
            enum: ["asc", "desc"]
          description: Sort results by either `asc` or `desc`
          example: desc
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Thu, 15 Aug 2024 19:37:33 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "121"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 90aee3f47b78a6ce735c304de3d691f5
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  - value: >-
                      bafybeiegx7bgm5gpiutivw6e234gflheqjmp7hxlxfkihd3zdfx6omocia
                    requests: 1341
                    bandwidth: 287310699
  /analytics/gateways/time_series:
    get:
      tags:
        - Gateway Analytics
      summary: Time Interval Gateway Analytics
      description: |
        `org:analytics:read`
      parameters:
        - name: gateway_domain
          in: query
          schema:
            type: string
          description: Gateway domain to filter by
          required: true
          example: dweb.mypinata.cloud
        - name: start_date
          in: query
          schema:
            type: string
          description: Start date of aggregation in the format `YYYY-MM-DD`
          required: true
          example: "2024-08-01"
        - name: end_date
          in: query
          schema:
            type: string
          description: End date of aggregation in the format `YYYY-MM-DD`
          required: true
          example: "2024-08-15"
        - name: date_interval
          in: query
          schema:
            type: string
            enum: ["day", "week"]
          description: Date interval to view gateway usage by. Must be either `day` or `week.`
          required: true
          example: day
        - name: sort_by
          in: query
          schema:
            type: string
            enum: ["requests", "bandwidth"]
          description: Sort data by either `requests` or `bandwidth`
          example: requests
        - name: cid
          in: query
          schema:
            type: string
          description: Filter by CID
          example: QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng
        - name: file_name
          in: query
          schema:
            type: string
          description: Filter by file name
          example: 8.png
        - name: user_agent
          in: query
          schema:
            type: string
          description: Filter by user agent
          example: Go-http-client/2.0
        - name: country
          in: query
          schema:
            type: string
          description: Filter by country
          example: us
        - name: region
          in: query
          schema:
            type: string
          description: Filter by region
          example: us - TN
        - name: referer
          in: query
          schema:
            type: string
          description: Filter by referer
          example: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
        - name: http_status_code
          in: query
          schema:
            type: string
            enum:
              ["200", "206", "301", "302", "304", "307", "308", "404", "499"]
          description: Filter results by HTTP status code
          example: "200"
        - name: limit
          in: query
          schema:
            type: integer
          description: Limit the number of results returned, default is 100
          example: "100"
        - name: sort_order
          in: query
          schema:
            type: string
          description: Sort results by either `asc` or `desc`
          example: desc
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Thu, 15 Aug 2024 22:56:37 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "1139"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: a789a76d7449671ba0393d54ba883855
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  total_requests: 1756
                  total_bandwidth: 1034631262
                  time_periods:
                    - period_start_time: "2024-08-15"
                      requests: 100
                      bandwidth: 75721161
                    - period_start_time: "2024-08-14"
                      requests: 109
                      bandwidth: 55430651
                    - period_start_time: "2024-08-13"
                      requests: 70
                      bandwidth: 32806252
                    - period_start_time: "2024-08-12"
                      requests: 71
                      bandwidth: 90781331
                    - period_start_time: "2024-08-11"
                      requests: 121
                      bandwidth: 60168755
                    - period_start_time: "2024-08-10"
                      requests: 187
                      bandwidth: 86036341
                    - period_start_time: "2024-08-09"
                      requests: 360
                      bandwidth: 262348634
                    - period_start_time: "2024-08-08"
                      requests: 86
                      bandwidth: 45399695
                    - period_start_time: "2024-08-07"
                      requests: 114
                      bandwidth: 27869980
                    - period_start_time: "2024-08-06"
                      requests: 146
                      bandwidth: 65227201
                    - period_start_time: "2024-08-05"
                      requests: 93
                      bandwidth: 101281128
                    - period_start_time: "2024-08-04"
                      requests: 62
                      bandwidth: 18297460
                    - period_start_time: "2024-08-03"
                      requests: 65
                      bandwidth: 21646988
                    - period_start_time: "2024-08-02"
                      requests: 64
                      bandwidth: 49484961
                    - period_start_time: "2024-08-01"
                      requests: 108
                      bandwidth: 42130724
  /files/{network}/signature/{cid}:
    get:
      tags:
        - default
      summary: Get Signature for a CID
      description: |
        `org:files:read`
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: cid
          in: path
          schema:
            type: string
          required: true
          example: bafkreigbicehros5mydclprafp7jxkcxprzkmthdz5aldofqnir4s24efa
          description: Target CID
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:44:19 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "213"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 46a59cd880c3dff15201d19a25102c48
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      cid:
                        type: string
                      signature:
                        type: string
              example:
                data:
                  cid: QmXGeVy9dVwfuFJmvbzz8y4dYK1TdxXbDGzwbNuyZ5xXSU
                  signature: >-
                    0x1ba6c2a8412dc9b0be37b013ea5bddd97251dab4d435cc9c4c7bcf331d4017ca2de07485ad6a15ce60d3700cee802787bc7ede0c112c7843f702bb1e71b750911b
    post:
      tags:
        - default
      summary: Add Signature to CId
      description: |
        `org:files:write`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                signature:
                  type: string
                  description: Signature for the target CID
                address:
                  type: string
                  description: Wallet address that made the signature
              example:
                address: "0xbC18447255e86f7f6c01C25e82636dDc587Ef9dc"
                signature: >-
                  0x1ba6c2a8412dc9b0be37b013ea5bddd97251dab4d435cc9c4c7bcf331d4017ca2de07485ad6a15ce60d3700cee802787bc7ede0c112c7843f702bb1e71b750911b
      parameters:
        - name: cid
          in: path
          schema:
            type: string
          required: true
          example: QmXGeVy9dVwfuFJmvbzz8y4dYK1TdxXbDGzwbNuyZ5xXSU
          description: Target CID to add a signature to
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:42:36 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "213"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 0c7bec7ab64236237a9eabef91645733
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      cid:
                        type: string
                      signature:
                        type: string
              example:
                data:
                  cid: QmXGeVy9dVwfuFJmvbzz8y4dYK1TdxXbDGzwbNuyZ5xXSU
                  signature: >-
                    0x1ba6c2a8412dc9b0be37b013ea5bddd97251dab4d435cc9c4c7bcf331d4017ca2de07485ad6a15ce60d3700cee802787bc7ede0c112c7843f702bb1e71b750911b
    delete:
      tags:
        - default
      summary: Remove Signature from CID
      description: |
        `org:files:write`
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: cid
          in: path
          schema:
            type: string
          required: true
          example: bafybeidzbfkjjz3ksfvxn7mcj3nuyprx4mhna5jsnfwrncoqbtppi45spe
          description: Target CID
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:54:20 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 96e62eee654b71b0fc4dc66eefb6e999
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /gateways/plugins/marketplace:
    get:
      tags:
        - default
      summary: List Marketplace Plugins
      description: |
        `org:gateways:read`
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:45:26 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "533"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: ce0dff9549abcb756b0a44af221d6feb
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        description:
                          type: string
                        image:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
              example:
                data:
                  - id: 1
                    name: Content Addressable Attestation
                    description: >-
                      Verify the authenticity and ownership of files added to
                      the IPFS network by signing them with your Ethereum
                      wallet.
                    image: >-
                      https://mktg.mypinata.cloud/ipfs/QmVm3jRZ7S2KMmYEvkmkwncRCmBSUEuzNKfm2AgJkfBGKZ
                    tags:
                      - verifiability
                      - security
                  - id: 2
                    name: Hot Swaps
                    description: >-
                      Make IPFS mutable by pointing your original CID to a new
                      file.
                    image: >-
                      https://mktg.mypinata.cloud/ipfs/QmVpy6v7YASWUQjmqgUxKwbn6zgzuVSRudzdZMynpBjSJo
                    tags:
                      - files
  /gateways/plugins/marketplace/{id}:
    get:
      tags:
        - default
      summary: Get Marketplace Plugin Details
      description: |
        `org:gateways:read`
      parameters:
        - name: id
          in: path
          schema:
            type: integer
          required: true
          example: "1"
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:46:25 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "317"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: ef76dca037942684c6b4fb5280867057
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      description:
                        type: string
                      image:
                        type: string
                      tags:
                        type: array
                        items:
                          type: string
              example:
                data:
                  id: 1
                  name: Content Addressable Attestation
                  description: >-
                    Verify the authenticity and ownership of files added to the
                    IPFS network by signing them with your Ethereum wallet.
                  image: >-
                    https://mktg.mypinata.cloud/ipfs/QmVm3jRZ7S2KMmYEvkmkwncRCmBSUEuzNKfm2AgJkfBGKZ
                  tags:
                    - verifiability
                    - security
  /gateways/plugins/{gateway_id}:
    post:
      tags:
        - default
      summary: Install Gateway Plugin
      description: |
        `org:gateways:write`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                plugin_id:
                  type: number
                  description: ID of the plugin to install to target gateway
              example:
                plugin_id: 1
      parameters:
        - name: gateway_id
          in: path
          schema:
            type: string
          required: true
          example: 58516d3b-a882-438c-8951-aef528ab7114
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:49:07 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "77"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 4d535ee9329b744a929edb4bcaf33bc4
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      gateway_id:
                        type: string
                      plugin_id:
                        type: number
              example:
                data:
                  gateway_id: 3ced949f-2013-47a0-8f4a-f8d8e8ee14ac
                  plugin_id: 1
    get:
      tags:
        - default
      summary: List Installed Plugins for Gateway
      description: |
        `org:gateways:read`
      parameters:
        - name: gateway_id
          in: path
          schema:
            type: string
          required: true
          example: 2bfaa2ae-b590-4cb4-bb9c-5af43c2c9541
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:53:24 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "147"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 81ee012022a1ae7dccdff5cbf8e10d9a
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        gateway_id:
                          type: string
                        plugin_id:
                          type: number
              example:
                data:
                  - gateway_id: 2bfaa2ae-b590-4cb4-bb9c-5af43c2c9541
                    plugin_id: 1
                  - gateway_id: 2bfaa2ae-b590-4cb4-bb9c-5af43c2c9541
                    plugin_id: 2
  /gateways/plugins:
    get:
      tags:
        - default
      summary: List Gateway Plugins
      description: |
        `org:gateways:read`
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:52:06 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "147"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 80440a326a0a048fc0008c519ddd2e61
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        gateway_id:
                          type: string
                        plugin_id:
                          type: number
              example:
                data:
                  - gateway_id: 2bfaa2ae-b590-4cb4-bb9c-5af43c2c9541
                    plugin_id: 1
                  - gateway_id: 2bfaa2ae-b590-4cb4-bb9c-5af43c2c9541
                    plugin_id: 2
  /gateways/plugins/{gateway_id}/plugin/{plugin_id}:
    delete:
      tags:
        - default
      summary: Uninstall Gateway Plugin
      description: |
        `org:gateways:write`
      parameters:
        - name: gateway_id
          in: path
          schema:
            type: string
          required: true
          example: 3ced949f-2013-47a0-8f4a-f8d8e8ee14ac
        - name: plugin_id
          in: path
          schema:
            type: integer
          required: true
          example: "1"
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:51:21 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: eed30883b20f63ef34936ae933bd64bd
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /ipfs/gateway_plugins/{gateway_id}:
    get:
      tags:
        - default
      summary: List Installed Plugins for Gateway
      description: |
        `org:gateways:read`
      parameters:
        - name: gateway_id
          in: path
          schema:
            type: string
          required: true
          example: 2bfaa2ae-b590-4cb4-bb9c-5af43c2c9541
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 22 Jul 2024 17:53:24 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "147"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 81ee012022a1ae7dccdff5cbf8e10d9a
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        gateway_id:
                          type: string
                        plugin_id:
                          type: number
              example:
                data:
                  - gateway_id: 2bfaa2ae-b590-4cb4-bb9c-5af43c2c9541
                    plugin_id: 1
                  - gateway_id: 2bfaa2ae-b590-4cb4-bb9c-5af43c2c9541
                    plugin_id: 2
  /ipfs/swap/{cid}:
    put:
      tags:
        - Swaps
      summary: Add Swap
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - swapCid
              properties:
                swapCid:
                  type: string
                  description: The CID you want to redirect to
              example:
                swapCid: QmXog19G7QvqHQUMH4R6aCaq8J9qfKAU9ethr51PUjtKjM
      parameters:
        - name: cid
          in: path
          schema:
            type: string
          required: true
          description: The target original CID
          example: QmV66MtU6PHNAooavATGJyYrAgAeRDaHN4UvRwVN2Lsrp6
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Sun, 18 Aug 2024 19:36:29 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "114"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 576d0cc3a1b66e3b8938c90e0f45f3a7
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      mappedCid:
                        type: string
                        description: The current CID that is being pointed to from the original
                      createdAt:
                        type: string
                        description: The date this CID was updated
              example:
                data:
                  mappedCid: QmXog19G7QvqHQUMH4R6aCaq8J9qfKAU9ethr51PUjtKjM
                  createdAt: "2024-08-18T19:36:29.442559Z"
    get:
      tags:
        - Swaps
      summary: Get Swap History
      parameters:
        - name: domain
          in: query
          schema:
            type: string
            description: The domain of the gateway that has the Hot Swaps plugin installed
          required: true
          example: discordpinnie.mypinata.cloud
        - name: cid
          in: path
          schema:
            type: string
            description: The original CID that is in the Gateway path
          required: true
          example: QmV66MtU6PHNAooavATGJyYrAgAeRDaHN4UvRwVN2Lsrp6
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Sun, 18 Aug 2024 19:44:14 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "116"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 32947ddd9c147410acebab6b9221f523
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        mappedCid:
                          type: string
                          description: The current CID that is being pointed to from the original
                        createdAt:
                          type: string
                          description: The date this CID was updated
              example:
                data:
                  - mappedCid: QmXog19G7QvqHQUMH4R6aCaq8J9qfKAU9ethr51PUjtKjM
                    createdAt: "2024-08-18T19:36:29.442559Z"
    delete:
      tags:
        - Swaps
      summary: Remove Swap
      parameters:
        - name: cid
          in: path
          schema:
            type: string
          required: true
          description: Target CID to remove swap
          example: QmV66MtU6PHNAooavATGJyYrAgAeRDaHN4UvRwVN2Lsrp6
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Sun, 18 Aug 2024 19:45:11 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: cb4721118316fe9ac2e7ec44a2e25133
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /files/{network}:
    get:
      summary: List Files
      description: |
        `org:files:read`
      operationId: listFiles
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: name
          in: query
          schema:
            type: string
          description: Filter files by name
        - name: group
          in: query
          schema:
            type: string
          description: Filter fils by group_id. Pass `null` to show files that are not part of a group
        - name: mimeType
          in: query
          schema:
            type: string
          description: Filter files by mime_type
        - name: cid
          in: query
          schema:
            type: string
          description: Filter files by CID
        - name: cidPending
          in: query
          schema:
            type: boolean
          description: Return only files that are still waiting for a CID
          example: "true"
        - name: metadata
          in: query
          style: deepObject
          explode: true
          schema:
            type: object
            additionalProperties: true
          description: Filter by key values in file metadata
        - name: limit
          in: query
          schema:
            type: integer
          description: Limit the number of results
          example: "10"
        - name: order
          in: query
          schema:
            type: string
            enum: ["ASC", "DESC"]
          description: Sort results by creation date with with ASC or DESC
        - name: pageToken
          in: query
          schema:
            type: string
          description: Paginate using the nextPageToken
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 27 Aug 2024 15:02:30 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "382"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: f60474dfa75f70cbde347239324f49cc
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      files:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            cid:
                              type: string
                            size:
                              type: number
                            number_of_files:
                              type: number
                            mime_type:
                              type: string
                            group_id:
                              type: string
                            keyvalues:
                              type: object
                            created_at:
                              type: string
                      next_page_token:
                        type: string
              example:
                data:
                  files:
                    - id: e5323ea7-8a02-4486-9b6f-63c788810aeb
                      name: e093dbd3-f276-4bb3-a43e-60437725f410.txt
                      cid: >-
                        bafkreicnu2aqjkoglrlrd65giwo4l64pdajxffk6jtq2vb7yaiopc3yu7m
                      size: 36
                      number_of_files: 1
                      mime_type: "text/plain"
                      group_id: 18893556-de8e-4229-8a9a-27b95468dd3e
                      keyvalues:
                        whimsey: "true"
                      created_at: "2024-08-27T14:57:51.485934Z"
                  next_page_token: MDE5MTk0NTctYzJjNi03NzBlLTkzOTEtOGM3MmM0ZjQxZjY0
  /files/{network}/{id}:
    get:
      summary: Get File by ID
      description: |
        `org:files:read`
      operationId: getFile
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 01919457-c2c6-770e-9391-8c72c4f41f64
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 27 Aug 2024 15:04:00 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "303"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 5cda7fd04bb31bc8c6bd461089fcfa1c
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      cid:
                        type: string
                      size:
                        type: number
                      number_of_files:
                        type: number
                      mime_type:
                        type: string
                      keyvalues:
                        type: object
                      group_id:
                        type: string
                      created_at:
                        type: string
              example:
                data:
                  id: e5323ea7-8a02-4486-9b6f-63c788810aeb
                  name: e093dbd3-f276-4bb3-a43e-60437725f410.txt
                  cid: >-
                    bafkreicnu2aqjkoglrlrd65giwo4l64pdajxffk6jtq2vb7yaiopc3yu7m
                  size: 36
                  number_of_files: 1
                  mime_type: "text/plain"
                  group_id: 18893556-de8e-4229-8a9a-27b95468dd3e
                  keyvalues:
                    whimsey: "true"
                  created_at: "2024-08-27T14:57:51.485934Z"
    put:
      summary: Update File
      description: |
        `org:files:write`
      operationId: updateFile
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The updated name for a file
                keyvalues:
                  type: object
                  additionalProperties: true
                  description: Stringified key/values metadata
              example:
                name: Hello Files API
      parameters:
        - name: network
          description: Target a file on either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 01919457-c2c6-770e-9391-8c72c4f41f64
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 27 Aug 2024 15:12:50 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "298"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: b41144a3011804309872d413a6dbc3b0
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      cid:
                        type: string
                      size:
                        type: number
                      number_of_files:
                        type: number
                      keyvalues:
                        type: object
                      mime_type:
                        type: string
                      group_id:
                        type: string
                      created_at:
                        type: string
              example:
                data:
                  id: e5323ea7-8a02-4486-9b6f-63c788810aeb
                  name: e093dbd3-f276-4bb3-a43e-60437725f410.txt
                  cid: >-
                    bafkreicnu2aqjkoglrlrd65giwo4l64pdajxffk6jtq2vb7yaiopc3yu7m
                  size: 36
                  number_of_files: 1
                  mime_type: "text/plain"
                  group_id: 18893556-de8e-4229-8a9a-27b95468dd3e
                  keyvalues:
                    whimsey: "true"
                  created_at: "2024-08-27T14:57:51.485934Z"
    delete:
      summary: Delete File by ID
      description: |
        `org:files:write`
      operationId: deleteFile
      parameters:
        - name: network
          description: Target a file on either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 01919461-6d4c-7456-870d-0d1faeb90f46
      responses:
        "500":
          description: Internal Server Error
          headers:
            Date:
              schema:
                type: string
                example: Tue, 27 Aug 2024 15:09:20 GMT
            Content-Type:
              schema:
                type: string
                example: application/json
            Content-Length:
              schema:
                type: integer
                example: "201"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 79dbc0bba9ecb69876a9f935f1931f3c
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /files/public/pin_by_cid:
    post:
      summary: Pin by CID
      description: |
        `org:files:write`
      operationId: pinByCid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - cid
              properties:
                cid:
                  type: string
                  description: CID of the file you want to pin
                name:
                  type: string
                  description: Add a custom name for the file
                group_id:
                  type: string
                  description: ID of the group you would like to upload
                keyvalues:
                  type: object
                  description: Add additional key value metadata to files upon upload
                  additionalProperties:
                    type: string
                host_nodes:
                  type: array
                  description: An optional array of host node IDs, use `ipfs id` in Kubo to get these
                  items:
                    type: string
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 27 Aug 2024 15:04:00 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "303"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 5cda7fd04bb31bc8c6bd461089fcfa1c
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      cid:
                        type: string
                      keyvalues:
                        type: object
                      group_id:
                        type: string
                      status:
                        type: string
                      date_queued:
                        type: string
                      hose_nodes:
                        type: array
                        items:
                          type: string
    get:
      summary: Query Pin Requests
      description: |
        `org:files:read`
      operationId: queryPinRequests
      parameters:
        - name: order
          description: Change the order of the results by date_queued
          in: query
          schema:
            type: string
            enum:
              - ASC
              - DESC
          example: ASC
        - name: status
          description: Filter pin by CID status
          in: query
          schema:
            type: string
            enum:
              - prechecking
              - backfilled
              - retreiving
              - expired
              - searching
              - over_free_limit
              - over_max_size
              - invalid_object
              - bad_host_node
        - name: cid
          description: Filter queue by CID
          in: query
          schema:
            type: string
          example: QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng
        - name: limit
          description: Limit the number of results returned when querying the queue
          in: query
          schema:
            type: string
          example: 10
        - name: pageToken
          description: Paginate through pin by cid request results
          in: query
          schema:
            type: string
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 27 Aug 2024 15:04:00 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "303"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 5cda7fd04bb31bc8c6bd461089fcfa1c
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      jobs:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            cid:
                              type: string
                            name:
                              type: string
                            status:
                              type: string
                            keyvalues:
                              type: object
                            host_nodes:
                              type: array
                              items:
                                type: string
                            group_id:
                              type: string
                            date_queued:
                              type: string
                      next_page_token:
                        type: string
  /files/public/pin_by_cid/{id}:
    delete:
      summary: Cancel Request
      description: |
        `org:files:write`
      operationId: cancelPinByCID
      parameters:
        - name: id
          description: ID of the pin_by_cid request
          in: path
          schema:
            type: string
          required: true
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 27 Aug 2024 15:04:00 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "303"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 5cda7fd04bb31bc8c6bd461089fcfa1c
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                example:
                  data: null
  /files/private/download_link:
    post:
      tags:
        - Private Files
      summary: Create Download Link
      description: |
        `org:files:write`
      operationId: createDownloadLink
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  description: The full URL of your file in the format of `https://{yourgatewaydomain}.mypinata.cloud/files/{cid}`
                date:
                  type: number
                  description: The unix timestamp that the URL is signed, ie time of request
                expires:
                  type: number
                  description: How long the URL is valid for in sconds after signing based on the date parameter
                method:
                  type: string
                  description: The URL method, ie `GET`
              example:
                url: >-
                  https://example.mypinata.cloud/files/bafybeifq444z4b7yqzcyz4a5gspb2rpyfcdxp3mrfpigmllh52ld5tyzwm
                expires: 500000
                date: 1724875300
                method: GET
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 28 Aug 2024 20:01:46 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "291"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 0c7a656fdb5c98f6a89cd9cd70147c6d
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    description: The signed URL
              example:
                data: >-
                  https://blush-fast-impala-660.mypinata.cloud/files/bafybeifq444z4b7yqzcyz4a5gspb2rpyfcdxp3mrfpigmllh52ld5tyzwm?X-Algorithm=PINATA1&X-Date=1724875300&X-Expires=500000&X-Method=GET&X-Signature=example-signature
  /groups/{network}:
    post:
      tags:
        - Groups
      summary: Create Group
      description: |
        `org:groups:write`
      operationId: createGroup
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: The name of the group you want to create
                is_public:
                  type: boolean
                  description: Flag if group is public or not
              example:
                name: Test Group 3
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 28 Aug 2024 14:49:31 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "184"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: cab11653b355c8f6fa80544a61ec7a30
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      is_public:
                        type: boolean
                      created_at:
                        type: string
              example:
                data:
                  id: 01919976-955f-7d06-bd59-72e80743fb95
                  name: Test Private Group
                  public: false
                  created_at: "2024-08-28T14:49:31.246596Z"
    get:
      tags:
        - Groups
      summary: List Groups
      description: |
        `org:groups:read`
      operationId: listGroups
      parameters:
        - name: name
          in: query
          schema:
            type: string
          description: Filter groups by name
        - name: isPublic
          in: query
          schema:
            type: boolean
          description: Filters groups by is_public set to true or false
          example: "true"
        - name: limit
          in: query
          schema:
            type: integer
          description: Limit the number of results
          example: "10"
        - name: pageToken
          in: query
          schema:
            type: string
          description: Paginate using the nextPageToken
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 28 Aug 2024 14:50:07 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "266"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 256ce2733baf16700d77f582c8ae95c8
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      groups:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            is_public:
                              type: boolean
                            created_at:
                              type: string
                      next_page_token:
                        type: string
              example:
                data:
                  groups:
                    - id: 01919976-955f-7d06-bd59-72e80743fb95
                      name: Test Private Group
                      is_public: false
                      created_at: "2024-08-28T14:49:31.246596Z"
                  next_page_token: MDE5MTk5NzYtOTU1Zi03ZDA2LWJkNTktNzJlODA3NDNmYjk1
  /groups/{network}/{id}:
    get:
      tags:
        - Groups
      summary: Get Group
      description: |
        `org:groups:read`
      operationId: getGroup
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 01919976-955f-7d06-bd59-72e80743fb95
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 28 Aug 2024 14:50:47 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "184"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: b9bcd1c7dba0f7241ae8ee526fdc81be
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      is_public:
                        type: boolean
                      created_at:
                        type: string
              example:
                data:
                  id: 01919976-955f-7d06-bd59-72e80743fb95
                  name: Test Private Group
                  is_public: false
                  created_at: "2024-08-28T14:49:31.246596Z"
    put:
      tags:
        - Groups
      summary: Update Group
      description: |
        `org:groups:write`
      operationId: updateGroup
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Updated name for target group
                is_public:
                  type: boolean
                  description: Toggle if group is public or not
              example:
                name: Updated Name
                is_public: true
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: id
          in: path
          description: The ID of the target group
          schema:
            type: string
          required: true
          example: 01919ac8-a6f5-7e8e-a8a2-6cfe00122b90
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Thu, 29 Aug 2024 15:17:52 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "136"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 5cee9f024755176365a202b6ce5d29e4
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      is_public:
                        type: boolean
                      created_at:
                        type: string
              example:
                data:
                  id: 01919ac8-a6f5-7e8e-a8a2-6cfe00122b90
                  name: Updated Name
                  is_public: true
                  created_at: "2024-08-28T20:58:46.96779Z"
    delete:
      tags:
        - Groups
      summary: Delete Group
      description: |
        `org:groups:write`
      operationId: deleteGroup
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 01919eba-b4e4-7cc6-8a72-c01358ec8f8d
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Thu, 29 Aug 2024 15:22:17 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: e603f9d52d268705312556d6064c9379
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
  /groups/{network}/{id}/ids/{file_id}:
    put:
      tags:
        - Groups
      summary: Add File To Group
      description: |
        `org:groups:write`
      operationId: addFileToGroup
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: id
          in: path
          description: The ID of the target group
          schema:
            type: string
          required: true
          example: 01919ac8-a6f5-7e8e-a8a2-6cfe00122b90
        - name: file_id
          in: path
          description: The ID of the tart file to add to the group
          schema:
            type: string
          required: true
          example: bc2aad39-2594-4353-9404-f59bc4118e2c
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Thu, 29 Aug 2024 15:17:52 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "136"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 5cee9f024755176365a202b6ce5d29e4
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
              example:
                data: null
    delete:
      tags:
        - Groups
      summary: Remove File From Group
      description: |
        `org:groups:write`
      operationId: removeFileFromGroup
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: id
          in: path
          description: The ID of the target group
          schema:
            type: string
          required: true
          example: 01919ac8-a6f5-7e8e-a8a2-6cfe00122b90
        - name: file_id
          in: path
          description: The ID of the tart file to remove from the group
          schema:
            type: string
          required: true
          example: bc2aad39-2594-4353-9404-f59bc4118e2c
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Thu, 29 Aug 2024 15:17:52 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "136"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 5cee9f024755176365a202b6ce5d29e4
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
              example:
                data: null
  /files/{network}/swap/{cid}:
    put:
      tags:
        - Swaps
      summary: Add Swap
      description: |
        `org:files:write`
      operationId: add-swap
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - swapCid
              properties:
                swapCid:
                  type: string
                  description: The CID you want to redirect to
              example:
                swapCid: bafkreig4zcnmqa23zff3ye7tuef6wrlq3aimffzm22axfeh3ddmawzlzz4
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: cid
          in: path
          schema:
            type: string
          required: true
          description: The target original CID
          example: bafkreiccqfcxwp52uqwd7r5g7kdukgz7jvs6jcusetfnznj5jfch3r6wlm
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Sun, 18 Aug 2024 19:36:29 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "114"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 576d0cc3a1b66e3b8938c90e0f45f3a7
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      mapped_cid:
                        type: string
                        description: The current CID that is being pointed to from the original
                      created_at:
                        type: string
                        description: The date this CID was updated
              example:
                data:
                  mapped_cid: bafkreig4zcnmqa23zff3ye7tuef6wrlq3aimffzm22axfeh3ddmawzlzz4
                  created_at: "2024-09-20T17:09:39.490275Z"
    get:
      tags:
        - Swaps
      summary: Get Swap History
      description: |
        `org:files:read`
      operationId: get-swap
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: domain
          in: query
          schema:
            type: string
            description: The domain of the gateway that has the Hot Swaps plugin installed
          required: true
          example: discordpinnie.mypinata.cloud
        - name: cid
          in: path
          schema:
            type: string
            description: The original CID that is in the Gateway path
          required: true
          example: bafkreiccqfcxwp52uqwd7r5g7kdukgz7jvs6jcusetfnznj5jfch3r6wlm
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Sun, 18 Aug 2024 19:44:14 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "116"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: 32947ddd9c147410acebab6b9221f523
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        mapped_cid:
                          type: string
                          description: The current CID that is being pointed to from the original
                        created_at:
                          type: string
                          description: The date this CID was updated
              example:
                data:
                  - mapped_cid: bafkreig4zcnmqa23zff3ye7tuef6wrlq3aimffzm22axfeh3ddmawzlzz4
                    created_at: "2024-09-20T17:09:39.490275Z"
    delete:
      tags:
        - Swaps
      summary: Remove Swap
      description: |
        `org:files:write`
      operationId: delete-swap
      parameters:
        - name: network
          description: Target either the public or private IPFS network
          in: path
          schema:
            type: string
            enum:
              - public
              - private
          required: true
          example: public
        - name: cid
          in: path
          schema:
            type: string
          required: true
          description: Target CID to remove swap
          example: bafkreiccqfcxwp52uqwd7r5g7kdukgz7jvs6jcusetfnznj5jfch3r6wlm
      responses:
        "200":
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Sun, 18 Aug 2024 19:45:11 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: "14"
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Request-Id:
              schema:
                type: string
                example: cb4721118316fe9ac2e7ec44a2e25133
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
          content:
            application/json:
              schema:
                type: object
              example:
                data: null
