Skip to content

Instantly share code, notes, and snippets.

@trozzelle
Created May 15, 2023 16:49
Show Gist options
  • Save trozzelle/497433b87f31ab54d6221558faa006ca to your computer and use it in GitHub Desktop.
Save trozzelle/497433b87f31ab54d6221558faa006ca to your computer and use it in GitHub Desktop.
Bluesky OpenAPI Spec for ChatGPT
openapi: 3.0.0
info:
description: Unofficial OpenAPI specification for the Bluesky API endpoints.
version: '1.0'
title: Bluesky API
contact:
email: [email protected]
license:
name: MIT
url: 'https://opensource.org/license/mit/'
paths:
/getProfile:
get:
tags:
- app.bsky.actor
summary: Get a detailed profile view of an actor.
operationId: getProfile
parameters:
- name: actor
in: query
description: Identifier of the actor to get the profile for.
required: true
schema:
type: string
format: at-identifier
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ProfileViewDetailed'
/getProfiles:
get:
tags:
- app.bsky.actor
summary: Get detailed profile views of multiple actors.
operationId: getProfiles
parameters:
- name: actors
in: query
description: Identifiers of the actors to get the profiles for.
required: true
style: form
explode: true
schema:
type: array
items:
type: string
format: at-identifier
maxItems: 25
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
required:
- profiles
properties:
profiles:
type: array
items:
$ref: '#/components/schemas/ProfileViewDetailed'
/getSuggestions:
get:
tags:
- app.bsky.actor
summary: Get a list of actors suggested for following.
description: Used in discovery UIs.
operationId: getSuggestions
parameters:
- name: limit
in: query
description: The maximum number of suggested actors to return.
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 50
- name: cursor
in: query
description: A cursor for pagination.
required: false
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
required:
- actors
properties:
cursor:
type: string
actors:
type: array
items:
$ref: '#/components/schemas/ProfileView'
/searchActors:
get:
tags:
- app.bsky.actor
summary: Find actors matching search criteria.
operationId: searchActors
parameters:
- in: query
name: term
schema:
type: string
required: false
- in: query
name: limit
schema:
type: integer
minimum: 1
maximum: 100
default: 50
required: false
- in: query
name: cursor
schema:
type: string
required: false
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
required:
- actors
properties:
cursor:
type: string
actors:
type: array
items:
$ref: '#/components/schemas/ProfileView'
/searchActorsTypeahead:
get:
tags:
- app.bsky.actor
summary: Find actor suggestions for a search term.
operationId: searchActorsTypeahead
parameters:
- in: query
name: term
schema:
type: string
required: false
- in: query
name: limit
schema:
type: integer
minimum: 1
maximum: 100
default: 50
required: false
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
required:
- actors
properties:
actors:
type: array
items:
$ref: '#/components/schemas/ProfileViewBasic'
/getLikes:
get:
tags:
- app.bsky.feed
parameters:
- name: uri
in: query
required: true
schema:
type: string
format: at-uri
- name: cid
in: query
schema:
type: string
format: cid
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 50
- name: cursor
in: query
schema:
type: string
responses:
'200':
description: A list of likes for a specific post
content:
application/json:
schema:
type: object
required:
- uri
- likes
properties:
uri:
type: string
format: at-uri
cid:
type: string
format: cid
cursor:
type: string
likes:
type: array
items:
$ref: '#/components/schemas/Like'
/getPostThread:
get:
tags:
- app.bsky.feed
parameters:
- name: uri
in: query
required: true
schema:
type: string
format: at-uri
- name: depth
in: query
schema:
type: integer
responses:
'200':
description: The post thread for a specific post
content:
application/json:
schema:
type: object
required:
- thread
properties:
thread:
anyOf:
- $ref: '#/components/schemas/ThreadViewPost'
- $ref: '#/components/schemas/NotFoundPost'
- $ref: '#/components/schemas/BlockedPost'
'404':
description: Post not found
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: NotFound
/getPosts:
get:
tags:
- app.bsky.feed
parameters:
- name: uris
in: query
required: true
schema:
type: array
items:
type: string
format: at-uri
maxLength: 25
responses:
'200':
description: A batch of specific posts
content:
application/json:
schema:
type: object
required:
- posts
properties:
posts:
type: array
items:
$ref: '#/components/schemas/PostView'
/repostedBy:
get:
tags:
- app.bsky.feed
parameters:
- name: uri
in: query
required: true
schema:
type: string
format: at-uri
- name: cid
in: query
schema:
type: string
format: cid
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 50
- name: cursor
in: query
schema:
type: string
responses:
'200':
description: The list of actors who have reposted a specific post
content:
application/json:
schema:
type: object
required:
- uri
- repostedBy
properties:
uri:
type: string
format: at-uri
cid:
type: string
format: cid
cursor:
type: string
repostedBy:
type: array
items:
$ref: 'app.bsky.actor.defs.yaml#/components/schemas/ProfileView'
/getFollowers:
get:
summary: "Who is following an actor?"
operationId: getFollowers
tags:
- app.bsky.graph
parameters:
- in: query
name: actor
schema:
type: string
format: at-identifier
required: true
- in: query
name: limit
schema:
type: integer
minimum: 1
maximum: 100
default: 50
- in: query
name: cursor
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
subject:
$ref: '#/components/schemas/ProfileView'
cursor:
type: string
followers:
type: array
items:
$ref: '#/components/schemas/ProfileView'
'400':
description: Invalid input
'500':
description: Unexpected error
/getFollows:
get:
summary: "Who is an actor following?"
operationId: getFollows
tags:
- app.bsky.graph
parameters:
- in: query
name: actor
schema:
type: string
format: at-identifier
required: true
- in: query
name: limit
schema:
type: integer
minimum: 1
maximum: 100
default: 50
- in: query
name: cursor
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
subject:
$ref: '#/components/schemas/ProfileView'
cursor:
type: string
follows:
type: array
items:
$ref: '#/components/schemas/ProfileView'
'400':
description: Invalid input
'500':
description: Unexpected error
/getList:
get:
summary: "Fetch a list of actors"
operationId: getList
tags:
- app.bsky.graph
parameters:
- in: query
name: list
schema:
type: string
format: at-uri
required: true
- in: query
name: limit
schema:
type: integer
minimum: 1
maximum: 100
default: 50
- in: query
name: cursor
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
cursor:
type: string
list:
$ref: '#/components/schemas/ListView'
items:
type: array
items:
$ref: '#/components/schemas/ListItemView'
'400':
description: Invalid input
'500':
description: Unexpected error
/getRecord:
get:
tags:
- com.atproto.admin
summary: View details about a record.
parameters:
- name: uri
in: query
required: true
schema:
type: string
format: at-uri
- name: cid
in: query
schema:
type: string
format: cid
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RecordViewDetail'
'400':
description: Invalid input
/getRepo:
get:
tags:
- com.atproto.admin
summary: View details about a repository.
parameters:
- name: did
in: query
required: true
schema:
type: string
format: did
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RepoViewDetail'
'400':
description: Invalid input
/searchRepos:
get:
tags:
- com.atproto.admin
summary: Find repositories based on a search term.
parameters:
- in: query
name: term
schema:
type: string
- in: query
name: invitedBy
schema:
type: string
- in: query
name: limit
schema:
type: integer
minimum: 1
maximum: 100
default: 50
- in: query
name: cursor
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
required:
- repos
properties:
cursor:
type: string
repos:
type: array
items:
$ref: '#/components/schemas/RepoView'
'400':
description: Invalid input
/resolveHandle:
get:
tags:
- com.atproto.identity
summary: Provides the DID of a repo.
description: Provides the DID of a repo.
operationId: com.atproto.identity.resolveHandle
parameters:
- in: query
name: handle
schema:
type: string
format: handle
description: The handle to resolve. If not supplied, will resolve the host's own handle.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ResolveHandleOutput'
/queryLabels:
get:
tags:
- com.atproto.label
summary: Find labels relevant to the provided URI patterns.
operationId: queryLabels
parameters:
- in: query
name: uriPatterns
required: true
description: List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI
schema:
type: array
items:
type: string
- in: query
name: sources
description: Optional list of label sources (DIDs) to filter on
schema:
type: array
items:
type: string
format: did
- in: query
name: limit
description: The maximum number of results to return
schema:
type: integer
minimum: 1
maximum: 250
default: 50
- in: query
name: cursor
description: Cursor for pagination
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
required:
- labels
properties:
cursor:
type: string
labels:
type: array
items:
$ref: '#/components/schemas/Label'
/listRecords:
get:
tags:
- com.atproto.repo
summary: List a range of records in a collection
description: List a range of records in a collection.
operationId: com.atproto.repo.listRecords
parameters:
- name: repo
in: query
required: true
schema:
type: string
format: at-identifier
description: The handle or DID of the repo.
- name: collection
in: query
required: true
schema:
type: string
format: nsid
description: The NSID of the record type.
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 50
description: The number of records to return.
- name: cursor
in: query
schema:
type: string
- name: reverse
in: query
schema:
type: boolean
description: Reverse the order of the returned records?
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
required:
- records
properties:
cursor:
type: string
records:
type: array
items:
$ref: '#/components/schemas/Record'
/describeRepo:
get:
tags:
- com.atproto.repo
summary: Get information about the repo, including the list of collections.
description: Get information about the repo, including the list of collections.
operationId: com.atproto.repo.describeRepo
parameters:
- name: repo
in: query
required: true
schema:
type: string
format: at-identifier
description: The handle or DID of the repo.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RepoDescription'
/describeServer:
get:
tags:
- com.atproto.server
summary: Get a document describing the service's accounts configuration
responses:
'200':
description: Document describing the service's accounts configuration
content:
application/json:
schema:
type: object
required:
- availableUserDomains
properties:
inviteCodeRequired:
type: boolean
availableUserDomains:
type: array
items:
type: string
links:
$ref: '#/components/schemas/Links'
components:
schemas:
ProfileViewBasic:
type: object
required:
- did
- handle
properties:
did:
type: string
format: did
handle:
type: string
format: handle
displayName:
type: string
maxLength: 640
avatar:
type: string
viewer:
$ref: '#/components/schemas/ViewerState'
labels:
type: array
items:
$ref: '#/components/schemas/Label'
ProfileView:
type: object
required:
- did
- handle
properties:
did:
type: string
format: did
handle:
type: string
format: handle
displayName:
type: string
maxLength: 640
description:
type: string
maxLength: 2560
avatar:
type: string
indexedAt:
type: string
format: date-time
viewer:
$ref: '#/components/schemas/ViewerState'
labels:
type: array
items:
$ref: '#/components/schemas/Label'
ProfileViewDetailed:
type: object
required:
- did
- handle
properties:
did:
type: string
format: did
handle:
type: string
format: handle
displayName:
type: string
maxLength: 640
description:
type: string
maxLength: 2560
avatar:
type: string
banner:
type: string
followersCount:
type: integer
followsCount:
type: integer
postsCount:
type: integer
indexedAt:
type: string
format: date-time
viewer:
$ref: '#/components/schemas/ViewerState'
labels:
type: array
items:
$ref: '#/components/schemas/Label'
ViewerState:
type: object
properties:
muted:
type: boolean
mutedByList:
$ref: '#/components/schemas/ListViewBasic'
blockedBy:
type: boolean
blocking:
type: string
format: at-uri
following:
type: string
format: at-uri
followedBy:
type: string
format: at-uri
Label:
type: object
description: Metadata tag on an atproto resource (eg, repo or record)
required:
- src
- uri
- val
- cts
properties:
src:
type: string
format: did
description: DID of the actor who created this label
uri:
type: string
format: uri
description: AT URI of the record, repository (account), or other resource which this label applies to
cid:
type: string
format: cid
description: optionally, CID specifying the specific version of 'uri' resource this label applies to
val:
type: string
maxLength: 128
description: the short string name of the value or type of this label
neg:
type: boolean
description: if true, this is a negation label, overwriting a previous label
cts:
type: string
format: datetime
description: timestamp when this label was created
ListViewBasic:
type: object
ExternalEmbed:
type: object
required:
- external
properties:
external:
$ref: '#/components/schemas/External'
External:
type: object
required:
- uri
- title
- description
properties:
uri:
type: string
format: uri
title:
type: string
description:
type: string
thumb:
type: string
format: binary
maxLength: 1000000
ExternalEmbedView:
type: object
required:
- external
properties:
external:
$ref: '#/components/schemas/ExternalView'
ExternalView:
type: object
required:
- uri
- title
- description
properties:
uri:
type: string
format: uri
title:
type: string
description:
type: string
thumb:
type: string
ImagesEmbed:
type: object
required:
- images
properties:
images:
type: array
items:
$ref: '#/components/schemas/Image'
maxItems: 4
Image:
type: object
required:
- image
- alt
properties:
image:
type: string
format: binary
maxLength: 1000000
alt:
type: string
ImagesEmbedView:
type: object
required:
- images
properties:
images:
type: array
items:
$ref: '#/components/schemas/ImageView'
maxItems: 4
ImageView:
type: object
required:
- thumb
- fullsize
- alt
properties:
thumb:
type: string
fullsize:
type: string
alt:
type: string
RecordEmbed:
type: object
required:
- record
properties:
record:
$ref: '#/components/schemas/StrongRef'
RecordEmbedView:
type: object
required:
- record
properties:
record:
type: object
properties:
oneOf:
- $ref: '#/components/schemas/ViewRecord'
- $ref: '#/components/schemas/ViewNotFound'
- $ref: '#/components/schemas/ViewBlocked'
ViewRecord:
type: object
required:
- uri
- cid
- author
- value
- indexedAt
properties:
uri:
type: string
format: at-uri
cid:
type: string
format: cid
author:
$ref: '#/components/schemas/ProfileViewBasic'
value:
type: string
labels:
type: array
items:
$ref: '#/components/schemas/Label'
embeds:
type: array
items:
oneOf:
- $ref: '#/components/schemas/ImagesEmbedView'
- $ref: '#/components/schemas/ExternalEmbedView'
- $ref: '#/components/schemas/RecordEmbedView'
- $ref: '#/components/schemas/RecordWithMediaEmbedView'
indexedAt:
type: string
format: date-time
ViewNotFound:
type: object
required:
- uri
properties:
uri:
type: string
format: at-uri
ViewBlocked:
type: object
required:
- uri
properties:
uri:
type: string
format: at-uri
RecordWithMediaEmbed:
type: object
required:
- record
- media
properties:
record:
$ref: '#/components/schemas/RecordEmbed'
media:
oneOf:
- $ref: '#/components/schemas/ImagesEmbed'
- $ref: '#/components/schemas/ExternalEmbed'
RecordWithMediaEmbedView:
type: object
required:
- record
- media
properties:
record:
$ref: '#/components/schemas/RecordEmbedView'
media:
oneOf:
- $ref: '#/components/schemas/ImagesEmbedView'
- $ref: '#/components/schemas/ExternalEmbedView'
PostView:
type: object
required:
- uri
- cid
- author
- record
- indexedAt
properties:
uri:
type: string
format: at-uri
cid:
type: string
format: cid
author:
$ref: '#/components/schemas/ProfileViewBasic'
record:
type: object
embed:
oneOf:
- $ref: '#/components/schemas/ImagesEmbedView'
- $ref: '#/components/schemas/ExternalEmbedView'
- $ref: 'l#/components/schemas/RecordEmbedView'
- $ref: '#/components/schemas/RecordWithMediaEmbedView'
replyCount:
type: integer
repostCount:
type: integer
likeCount:
type: integer
indexedAt:
type: string
format: datetime
viewer:
$ref: '#/components/schemas/ViewerState'
labels:
type: array
items:
$ref: '#/components/schemas/Label'
Post:
type: object
required:
- text
- createdAt
properties:
text:
type: string
maxLength: 3000
description: 'text'
entities:
type: array
description: deprecated - replaced by app.bsky.richtext.facet.
items:
$ref: '#/components/schemas/Entity'
facets:
type: array
items:
$ref: '#/components/schemas/Facet'
reply:
$ref: '#/components/schemas/ReplyRef'
embed:
$ref: 'Embed'
createdAt:
type: string
format: datetime
ReplyRef:
type: object
required:
- root
- parent
properties:
root:
$ref: '#/components/schemas/StrongRef'
parent:
$ref: '#/components/schemas/StrongRef'
Entity:
type: object
description: Deprecated - use facets instead.
required:
- index
- type
- value
properties:
index:
$ref: '#/components/schemas/TextSlice'
type:
type: string
description: Expected values are 'mention' and 'link'.
value:
type: string
TextSlice:
type: object
description: Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.
required:
- start
- end
properties:
start:
type: integer
minimum: 0
end:
type: integer
minimum: 0
Repost:
type: object
required:
- subject
- createdAt
properties:
subject:
$ref: '#/components/schemas/StrongRef'
createdAt:
type: string
format: datetime
ListRecord:
type: object
required:
- name
- purpose
- createdAt
properties:
purpose:
$ref: '#/components/schemas/ListPurpose'
name:
type: string
maxLength: 64
minLength: 1
description:
type: string
maxLength: 3000
descriptionFacets:
type: array
items:
$ref: '#/components/schemas/RichTextFacet'
avatar:
type: string
format: binary
description: "A binary file with a maximum size of 1,000,000 bytes. Accepts image/png or image/jpeg file types."
createdAt:
type: string
format: date-time
ListItemRecord:
type: object
required:
- subject
- list
- createdAt
properties:
subject:
type: string
description: "Decentralized identifier (DID)"
format: uri
list:
type: string
description: "Unique identifier of the list"
format: uri
createdAt:
type: string
description: "Creation date of the list item"
format: date-time
Notification:
type: object
required:
- uri
- cid
- author
- reason
- record
- isRead
- indexedAt
properties:
uri:
type: string
format: uri
cid:
type: string
author:
$ref: '#/components/schemas/ProfileView'
reason:
type: string
enum: [ "like", "repost", "follow", "mention", "reply", "quote" ]
reasonSubject:
type: string
format: uri
record:
type: object
isRead:
type: boolean
indexedAt:
type: string
format: date-time
labels:
type: array
items:
$ref: '#/components/schemas/Label'
Facet:
type: object
required:
- index
- features
properties:
index:
$ref: '#/components/schemas/ByteSlice'
features:
type: array
items:
oneOf:
- $ref: '#/components/schemas/Mention'
- $ref: '#/components/schemas/Link'
Mention:
type: object
description: "A facet feature for actor mentions."
required:
- did
properties:
did:
type: string
format: did
Link:
type: object
description: "A facet feature for links."
required:
- uri
properties:
uri:
type: string
format: uri
Like:
type: object
required:
- indexedAt
- createdAt
- actor
properties:
indexedAt:
type: string
format: datetime
createdAt:
type: string
format: datetime
actor:
$ref: '#/components/schemas/ProfileView'
ByteSlice:
type: object
description: "A text segment. Start is inclusive, end is exclusive. Indices are for utf8-encoded strings."
required:
- byteStart
- byteEnd
properties:
byteStart:
type: integer
minimum: 0
byteEnd:
type: integer
minimum: 0
FeedViewPost:
type: object
required:
- post
properties:
post:
$ref: '#/components/schemas/PostView'
reply:
$ref: '#/components/schemas/ReplyRef'
reason:
oneOf:
- $ref: '#/components/schemas/ReasonRepost'
ReasonRepost:
type: object
required:
- by
- indexedAt
properties:
by:
$ref: '#/components/schemas/ProfileViewBasic'
indexedAt:
type: string
format: datetime
ThreadViewPost:
type: object
required:
- post
properties:
post:
$ref: '#/components/schemas/PostView'
parent:
oneOf:
- $ref: '#/components/schemas/ThreadViewPost'
- $ref: '#/components/schemas/NotFoundPost'
- $ref: '#/components/schemas/BlockedPost'
replies:
type: array
items:
oneOf:
- $ref: '#/components/schemas/ThreadViewPost'
- $ref: '#/components/schemas/NotFoundPost'
- $ref: '#/components/schemas/BlockedPost'
NotFoundPost:
type: object
required:
- uri
- notFound
properties:
uri:
type: string
format: at-uri
notFound:
type: boolean
default: true
BlockedPost:
type: object
required:
- uri
- blocked
properties:
uri:
type: string
format: at-uri
blocked:
type: boolean
default: true
ListView:
type: object
required:
- uri
- creator
- name
- purpose
- indexedAt
properties:
uri:
type: string
format: at-uri
creator:
$ref: '#/components/schemas/ProfileView'
name:
type: string
maxLength: 64
minLength: 1
purpose:
$ref: '#/components/schemas/ListPurpose'
description:
type: string
description: Max graphemes 300, maxLength 3000
descriptionFacets:
type: array
items:
$ref: '#/components/schemas/RichTextFacet'
avatar:
type: string
viewer:
$ref: '#/components/schemas/ListViewerState'
indexedAt:
type: string
format: datetime
ListItemView:
type: object
required:
- subject
properties:
subject:
$ref: '#/components/schemas/ProfileView'
ListPurpose:
type: string
enum:
- modlist
Modlist:
type: string
description: A list of actors to apply an aggregate moderation action (mute/block) on
ListViewerState:
type: object
properties:
muted:
type: boolean
StrongRef:
type: object
description: A URI with a content-hash fingerprint.
required:
- uri
- cid
properties:
uri:
type: string
format: at-uri
cid:
type: string
format: cid
RichTextFacet:
type: object
required:
- index
- features
properties:
index:
$ref: '#/components/schemas/ByteSlice'
features:
type: array
items:
oneOf:
- $ref: '#/components/schemas/Mention'
- $ref: '#/components/schemas/Link'
ActionType:
type: string
enum:
- takedown
- flag
- acknowledge
- escalate
description: Type of moderation action
ActionView:
type: object
required:
- id
- action
- subject
- subjectBlobCids
- reason
- createdBy
- createdAt
- resolvedReportIds
properties:
id:
type: integer
action:
$ref: '#/components/schemas/ActionType'
subject:
oneOf: # assuming '#repoRef' and 'com.atproto.repo.strongRef' are other defined schemas
- $ref: '#/components/schemas/RepoRef'
- $ref: '#/components/schemas/StrongRef'
subjectBlobCids:
type: array
items:
type: string
createLabelVals:
type: array
items:
type: string
negateLabelVals:
type: array
items:
type: string
reason:
type: string
createdBy:
type: string
format: did
createdAt:
type: string
format: datetime
reversal:
$ref: '#/components/schemas/ActionReversal'
resolvedReportIds:
type: array
items:
type: integer
ActionViewCurrent:
type: object
required:
- id
- action
properties:
id:
type: integer
action:
$ref: '#/components/schemas/ActionType'
ActionViewDetail:
type: object
required:
- id
- action
- subject
- subjectBlobs
- reason
- createdBy
- createdAt
- resolvedReports
properties:
id:
type: integer
action:
$ref: '#/components/schemas/ActionType'
subject:
oneOf: # assuming '#repoView' and '#recordView' are other defined schemas
- $ref: '#/components/schemas/RepoView'
- $ref: '#/components/schemas/RecordView'
subjectBlobs:
type: array
items:
$ref: '#/components/schemas/BlobView'
createLabelVals:
type: array
items:
type: string
negateLabelVals:
type: array
items:
type: string
reason:
type: string
createdBy:
type: string
format: did
createdAt:
type: string
format: datetime
reversal:
$ref: '#/components/schemas/ActionReversal'
resolvedReports:
type: array
items:
$ref: '#/components/schemas/ReportView'
ActionReversal:
type: object
required:
- id
- action
- subject
- subjectBlobCids
- createdBy
- createdAt
properties:
id:
type: integer
action:
$ref: '#/components/schemas/ActionType'
subject:
oneOf: # assuming '#repoRef' and 'com.atproto.repo.strongRef' are other defined schemas
- $ref: '#/components/schemas/RepoRef'
- $ref: '#/components/schemas/StrongRef'
subjectBlobCids:
type: array
items:
type: string
createdBy:
type: string
format: did
createdAt:
type: string
format: datetime
ReportType:
type: string
enum:
- spam
- harassment
- harmfulDangerousActs
- violentExtremistContent
- childEndangerment
- unwantedSexualContent
- hatefulAbusiveContent
- other
description: Type of report
ReportStatus:
type: string
enum:
- open
- inProgress
- resolved
description: Status of the report
ReportView:
type: object
required:
- id
- reportType
- status
- subject
- subjectBlobCids
- reason
- createdBy
- createdAt
- resolvedByActionId
properties:
id:
type: integer
reportType:
$ref: '#/components/schemas/ReportType'
status:
$ref: '#/components/schemas/ReportStatus'
subject:
oneOf: # assuming '#repoRef' and 'com.atproto.repo.strongRef' are other defined schemas
- $ref: '#/components/schemas/RepoRef'
- $ref: '#/components/schemas/StrongRef'
subjectBlobCids:
type: array
items:
type: string
reason:
type: string
createdBy:
type: string
format: did
createdAt:
type: string
format: datetime
resolvedByActionId:
type: integer
ReportViewDetail:
type: object
required:
- id
- reportType
- status
- subject
- subjectBlobs
- reason
- createdBy
- createdAt
- resolvedByAction
properties:
id:
type: integer
reportType:
$ref: '#/components/schemas/ReportType'
status:
$ref: '#/components/schemas/ReportStatus'
subject:
oneOf: # assuming '#repoView' and '#recordView' are other defined schemas
- $ref: '#/components/schemas/RepoView'
- $ref: '#/components/schemas/RecordView'
subjectBlobs:
type: array
items:
$ref: '#/components/schemas/Blob'
reason:
type: string
createdBy:
type: string
format: did
createdAt:
type: string
format: datetime
resolvedByAction:
$ref: '#/components/schemas/ActionViewDetail'
RepoView:
type: object
required:
- did
- handle
- relatedRecords
- indexedAt
- moderation
properties:
did:
type: string
handle:
type: string
email:
type: string
relatedRecords:
type: array
items:
type: string
indexedAt:
type: string
format: date-time
moderation:
$ref: '#/components/schemas/Moderation'
invitedBy:
$ref: '#/components/schemas/InviteCode'
invitesDisabled:
type: boolean
RepoViewDetail:
allOf:
- $ref: '#/components/schemas/RepoView'
- type: object
required:
- labels
- invites
properties:
moderation:
$ref: '#/components/schemas/ModerationDetail'
labels:
type: array
items:
$ref: '#/components/schemas/Label'
invites:
type: array
items:
$ref: '#/components/schemas/InviteCode'
RepoRef:
type: object
required:
- did
properties:
did:
type: string
RecordView:
type: object
required:
- uri
- cid
- value
- blobCids
- indexedAt
- moderation
- repo
properties:
uri:
type: string
cid:
type: string
value:
type: string
blobCids:
type: array
items:
type: string
indexedAt:
type: string
format: date-time
moderation:
$ref: '#/components/schemas/Moderation'
repo:
$ref: '#/components/schemas/RepoView'
RecordViewDetail:
allOf:
- $ref: '#/components/schemas/RecordView'
- type: object
required:
- blobs
- labels
properties:
blobs:
type: array
items:
$ref: '#/components/schemas/BlobView'
labels:
type: array
items:
$ref: '#/components/schemas/Label'
moderation:
$ref: '#/components/schemas/ModerationDetail'
Moderation:
type: object
properties:
currentAction:
$ref: '#/components/schemas/ActionViewCurrent'
ModerationDetail:
allOf:
- $ref: '#/components/schemas/Moderation'
- type: object
required:
- actions
- reports
properties:
actions:
type: array
items:
$ref: '#/components/schemas/ActionView'
reports:
type: array
items:
$ref: '#/components/schemas/ReportView'
BlobView:
type: object
required:
- cid
- mimeType
- size
- createdAt
properties:
cid:
type: string
mimeType:
type: string
size:
type: integer
createdAt:
type: string
format: date-time
details:
oneOf:
- $ref: '#/components/schemas/ImageDetails'
- $ref: '#/components/schemas/VideoDetails'
moderation:
$ref: '#/components/schemas/Moderation'
ImageDetails:
type: object
required:
- width
- height
properties:
width:
type: integer
height:
type: integer
VideoDetails:
type: object
required:
- width
- height
- length
properties:
width:
type: integer
height:
type: integer
length:
type: integer
ResolveHandleOutput:
type: object
required:
- did
properties:
did:
type: string
format: did
Record:
type: object
required:
- uri
- cid
- value
properties:
uri:
type: string
format: at-uri
cid:
type: string
format: cid
value:
type: string # 'unknown' is not a valid OpenAPI data type, so 'string' is used as a placeholder
RepoDescription:
type: object
required:
- handle
- did
- didDoc
- collections
- handleIsCorrect
properties:
handle:
type: string
format: handle
did:
type: string
format: did
didDoc:
type: string # 'unknown' is not a valid OpenAPI data type, so 'string' is used as a placeholder
collections:
type: array
items:
type: string
format: nsid
handleIsCorrect:
type: boolean
Links:
type: object
properties:
privacyPolicy:
type: string
termsOfService:
type: string
InviteCode:
type: object
required: [ "code", "available", "disabled", "forAccount", "createdBy", "createdAt", "uses" ]
properties:
code: { type: "string" }
available: { type: "integer" }
disabled: { type: "boolean" }
forAccount: { type: "string" }
createdBy: { type: "string" }
createdAt: { type: "string", format: "datetime" }
uses:
type: "array"
items:
type: object
required: [ "usedBy", "usedAt" ]
properties:
usedBy: { type: "string", format: "did" }
usedAt: { type: "string", format: "datetime" }
Error:
type: object
properties:
error:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment