{
  "opencollection": "1.0.0",
  "info": {
    "name": "Pixelfed REST Accounts Media API",
    "version": "1.1"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://{instance}/oauth/authorize",
      "accessTokenUrl": "https://{instance}/oauth/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Media",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Upload media (v1, synchronous)",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{instance}/api/v1/media",
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "file",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "thumbnail",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "description",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "focus",
                  "type": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{instance}/oauth/authorize",
              "accessTokenUrl": "https://{instance}/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Upload a media attachment. Returns immediately with the attachment."
        },
        {
          "info": {
            "name": "Get media attachment",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{instance}/api/v1/media/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{instance}/oauth/authorize",
              "accessTokenUrl": "https://{instance}/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns a media attachment with the given ID."
        },
        {
          "info": {
            "name": "Update media attachment",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{instance}/api/v1/media/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "thumbnail",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "description",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "focus",
                  "type": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{instance}/oauth/authorize",
              "accessTokenUrl": "https://{instance}/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update alt text or focus point of an existing media attachment."
        },
        {
          "info": {
            "name": "Upload media (v2, asynchronous)",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{instance}/api/v2/media",
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "file",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "thumbnail",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "description",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "focus",
                  "type": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{instance}/oauth/authorize",
              "accessTokenUrl": "https://{instance}/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Upload a media attachment asynchronously. Returns 202 if still processing, or 200 when ready. Poll GET /api/v1/media/{id} to check processing status.\n"
        }
      ]
    }
  ],
  "bundled": true
}