mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 19:52:18 -05:00
3091 lines
86 KiB
JSON
3091 lines
86 KiB
JSON
{
|
|
"openapi": "3.0.1",
|
|
"info": {
|
|
"title": "Manyfold API",
|
|
"version": "0",
|
|
"description": "This document describes the REST API for this [Manyfold](https://manyfold.app) instance.\n\nWarning! This API...\n\n* ... is not complete! Functionality is limited for now, but future releases will add more capabilities.\n* ... is not yet at v1! It's subject to breaking changes at any time.\n* ... is only valid for this host! Other Manyfold instances running different software versions may expose a different set of API functionality.\n"
|
|
},
|
|
"paths": {
|
|
"/.well-known/nodeinfo": {
|
|
"get": {
|
|
"summary": "Discovery URL for NodeInfo protocol",
|
|
"tags": [
|
|
"NodeInfo"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json; profile=\"http://nodeinfo.diaspora.software/ns/schema/2.0#\"": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"rel": {
|
|
"type": "string",
|
|
"example": "https://nodeinfo.diaspora.software/ns/schema/2.0"
|
|
},
|
|
"href": {
|
|
"type": "string",
|
|
"example": "/nodeinfo/2.0",
|
|
"description": "The URL to the full NodeInfo document"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"links"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/nodeinfo/2.0": {
|
|
"get": {
|
|
"summary": "Get server metadata in NodeInfo 2.0 format",
|
|
"tags": [
|
|
"NodeInfo"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json; profile=\"http://nodeinfo.diaspora.software/ns/schema/2.0#\"": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"version": {
|
|
"type": "string",
|
|
"example": "2.0"
|
|
},
|
|
"software": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Manyfold"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"example": "v0.103.0"
|
|
}
|
|
}
|
|
},
|
|
"protocols": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "activitypub"
|
|
}
|
|
},
|
|
"services": {
|
|
"type": "object",
|
|
"properties": {
|
|
"inbound": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"example": []
|
|
},
|
|
"outbound": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"example": []
|
|
}
|
|
}
|
|
},
|
|
"openRegistrations": {
|
|
"type": "boolean"
|
|
},
|
|
"usage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"users": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"activeMonth": {
|
|
"type": "integer"
|
|
},
|
|
"activeHalfyear": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"metadata": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"software",
|
|
"protocols",
|
|
"openRegistrations"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/oembed": {
|
|
"get": {
|
|
"summary": "generic oEmbed API endpoint",
|
|
"tags": [
|
|
"oEmbed"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "url",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "maxwidth",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "maxheight",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"303": {
|
|
"description": "Redirect to oembed version of the provided URL"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/collections/{id}.oembed": {
|
|
"get": {
|
|
"summary": "oEmbed response for Collections",
|
|
"tags": [
|
|
"oEmbed"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "maxwidth",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "maxheight",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json+oembed": {
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/oembed_rich"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/oembed_photo"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/oembed_video"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/oembed_link"
|
|
}
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "type",
|
|
"mapping": {
|
|
"rich": "#/components/schemas/oembed_rich",
|
|
"photo": "#/components/schemas/oembed_photo",
|
|
"video": "#/components/schemas/oembed_video",
|
|
"link": "#/components/schemas/oembed_link"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found or Unauthorized"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/creators/{id}.oembed": {
|
|
"get": {
|
|
"summary": "oEmbed response for Creators",
|
|
"tags": [
|
|
"oEmbed"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "maxwidth",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "maxheight",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json+oembed": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/oembed_link"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found or Unauthorized"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/models/{id}.oembed": {
|
|
"get": {
|
|
"summary": "oEmbed response for Models",
|
|
"tags": [
|
|
"oEmbed"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "maxwidth",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "maxheight",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json+oembed": {
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/oembed_rich"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/oembed_photo"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/oembed_video"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/oembed_link"
|
|
}
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "type",
|
|
"mapping": {
|
|
"rich": "#/components/schemas/oembed_rich",
|
|
"photo": "#/components/schemas/oembed_photo",
|
|
"video": "#/components/schemas/oembed_video",
|
|
"link": "#/components/schemas/oembed_link"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found, or Unauthorized"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/collections": {
|
|
"get": {
|
|
"summary": "A list of collections",
|
|
"tags": [
|
|
"Collections"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"example": 1,
|
|
"description": "Specify which page of results to retrieve.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"enum": [
|
|
"name",
|
|
"recent",
|
|
"updated"
|
|
],
|
|
"description": "Specify order of results; either by name, creation time, or updated time:\n * `name` \n * `recent` \n * `updated` \n ",
|
|
"example": "name",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"public",
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "hydra:Collection"
|
|
},
|
|
"totalItems": {
|
|
"type": "integer",
|
|
"example": 42
|
|
},
|
|
"member": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "/collections/abc123",
|
|
"description": "The URL of the collection"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Printer Parts",
|
|
"description": "The human name of the collection"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"view": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections?page=2"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "hydra:PartialCollectionView"
|
|
},
|
|
"first": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections?page=1"
|
|
},
|
|
"prev": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections?page=1"
|
|
},
|
|
"next": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections?page=3"
|
|
},
|
|
"last": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections?page=10"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"@type",
|
|
"first",
|
|
"last"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type",
|
|
"totalItems",
|
|
"member",
|
|
"view"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Create a new collection",
|
|
"tags": [
|
|
"Collections"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Collection created",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/collection_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request structure was incorrect"
|
|
},
|
|
"422": {
|
|
"description": "Creation failed due to invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/collection_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/collections/{id}": {
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "abc123",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"summary": "Details of a single collection",
|
|
"tags": [
|
|
"Collections"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"public",
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/collection_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Update a collection",
|
|
"tags": [
|
|
"Collections"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Collection updated",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/collection_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request structure was incorrect"
|
|
},
|
|
"422": {
|
|
"description": "Creation failed due to invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/collection_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Remove a collection",
|
|
"tags": [
|
|
"Collections"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"delete"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/creators": {
|
|
"get": {
|
|
"summary": "A list of creators",
|
|
"tags": [
|
|
"Creators"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"example": 1,
|
|
"description": "Specify which page of results to retrieve.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"enum": [
|
|
"name",
|
|
"recent",
|
|
"updated"
|
|
],
|
|
"description": "Specify order of results; either by name, creation time, or updated time:\n * `name` \n * `recent` \n * `updated` \n ",
|
|
"example": "name",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"public",
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "hydra:Collection"
|
|
},
|
|
"totalItems": {
|
|
"type": "integer",
|
|
"example": 42
|
|
},
|
|
"member": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "/creators/abc123",
|
|
"description": "The URL of the creator"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Fred",
|
|
"description": "The human name of the creator"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"view": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=2"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "hydra:PartialCollectionView"
|
|
},
|
|
"first": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=1"
|
|
},
|
|
"prev": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=1"
|
|
},
|
|
"next": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=3"
|
|
},
|
|
"last": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=10"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"@type",
|
|
"first",
|
|
"last"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type",
|
|
"totalItems",
|
|
"member",
|
|
"view"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Create a creator",
|
|
"tags": [
|
|
"Creators"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Creator created",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/creator_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request structure was incorrect"
|
|
},
|
|
"422": {
|
|
"description": "Creation failed due to invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/creator_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/creators/{id}": {
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "abc123",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"summary": "Details of a single creator",
|
|
"tags": [
|
|
"Creators"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"public",
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/creator_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Update a creator",
|
|
"tags": [
|
|
"Creators"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Creator updated",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/creator_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request structure was incorrect"
|
|
},
|
|
"422": {
|
|
"description": "Creation failed due to invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/creator_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Remove a creator",
|
|
"tags": [
|
|
"Creators"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"delete"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/creators/{creator_id}/groups": {
|
|
"parameters": [
|
|
{
|
|
"name": "creator_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "abc123",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"summary": "A list of user groups associated with a creator",
|
|
"tags": [
|
|
"User Groups"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"example": 1,
|
|
"description": "Specify which page of results to retrieve.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "hydra:Collection"
|
|
},
|
|
"totalItems": {
|
|
"type": "integer",
|
|
"example": 3
|
|
},
|
|
"member": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "/creators/abc123/groups/1",
|
|
"description": "The URL of the user group"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Patrons",
|
|
"description": "The human name of the user group"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"view": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=2"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "hydra:PartialCollectionView"
|
|
},
|
|
"first": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=1"
|
|
},
|
|
"prev": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=1"
|
|
},
|
|
"next": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=3"
|
|
},
|
|
"last": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators?page=10"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"@type",
|
|
"first",
|
|
"last"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type",
|
|
"totalItems",
|
|
"member",
|
|
"view"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Create a new user group",
|
|
"tags": [
|
|
"User Groups"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Group created",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/group_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request structure was incorrect"
|
|
},
|
|
"422": {
|
|
"description": "Creation failed due to invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/group_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/creators/{creator_id}/groups/{id}": {
|
|
"parameters": [
|
|
{
|
|
"name": "creator_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "abc123",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "1",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"summary": "Get details of a single user group",
|
|
"tags": [
|
|
"User Groups"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/group_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Update a user group",
|
|
"tags": [
|
|
"User Groups"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Group updated",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/group_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request structure was incorrect"
|
|
},
|
|
"422": {
|
|
"description": "Creation failed due to invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/group_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Remove a user group",
|
|
"tags": [
|
|
"User Groups"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"delete"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/models/{model_id}/model_files": {
|
|
"post": {
|
|
"summary": "Add a new file to a model",
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "model_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "abc123",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Accepted; the files will be added to the model after processing"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/uploaded_file_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/models/{model_id}/model_files/{id}": {
|
|
"parameters": [
|
|
{
|
|
"name": "model_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "abc123",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "def456",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"summary": "Details of a single file in a model",
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"public",
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/model_file_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Update file details",
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": "File updated",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/model_file_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request structure was incorrect"
|
|
},
|
|
"422": {
|
|
"description": "Update failed due to invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/model_file_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Remove a single file",
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"delete"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/models": {
|
|
"get": {
|
|
"summary": "A list of models",
|
|
"tags": [
|
|
"Models"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"example": 1,
|
|
"description": "Specify which page of results to retrieve.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"enum": [
|
|
"name",
|
|
"recent",
|
|
"updated"
|
|
],
|
|
"description": "Specify order of results; either by name, creation time, or updated time:\n * `name` \n * `recent` \n * `updated` \n ",
|
|
"example": "name",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "creator",
|
|
"in": "query",
|
|
"description": "The ID of a creator to filter the model list",
|
|
"example": "abc123",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "collection",
|
|
"in": "query",
|
|
"description": "The ID of a collection to filter the model list",
|
|
"example": "abc123",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"public",
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "hydra:Collection"
|
|
},
|
|
"totalItems": {
|
|
"type": "integer",
|
|
"example": 42
|
|
},
|
|
"member": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "/models/abc123",
|
|
"description": "The URL of the model"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Model",
|
|
"description": "The human name of the model"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"view": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models?page=2"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "hydra:PartialCollectionView"
|
|
},
|
|
"first": {
|
|
"type": "string",
|
|
"example": "https://example.com/models?page=1"
|
|
},
|
|
"prev": {
|
|
"type": "string",
|
|
"example": "https://example.com/models?page=1"
|
|
},
|
|
"next": {
|
|
"type": "string",
|
|
"example": "https://example.com/models?page=3"
|
|
},
|
|
"last": {
|
|
"type": "string",
|
|
"example": "https://example.com/models?page=10"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"@type",
|
|
"first",
|
|
"last"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type",
|
|
"totalItems",
|
|
"member",
|
|
"view"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Create new models from uploaded files",
|
|
"tags": [
|
|
"Models"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Accepted; the files will be processed and turned into new models"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/uploaded_model_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/models/{id}": {
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"example": "abc123",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"summary": "Details of a single model",
|
|
"tags": [
|
|
"Models"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"public",
|
|
"read"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/model_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Update a model",
|
|
"tags": [
|
|
"Models"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"write"
|
|
]
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Model updated",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/model_response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request structure was incorrect"
|
|
},
|
|
"422": {
|
|
"description": "Update failed due to invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/model_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Remove an entire model",
|
|
"tags": [
|
|
"Models"
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"delete"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/vnd.manyfold.v0+json": {
|
|
"schema": {
|
|
"type": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized; the request did not provide valid authentication details"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden; the provided credentials do not have permission to perform the requested action"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/upload": {
|
|
"options": {
|
|
"summary": "Details of upload capabilities",
|
|
"tags": [
|
|
"File Uploading"
|
|
],
|
|
"description": "Manyfold uses the Tus protocol for resumable uploading; see https://tus.io/protocols/resumable-upload for full details.",
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"upload"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Upload capabilities",
|
|
"headers": {
|
|
"Tus-Resumable": {
|
|
"schema": {
|
|
"type": "string",
|
|
"example": "1.0.0",
|
|
"description": "Tus protocol version"
|
|
}
|
|
},
|
|
"Tus-Version": {
|
|
"schema": {
|
|
"type": "string",
|
|
"example": "1.0.0,0.2.2,0.2.1",
|
|
"description": "Comma separated versions of the Tus protocol supported by the server"
|
|
}
|
|
},
|
|
"Tus-Extension": {
|
|
"schema": {
|
|
"type": "string",
|
|
"example": "creation,termination,expiration,concatenation",
|
|
"description": "Comma separated list of Tus protocol extensions supported by the server"
|
|
}
|
|
},
|
|
"Tus-Max-Size": {
|
|
"schema": {
|
|
"type": "integer",
|
|
"example": 1073741824,
|
|
"description": "The maximum file size that can be uploaded to the server"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Create a new upload",
|
|
"tags": [
|
|
"File Uploading"
|
|
],
|
|
"description": "Manyfold uses the Tus protocol for resumable uploading; see https://tus.io/protocols/resumable-upload for full details.",
|
|
"parameters": [
|
|
{
|
|
"in": "header",
|
|
"name": "Tus-Resumable",
|
|
"description": "Tus protocol version",
|
|
"example": "1.0.0",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "Upload-Length",
|
|
"description": "Total size of upload, in bytes",
|
|
"example": 0,
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "Upload-Metadata",
|
|
"description": "See https://tus.io/protocols/resumable-upload#upload-metadata",
|
|
"required": false
|
|
}
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"upload"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Upload created successfully",
|
|
"headers": {
|
|
"Location": {
|
|
"schema": {
|
|
"type": "string",
|
|
"example": "/upload/24e533e02ec3bc40c387f1a0e460e216",
|
|
"description": "URL for the newly created upload"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/upload/{id}": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"example": "24e533e02ec3bc40c387f1a0e460e216",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "Tus-Resumable",
|
|
"description": "Tus protocol version",
|
|
"example": "1.0.0",
|
|
"required": true
|
|
}
|
|
],
|
|
"head": {
|
|
"summary": "Get status of upload",
|
|
"tags": [
|
|
"File Uploading"
|
|
],
|
|
"description": "Manyfold uses the Tus protocol for resumable uploading; see https://tus.io/protocols/resumable-upload for full details.",
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"upload"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Upload status",
|
|
"headers": {
|
|
"Tus-Resumable": {
|
|
"schema": {
|
|
"type": "string",
|
|
"example": "1.0.0",
|
|
"description": "Tus protocol version"
|
|
}
|
|
},
|
|
"Upload-Length": {
|
|
"schema": {
|
|
"type": "integer",
|
|
"example": 1024,
|
|
"description": "The expected total length of the file to be uploaded"
|
|
}
|
|
},
|
|
"Upload-Offset": {
|
|
"schema": {
|
|
"type": "integer",
|
|
"example": 384,
|
|
"description": "The number of bytes of the file that have been uploaded so far"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Upload bytes at specified offset",
|
|
"tags": [
|
|
"File Uploading"
|
|
],
|
|
"description": "Manyfold uses the Tus protocol for resumable uploading; see https://tus.io/protocols/resumable-upload for full details.",
|
|
"parameters": [
|
|
{
|
|
"in": "header",
|
|
"name": "Upload-Offset",
|
|
"description": "File offset for bytes being sent. Must be the same as current Upload-Offset value reported by the HEAD request.",
|
|
"example": 384,
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "Content-Length",
|
|
"description": "The number of bytes being sent in the POST body",
|
|
"example": 128,
|
|
"required": true
|
|
}
|
|
],
|
|
"security": [
|
|
{
|
|
"client_credentials": [
|
|
"upload"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Upload successful",
|
|
"headers": {
|
|
"Upload-Offset": {
|
|
"schema": {
|
|
"type": "integer",
|
|
"description": "The new upload offset after the uploaded bytes have been added",
|
|
"example": 512
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/offset+octet-stream": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "byte"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "https://try.manyfold.app"
|
|
}
|
|
],
|
|
"components": {
|
|
"securitySchemes": {
|
|
"client_credentials": {
|
|
"type": "oauth2",
|
|
"description": "Authentication with the OAuth2 Client Credentials grant flow. You can generate client app credentials at /oauth/applications.",
|
|
"flows": {
|
|
"clientCredentials": {
|
|
"tokenUrl": "/oauth/token",
|
|
"scopes": {
|
|
"public": "read public data accessible without logging in",
|
|
"read": "read data accessible to the OAuth application's owner",
|
|
"write": "create or change data that the OAuth application's owner has appropriate permissions for",
|
|
"delete": "remove data that the OAuth application's owner has appropriate permissions for"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"schemas": {
|
|
"jsonld_context": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"oembed_link": {
|
|
"type": "object",
|
|
"properties": {
|
|
"version": {
|
|
"type": "string",
|
|
"example": "1.0"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"example": "link"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"example": "Model Title"
|
|
},
|
|
"author_name": {
|
|
"type": "string",
|
|
"example": "Creator Name"
|
|
},
|
|
"author_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/bob"
|
|
},
|
|
"provider_name": {
|
|
"type": "string",
|
|
"example": "Manyfold"
|
|
},
|
|
"provider_url": {
|
|
"type": "string",
|
|
"example": "https://example.com"
|
|
},
|
|
"cache_age": {
|
|
"type": "integer",
|
|
"example": 86400
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"type"
|
|
]
|
|
},
|
|
"oembed_photo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"version": {
|
|
"type": "string",
|
|
"example": "1.0"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"example": "photo"
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/123/model_files/456.png"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"example": "256"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"example": "256"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"example": "Model Title"
|
|
},
|
|
"author_name": {
|
|
"type": "string",
|
|
"example": "Creator Name"
|
|
},
|
|
"author_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/bob"
|
|
},
|
|
"provider_name": {
|
|
"type": "string",
|
|
"example": "Manyfold"
|
|
},
|
|
"provider_url": {
|
|
"type": "string",
|
|
"example": "https://example.com"
|
|
},
|
|
"cache_age": {
|
|
"type": "integer",
|
|
"example": 86400
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"type",
|
|
"url",
|
|
"width",
|
|
"height"
|
|
]
|
|
},
|
|
"oembed_video": {
|
|
"type": "object",
|
|
"properties": {
|
|
"version": {
|
|
"type": "string",
|
|
"example": "1.0"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"example": "video"
|
|
},
|
|
"html": {
|
|
"type": "string",
|
|
"example": "<iframe>...</iframe>"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"example": "256"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"example": "256"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"example": "Model Title"
|
|
},
|
|
"author_name": {
|
|
"type": "string",
|
|
"example": "Creator Name"
|
|
},
|
|
"author_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/bob"
|
|
},
|
|
"provider_name": {
|
|
"type": "string",
|
|
"example": "Manyfold"
|
|
},
|
|
"provider_url": {
|
|
"type": "string",
|
|
"example": "https://example.com"
|
|
},
|
|
"cache_age": {
|
|
"type": "integer",
|
|
"example": 86400
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"type",
|
|
"html",
|
|
"width",
|
|
"height"
|
|
]
|
|
},
|
|
"oembed_rich": {
|
|
"type": "object",
|
|
"properties": {
|
|
"version": {
|
|
"type": "string",
|
|
"example": "1.0"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"example": "rich"
|
|
},
|
|
"html": {
|
|
"type": "string",
|
|
"example": "<iframe>...</iframe>"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"example": "256"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"example": "256"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"example": "Model Title"
|
|
},
|
|
"author_name": {
|
|
"type": "string",
|
|
"example": "Creator Name"
|
|
},
|
|
"author_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/bob"
|
|
},
|
|
"provider_name": {
|
|
"type": "string",
|
|
"example": "Manyfold"
|
|
},
|
|
"provider_url": {
|
|
"type": "string",
|
|
"example": "https://example.com"
|
|
},
|
|
"cache_age": {
|
|
"type": "integer",
|
|
"example": 86400
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"type",
|
|
"html",
|
|
"width",
|
|
"height"
|
|
]
|
|
},
|
|
"spdxLicense": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "spdx:License"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "http://spdx.org/licenses/MIT"
|
|
},
|
|
"licenseId": {
|
|
"type": "string",
|
|
"example": "MIT"
|
|
}
|
|
},
|
|
"required": [
|
|
"@type",
|
|
"licenseId"
|
|
]
|
|
},
|
|
"link_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"example": "https://example.com"
|
|
}
|
|
},
|
|
"required": [
|
|
"url"
|
|
]
|
|
},
|
|
"collection_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Interesting Things"
|
|
},
|
|
"caption": {
|
|
"type": "string",
|
|
"example": "A short description"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Lorem ipsum dolor sit amet..."
|
|
},
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/link_request"
|
|
}
|
|
},
|
|
"creator": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Organization"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
},
|
|
"isPartOf": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Collection"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
]
|
|
},
|
|
"collection_response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Collection"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Interesting Things"
|
|
},
|
|
"caption": {
|
|
"type": "string",
|
|
"example": "A short description"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Lorem ipsum dolor sit amet..."
|
|
},
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/link_request"
|
|
}
|
|
},
|
|
"creator": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Organization"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
},
|
|
"isPartOf": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Collection"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type"
|
|
]
|
|
},
|
|
"creator_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Bruce Wayne"
|
|
},
|
|
"slug": {
|
|
"type": "string",
|
|
"example": "bruce-wayne"
|
|
},
|
|
"caption": {
|
|
"type": "string",
|
|
"example": "A short description"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Lorem ipsum dolor sit amet..."
|
|
},
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/link_request"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
]
|
|
},
|
|
"creator_response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Organization"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Bruce Wayne"
|
|
},
|
|
"slug": {
|
|
"type": "string",
|
|
"example": "bruce-wayne"
|
|
},
|
|
"caption": {
|
|
"type": "string",
|
|
"example": "A short description"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Lorem ipsum dolor sit amet..."
|
|
},
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/link_request"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type"
|
|
]
|
|
},
|
|
"group_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Patrons"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "My subscribers"
|
|
},
|
|
"add_members": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "username / email / fediverse address"
|
|
}
|
|
},
|
|
"remove_members": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "username / email / fediverse address"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"group_response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/abc123/groups/1"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Group"
|
|
},
|
|
"members": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "username"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Patrons"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "My subscribers"
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type"
|
|
]
|
|
},
|
|
"model_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Batmobile"
|
|
},
|
|
"caption": {
|
|
"type": "string",
|
|
"example": "A short description"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Lorem ipsum dolor sit amet..."
|
|
},
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/link_request"
|
|
}
|
|
},
|
|
"creator": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Organization"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
},
|
|
"isPartOf": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Collection"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
},
|
|
"spdx:license": {
|
|
"$ref": "#/components/schemas/spdxLicense"
|
|
},
|
|
"sensitive": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"keywords": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "tag"
|
|
}
|
|
},
|
|
"preview_file": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123/model_files/def456"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
]
|
|
},
|
|
"model_response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
},
|
|
"hasPart": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123/model_files/def456"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Benchy"
|
|
},
|
|
"encodingFormat": {
|
|
"type": "string",
|
|
"example": "model/stl"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"@id",
|
|
"@type",
|
|
"name",
|
|
"encodingFormat"
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Batmobile"
|
|
},
|
|
"caption": {
|
|
"type": "string",
|
|
"example": "A short description"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Lorem ipsum dolor sit amet..."
|
|
},
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/link_request"
|
|
}
|
|
},
|
|
"creator": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Organization"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
},
|
|
"isPartOf": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Collection"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
},
|
|
"spdx:license": {
|
|
"$ref": "#/components/schemas/spdxLicense"
|
|
},
|
|
"sensitive": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"keywords": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "tag"
|
|
}
|
|
},
|
|
"preview_file": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123/model_files/def456"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type",
|
|
"hasPart"
|
|
]
|
|
},
|
|
"model_file_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string",
|
|
"example": "model.stl"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Lorem ipsum dolor sit amet..."
|
|
},
|
|
"caption": {
|
|
"type": "string",
|
|
"example": "A short caption describing the file"
|
|
},
|
|
"presupported": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"up": {
|
|
"type": "string",
|
|
"enum": [
|
|
"+y",
|
|
"+z"
|
|
],
|
|
"example": "+y"
|
|
},
|
|
"related": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123/model_files/def456"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
},
|
|
"relationship": {
|
|
"type": "string",
|
|
"enum": [
|
|
"presupported_version",
|
|
"presupported_version_of"
|
|
],
|
|
"example": "presupported_version"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"model_file_response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@context": {
|
|
"$ref": "#/components/schemas/jsonld_context"
|
|
},
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123/model_files/def456"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Benchy"
|
|
},
|
|
"encodingFormat": {
|
|
"type": "string",
|
|
"example": "model/stl"
|
|
},
|
|
"contentUrl": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123/model_files/def456.stl"
|
|
},
|
|
"contentSize": {
|
|
"type": "integer",
|
|
"example": 12345
|
|
},
|
|
"isPartOf": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
}
|
|
}
|
|
},
|
|
"spdx:license": {
|
|
"$ref": "#/components/schemas/spdxLicense"
|
|
},
|
|
"creator": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Organization"
|
|
}
|
|
}
|
|
},
|
|
"filename": {
|
|
"type": "string",
|
|
"example": "model.stl"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Lorem ipsum dolor sit amet..."
|
|
},
|
|
"caption": {
|
|
"type": "string",
|
|
"example": "A short caption describing the file"
|
|
},
|
|
"presupported": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"up": {
|
|
"type": "string",
|
|
"enum": [
|
|
"+y",
|
|
"+z"
|
|
],
|
|
"example": "+y"
|
|
},
|
|
"related": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/models/abc123/model_files/def456"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "3DModel"
|
|
},
|
|
"relationship": {
|
|
"type": "string",
|
|
"enum": [
|
|
"presupported_version",
|
|
"presupported_version_of"
|
|
],
|
|
"example": "presupported_version"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"@context",
|
|
"@id",
|
|
"@type",
|
|
"isPartOf",
|
|
"encodingFormat"
|
|
]
|
|
},
|
|
"uploaded_file_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"files": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "The ID of a completed upload, obtained from the upload endpoints",
|
|
"example": "http://example.com/uploads/abc123456def"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "model.stl"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"type",
|
|
"size"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"files"
|
|
]
|
|
},
|
|
"uploaded_model_request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"example": "My New Model",
|
|
"description": "Used as model name if any files are uploaded that aren't compressed archives"
|
|
},
|
|
"files": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "The ID of a completed upload, obtained from the upload endpoints",
|
|
"example": "http://example.com/uploads/abc123456def"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "model.stl"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"type",
|
|
"size"
|
|
]
|
|
}
|
|
},
|
|
"creator": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/creators/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Organization"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
},
|
|
"isPartOf": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@id": {
|
|
"type": "string",
|
|
"example": "https://example.com/collections/abc123"
|
|
},
|
|
"@type": {
|
|
"type": "string",
|
|
"example": "Collection"
|
|
}
|
|
},
|
|
"required": [
|
|
"@id"
|
|
]
|
|
},
|
|
"spdx:license": {
|
|
"$ref": "#/components/schemas/spdxLicense"
|
|
},
|
|
"sensitive": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"keywords": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "tag"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"files"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
} |