openapi: 3.0.3 info: title: Hideout Mastodon Compatible API description: Hideout Mastodon Compatible API version: 1.0.0 servers: - url: 'https://test-hideout.usbharu.dev' tags: - name: status description: status - name: account description: account - name: app description: app - name: instance description: instance - name: timeline description: timeline - name: media description: media paths: /api/v2/instance: get: tags: - instance security: - { } responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/Instance" /api/v1/instance/peers: get: tags: - instance security: - { } responses: 200: description: 成功 content: application/json: schema: type: array items: type: string /api/v1/instance/activity: get: tags: - instance security: - { } responses: 200: description: 成功 content: application/json: schema: type: array items: $ref: "#/components/schemas/V1InstanceActivity" /api/v1/instance/rules: get: tags: - instance security: - { } responses: 200: description: 成功 content: application/json: schema: type: array items: $ref: "#/components/schemas/Rule" /api/v1/instance/domain_blocks: get: tags: - instance security: - { } responses: 200: description: 成功 content: application/json: schema: type: array items: $ref: "#/components/schemas/DomainBlock" /api/v1/instance/extended_description: get: tags: - instance security: - { } responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/ExtendedDescription" /api/v1/instance: get: tags: - instance security: - { } responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/V1Instance" /api/v1/statuses: post: tags: - status security: - OAuth2: - "write:statuses" requestBody: description: 投稿する内容 required: true content: application/json: schema: $ref: "#/components/schemas/StatusesRequest" application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/StatusesRequest" responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/Status" /api/v1/apps: post: tags: - app security: - { } requestBody: description: 作成するApp required: true content: application/json: schema: $ref: "#/components/schemas/AppsRequest" responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/Application" /api/v1/accounts/verify_credentials: get: tags: - account security: - OAuth2: - "read:accounts" responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/CredentialAccount" /api/v1/accounts: post: tags: - account security: - OAuth2: - "write:accounts" requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/AccountsCreateRequest" responses: 200: description: 成功 /api/v1/accounts/relationships: get: tags: - account security: - OAuth2: - "read:follows" parameters: - in: query name: id[] required: false schema: type: array items: type: string - in: query name: with_suspended required: false schema: type: boolean default: false responses: 200: description: 成功 content: application/json: schema: type: array items: $ref: "#/components/schemas/Relationship" /api/v1/accounts/{id}: get: tags: - account security: - { } parameters: - in: path name: id required: true schema: type: string responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/Account" /api/v1/accounts/{id}/follow: post: tags: - account security: - OAuth2: - "write:follows" parameters: - in: path name: id required: true schema: type: string requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/FollowRequestBody" application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/FollowRequestBody" responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/Relationship" /api/v1/accounts/{id}/block: post: tags: - account security: - OAuth2: - "write:blocks" parameters: - in: path name: id required: true schema: type: string responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/Relationship" /api/v1/accounts/{id}/unfollow: post: tags: - account security: - OAuth2: - "write:follows" parameters: - in: path name: id required: true schema: type: string responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/Relationship" /api/v1/accounts/{id}/unblock: post: tags: - account security: - OAuth2: - "write:blocks" parameters: - in: path name: id required: true schema: type: string responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/Relationship" /api/v1/accounts/{id}/statuses: get: tags: - account security: - OAuth2: - "read:statuses" parameters: - in: path name: id required: true schema: type: string - in: query name: max_id required: false schema: type: string - in: query name: since_id required: false schema: type: string - in: query name: min_id required: false schema: type: string - in: query name: limit required: false schema: type: integer default: 20 - in: query name: only_media required: false schema: type: boolean default: false - in: query name: exclude_replies required: false schema: type: boolean default: false - in: query name: exclude_reblogs required: false schema: type: boolean default: false - in: query name: pinned required: false schema: type: boolean default: false - in: query required: false name: tagged schema: type: string responses: 200: description: 成功 content: application/json: schema: type: array items: $ref: "#/components/schemas/Status" /api/v1/timelines/public: get: tags: - timeline parameters: - in: query name: local required: false schema: type: boolean - in: query name: remote required: false schema: type: boolean - in: query name: only_media required: false schema: type: boolean - in: query name: max_id required: false schema: type: string - in: query name: since_id required: false schema: type: string - in: query name: min_id required: false schema: type: string - in: query name: limit required: false schema: type: integer responses: 200: description: 成功 content: application/json: schema: type: array items: $ref: "#/components/schemas/Status" /api/v1/timelines/home: get: tags: - timeline security: - OAuth2: - "read:statuses" parameters: - in: query name: max_id required: false schema: type: string - in: query name: since_id required: false schema: type: string - in: query name: min_id required: false schema: type: string - in: query name: limit required: false schema: type: integer responses: 200: description: 成功 content: application/json: schema: type: array items: $ref: "#/components/schemas/Status" /api/v1/media: post: tags: - media security: - OAuth2: - "write:media" requestBody: required: true content: multipart/form-data: schema: $ref: "#/components/schemas/V1MediaRequest" encoding: file: contentType: image/jpeg, image/png responses: 200: description: 成功 content: application/json: schema: $ref: "#/components/schemas/MediaAttachment" components: schemas: V1MediaRequest: type: object properties: file: type: string format: binary thumbnail: type: string format: binary description: type: string focus: type: string required: - file AccountsCreateRequest: type: object properties: username: type: string email: type: string password: type: string agreement: type: boolean locale: type: boolean reason: type: string required: - username - password Token: type: object properties: access_token: type: string token_type: type: string scope: type: string created_at: type: integer format: int64 Account: type: object properties: id: type: string username: type: string acct: type: string url: type: string display_name: type: string note: type: string avatar: type: string avatar_static: type: string header: type: string header_static: type: string locked: type: boolean fields: type: array items: $ref: "#/components/schemas/Field" emojis: type: array items: $ref: "#/components/schemas/CustomEmoji" bot: type: boolean group: type: boolean discoverable: type: boolean nullable: true noindex: type: boolean moved: type: boolean suspendex: type: boolean limited: type: boolean created_at: type: string last_status_at: type: string nullable: true statuses_count: type: integer followers_count: type: integer following_count: type: integer required: - id - username - acct - url - display_name - note - avatar - avatar_static - header - header_static - locked - fields - emojis - bot - group - discoverable - created_at - last_status_at - statuses_count - followers_count - followers_count CredentialAccount: type: object properties: id: type: string username: type: string acct: type: string url: type: string display_name: type: string note: type: string avatar: type: string avatar_static: type: string header: type: string header_static: type: string locked: type: boolean fields: type: array items: $ref: "#/components/schemas/Field" emojis: type: array items: $ref: "#/components/schemas/CustomEmoji" bot: type: boolean group: type: boolean discoverable: type: boolean nullable: true noindex: type: boolean moved: type: boolean suspendex: type: boolean limited: type: boolean created_at: type: string last_status_at: type: string nullable: true statuses_count: type: integer followers_count: type: integer following_count: type: integer source: $ref: "#/components/schemas/CredentialAccountSource" role: $ref: "#/components/schemas/Role" required: - id - username - acct - url - display_name - note - avatar - avatar_static - header - header_static - locked - fields - emojis - bot - group - discoverable - created_at - last_status_at - statuses_count - followers_count - followers_count - source CredentialAccountSource: type: object properties: note: type: string fields: type: array items: $ref: "#/components/schemas/Field" privacy: type: string enum: - public - unlisted - private - direct sensitive: type: boolean follow_requests_count: type: integer Role: type: object properties: id: type: integer name: type: string color: type: string permissions: type: integer highlighted: type: boolean Field: type: object properties: name: type: string value: type: string verified_at: type: string nullable: true required: - name - value - verified_at CustomEmoji: type: object properties: shortcode: type: string url: type: string static_url: type: string visible_in_picker: type: boolean category: type: string required: - shortcode - url - static_url - visible_in_picker - category Status: type: object properties: id: type: string uri: type: string created_at: type: string account: $ref: "#/components/schemas/Account" content: type: string visibility: type: string enum: - public - unlisted - private - direct sensitive: type: boolean spoiler_text: type: string media_attachments: type: array items: $ref: "#/components/schemas/MediaAttachment" application: $ref: "#/components/schemas/StatusApplication" mentions: type: array items: $ref: "#/components/schemas/StatusMention" tags: type: array items: $ref: "#/components/schemas/StatusTag" emojis: type: array items: $ref: "#/components/schemas/CustomEmoji" reblogs_count: type: integer favourites_count: type: integer replies_count: type: integer url: type: string nullable: true in_reply_to_id: type: string nullable: true in_reply_to_account_id: type: string nullable: true reblog: $ref: "#/components/schemas/Status" poll: $ref: "#/components/schemas/Poll" card: $ref: "#/components/schemas/PreviewCard" language: type: string nullable: true text: type: string nullable: true edited_at: type: string nullable: true favourited: type: boolean reblogged: type: boolean muted: type: boolean bookmarked: type: boolean pinned: type: boolean filtered: type: array items: $ref: "#/components/schemas/FilterResult" required: - id - uri - created_at - account - content - visibility - sensitive - spoiler_text - media_attachments - mentions - tags - emojis - reblogs_count - favourites_count - replies_count - url - in_reply_to_id - in_reply_to_account_id - language - text - edited_at MediaAttachment: type: object properties: id: type: string type: type: string enum: - unknown - image - gifv - video - audio url: type: string preview_url: type: string remote_url: type: string nullable: true description: type: string blurhash: type: string text_url: type: string StatusApplication: type: object properties: name: type: string website: type: string nullable: true StatusMention: type: object properties: id: type: string username: type: string url: type: string acct: type: string StatusTag: type: object properties: name: type: string url: type: string Poll: type: object properties: id: type: string expires_at: type: string nullable: true expired: type: boolean multiple: type: boolean votes_count: type: integer voters_count: type: integer nullable: true options: type: array items: $ref: "#/components/schemas/PollOption" emojis: type: array items: $ref: "#/components/schemas/CustomEmoji" voted: type: boolean own_votes: type: array items: type: integer PollOption: type: object properties: title: type: string votes_count: type: integer nullable: true PreviewCard: type: object properties: url: type: string title: type: string description: type: string type: type: string enum: - link - photo - video - rich author_name: type: string author_url: type: string provider_name: type: string provider_url: type: string html: type: string width: type: integer height: type: integer image: type: string nullable: true embed_url: type: string blurhash: type: string nullable: true FilterResult: type: object properties: filter: $ref: "#/components/schemas/FilterResult" keyword_matches: type: array items: type: string nullable: true status_matches: type: string nullable: true Filter: type: object properties: id: type: string title: type: string context: type: string enum: - home - notifications - public - thread - account expires_at: type: string nullable: true filter_action: type: string enum: - warn - hide keywords: type: array items: $ref: "#/components/schemas/FilterKeyword" statuses: type: array items: $ref: "#/components/schemas/FilterStatus" FilterKeyword: type: object properties: id: type: string keyword: type: string whole_word: type: boolean FilterStatus: type: object properties: id: type: string status_id: type: string Instance: type: object properties: domain: type: string title: type: string version: type: string source_url: type: string description: type: string usage: $ref: "#/components/schemas/InstanceUsage" thumbnail: $ref: "#/components/schemas/InstanceThumbnail" languages: type: array items: type: string configuration: $ref: "#/components/schemas/InstanceConfiguration" InstanceUsage: type: object properties: users: $ref: "#/components/schemas/InstanceUsageUsers" InstanceUsageUsers: type: object properties: active_month: type: integer InstanceThumbnail: type: object properties: blurhash: type: string versions: $ref: "#/components/schemas/InstanceThumbnailVersions" InstanceThumbnailVersions: type: object properties: "@1x": type: string "@2x": type: string InstanceConfiguration: type: object properties: urls: $ref: "#/components/schemas/InstanceConfigurationUrls" accounts: $ref: "#/components/schemas/InstanceConfigurationAccounts" statuses: $ref: "#/components/schemas/InstanceConfigurationStatuses" media_attachments: $ref: "#/components/schemas/InstanceConfigurationMediaAttachments" polls: $ref: "#/components/schemas/InstanceConfigurationPolls" translation: $ref: "#/components/schemas/InstanceConfigurationTranslation" registrations: $ref: "#/components/schemas/InstanceConfigurationRegistrations" contact: $ref: "#/components/schemas/InstanceConfigurationContact" rules: type: array items: $ref: "#/components/schemas/Rule" InstanceConfigurationUrls: type: object properties: streaming_api: type: string InstanceConfigurationAccounts: type: object properties: max_featured_tags: type: integer InstanceConfigurationStatuses: type: object properties: max_characters: type: integer max_media_attachments: type: integer characters_reserved_per_url: type: integer InstanceConfigurationMediaAttachments: type: object properties: supported_mime_types: type: array items: type: string image_size_limit: type: integer image_matrix_limit: type: integer video_size_limit: type: integer video_frame_rate_limit: type: integer video_matrix_limit: type: integer InstanceConfigurationPolls: type: object properties: max_options: type: integer max_characters_per_option: type: integer min_expiration: type: integer max_expiration: type: integer InstanceConfigurationTranslation: type: object properties: enabled: type: boolean InstanceConfigurationRegistrations: type: object properties: enabled: type: boolean approval_required: type: boolean message: type: string nullable: true InstanceConfigurationContact: type: object properties: email: type: string account: $ref: "#/components/schemas/Account" Rule: type: object properties: id: type: string text: type: string V1Instance: type: object properties: uri: type: string title: type: string short_description: type: string description: type: string email: type: string version: type: string urls: $ref: "#/components/schemas/V1InstanceUrls" stats: $ref: "#/components/schemas/V1InstanceStats" thumbnail: type: string nullable: true languages: type: array items: type: string registrations: type: boolean approval_required: type: boolean invites_enabled: type: boolean configuration: $ref: "#/components/schemas/V1InstanceConfiguration" contact_account: $ref: "#/components/schemas/Account" rules: type: array items: $ref: "#/components/schemas/Rule" required: - uri - title - short_description - description - email - version - urls - stats - thumbnail - languages - registrations - approval_required - invites_enabled - configuration - contact_account - rules V1InstanceUrls: type: object properties: streaming_api: type: string required: - streaming_api V1InstanceStats: type: object properties: user_count: type: integer status_count: type: integer domain_count: type: integer required: - user_count - status_count - domain_count V1InstanceConfiguration: type: object properties: accounts: $ref: "#/components/schemas/V1InstanceConfigurationAccounts" statuses: $ref: "#/components/schemas/V1InstanceConfigurationStatuses" media_attachments: $ref: "#/components/schemas/V1InstanceConfigurationMediaAttachments" polls: $ref: "#/components/schemas/V1InstanceConfigurationPolls" required: - accounts - statuses - media_attachments - polls V1InstanceConfigurationAccounts: type: object properties: max_featured_tags: type: integer V1InstanceConfigurationStatuses: type: object properties: max_characters: type: integer max_media_attachments: type: integer characters_reserved_per_url: type: integer V1InstanceConfigurationMediaAttachments: type: object properties: supported_mime_types: type: array items: type: string image_size_limit: type: integer image_matrix_limit: type: integer video_size_limit: type: integer video_frame_rate_limit: type: integer video_matrix_limit: type: integer V1InstanceConfigurationPolls: type: object properties: max_options: type: integer max_characters_per_option: type: integer min_expiration: type: integer max_expiration: type: integer V1InstanceActivity: type: object properties: week: type: integer statuses: type: integer logins: type: integer registrations: type: integer DomainBlock: type: object properties: domain: type: string digest: type: string severity: type: string enum: - silence - suspend comment: type: string ExtendedDescription: type: object properties: updated_at: type: string content: type: string StatusesRequest: type: object properties: status: type: string nullable: true media_ids: type: array items: type: string poll: $ref: "#/components/schemas/StatusesRequestPoll" in_reply_to_id: type: string sensitive: type: boolean spoiler_text: type: string visibility: type: string enum: - public - unlisted - private - direct language: type: string scheduled_at: type: string StatusesRequestPoll: type: object properties: options: type: array items: type: string expires_in: type: integer multiple: type: boolean hide_totals: type: boolean Application: type: object properties: name: type: string website: type: string nullable: true vapid_key: type: string client_id: type: string client_secret: type: string redirect_uri: type: string required: - name - vapid_key AppsRequest: type: object properties: client_name: type: string redirect_uris: type: string scopes: type: string website: type: string required: - client_name - redirect_uris Relationship: type: object properties: id: type: string following: type: boolean showing_reblogs: type: boolean notifying: type: boolean followed_by: type: boolean blocking: type: boolean blocked_by: type: boolean muting: type: boolean muting_notifications: type: boolean requested: type: boolean domain_blocking: type: boolean endorsed: type: boolean note: type: string required: - id - following - showing_reblogs - notifying - followed_by - blocking - blocked_by - muting - muting_notifications - requested - domain_blocking - endorsed - note FollowRequestBody: type: object properties: reblogs: type: boolean default: true notify: type: boolean default: false languages: type: array items: type: string securitySchemes: OAuth2: type: oauth2 description: Mastodon Oauth flows: authorizationCode: authorizationUrl: /oauth/authorize tokenUrl: /oauth/token scopes: read:accounts: "" read:blocks: "" read:bookmarks: "" read:favourites: "" read:filters: "" read:follows: "" read:lists: "" read:mutes: "" read:notifications: "" read:search: "" read:statuses: "" write:accounts: "" write:blocks: "" write:bookmarks: "" write:conversations: "" write:favourites: "" write:filters: "" write:follows: "" write:lists: "" write:media: "" write:mutes: "" write:notifications: "" write:reports: "" write:statuses: "" admin:read:accounts: "" admin:read:reports: "" admin:read:domain_allows: "" admin:read:domain_blocks: "" admin:read:ip_blocks: "" admin:read:email_domain_blocks: "" admin:read:canonical_email_blocks: "" admin:write:accounts: "" admin:write:reports: "" admin:write:domain_allows: "" admin:write:domain_blocks: "" admin:write:ip_blocks: "" admin:write:email_domain_blocks: "" admin:write:canonical_email_blocks: ""