Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- February 4, 2025 #213

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
282 changes: 204 additions & 78 deletions .mock/definition/__package__.yml

Large diffs are not rendered by default.

123 changes: 79 additions & 44 deletions .mock/definition/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ service:
method: GET
auth: true
docs: |
List assets for a given site
List of assets uploaded to a site

Required scope | `assets:read`
source:
Expand Down Expand Up @@ -55,35 +55,64 @@ service:
width: 500
height: 900
quality: 100
altText: A red chair
altText: A single candy wrapper
- id: 63e5889e7fe4eafa7384cea5
contentType: image/png
size: 2212772
siteId: 63938b302ea6b0aa6f3d8745
hostedUrl: >-
https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg
originalFileName: Gum-Wrapper.svg
displayName: 63e5889e7fe4eafa7384cea5_Gum-Wrapper.png
lastUpdated: '2023-03-01T23:42:57Z'
createdOn: '2023-02-09T23:58:22Z'
variants:
- hostedUrl: >-
https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
originalFileName: >-
Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
displayName: >-
660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
format: png
width: 500
height: 900
quality: 100
altText: A single gum wrapper
pagination:
limit: 2
offset: 0
total: 2
create:
path: /sites/{site_id}/assets
method: POST
auth: true
docs: >
Create a new asset entry.
The first step in uploading an asset to a site.



This endpoint generates a response with the following information:
`uploadUrl` and `uploadDetails`.
`uploadUrl` and `uploadDetails`.

You can use these two properties to [upload the file to Amazon s3 by
making a
POST](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html)

request to the `uploadUrl` with the `uploadDetails` object as your
header information in the request.


Required scope | `assets:write`
Use these properties in the header of a [POST request to Amazson
s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html)
to complete the upload.



To learn more about how to upload assets to Webflow, see our [assets
guide](/data/docs/working-with-assets).

Required scope | `assets:write`
source:
openapi: ../../../openapi/referenced-specs/v2.yml
path-parameters:
site_id:
type: string
docs: Unique identifier for a Site
display-name: Create Asset Metadata
display-name: Upload Asset
request:
name: AssetsCreateRequest
body:
Expand Down Expand Up @@ -146,7 +175,7 @@ service:
method: GET
auth: true
docs: |
Get an Asset
Get details about an asset

Required scope | `assets:read`
source:
Expand All @@ -170,25 +199,28 @@ service:
asset_id: 580e63fc8c9a982ac9b8b745
response:
body:
id: 55131cd036c09f7d07883dfc
id: 63e5889e7fe4eafa7384cea4
contentType: image/png
size: 1500
siteId: 62749158efef318abc8d5a0f
hostedUrl: example.com/hostedimage.png
originalFileName: image.png
displayName: example-image-123.png
lastUpdated: '2016-09-06T21:12:22Z'
createdOn: '2016-09-02T23:26:22Z'
size: 2212772
siteId: 63938b302ea6b0aa6f3d8745
hostedUrl: >-
https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg
originalFileName: Candy-Wrapper.svg
displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png
lastUpdated: '2023-03-01T23:42:57Z'
createdOn: '2023-02-09T23:58:22Z'
variants:
- hostedUrl: example.com/hostedimage.png
originalFileName: image.png
displayName: A brown dog
format: format
width: 1500
- hostedUrl: >-
https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
originalFileName: Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
displayName: >-
660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
format: png
width: 500
height: 900
quality: 1
quality: 100
error: error
altText: A red chair
altText: A single candy wrapper
delete:
path: /assets/{asset_id}
method: DELETE
Expand Down Expand Up @@ -218,7 +250,7 @@ service:
method: PATCH
auth: true
docs: |
Update an Asset
Update details of an Asset.

Required scope | `assets:write`
source:
Expand Down Expand Up @@ -256,25 +288,28 @@ service:
request: {}
response:
body:
id: 55131cd036c09f7d07883dfc
id: 63e5889e7fe4eafa7384cea4
contentType: image/png
size: 1500
siteId: 62749158efef318abc8d5a0f
hostedUrl: example.com/hostedimage.png
originalFileName: image.png
displayName: example-image-123.png
lastUpdated: '2016-09-06T21:12:22Z'
createdOn: '2016-09-02T23:26:22Z'
size: 2212772
siteId: 63938b302ea6b0aa6f3d8745
hostedUrl: >-
https://s3.amazonaws.com/webflow-prod-assets/63938b302ea6b0aa6f3d8745/63e5889e7fe4eafa7384cea4_Vectors-Wrapper.svg
originalFileName: Candy-Wrapper.svg
displayName: 63e5889e7fe4eafa7384cea4_Candy-Wrapper.png
lastUpdated: '2023-03-01T23:42:57Z'
createdOn: '2023-02-09T23:58:22Z'
variants:
- hostedUrl: example.com/hostedimage.png
originalFileName: image.png
displayName: A brown dog
format: format
width: 1500
- hostedUrl: >-
https://s3.amazonaws.com/webflow-prod-assets/6258612d1ee792848f805dcf/660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
originalFileName: Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
displayName: >-
660d83ce30f3a599ddb0bdb3_Screenshot%202024-03-20%20at%209.03.24%E2%80%AFPM-p-500.png
format: png
width: 500
height: 900
quality: 1
quality: 100
error: error
altText: A red chair
altText: A single candy wrapper
list-folders:
path: /sites/{site_id}/asset_folders
method: GET
Expand Down
45 changes: 39 additions & 6 deletions .mock/definition/collections.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ service:
slug:
type: optional<string>
docs: Part of a URL that identifier
fields:
type: optional<list<root.FieldCreate>>
docs: An array of custom fields to add to the collection
content-type: application/json
response:
docs: Request was successful
Expand All @@ -88,6 +91,7 @@ service:
- root.BadRequestError
- root.UnauthorizedError
- root.NotFoundError
- root.ConflictError
- root.TooManyRequestsError
- root.InternalServerError
examples:
Expand All @@ -97,22 +101,51 @@ service:
displayName: Blog Posts
singularName: Blog Post
slug: posts
fields:
- isRequired: true
type: PlainText
displayName: Title
helpText: The title of the blog post
- isRequired: true
type: RichText
displayName: Content
helpText: The content of the blog post
- isRequired: true
type: Reference
displayName: Author
helpText: The author of the blog post
metadata:
collectionId: 23cc2d952d4e4631ffd4345d2743db4e
response:
body:
id: 580e63fc8c9a982ac9b8b745
id: 562ac0395358780a1f5e6fbd
displayName: Blog Posts
singularName: Blog Post
slug: post
slug: posts
createdOn: '2016-10-24T19:41:48Z'
lastUpdated: '2016-10-24T19:42:38Z'
fields:
- id: 23cc2d952d4e4631ffd4345d2743db4e
- id: id
isRequired: true
isEditable: true
type: PlainText
slug: name
displayName: Name
helpText: helpText
slug: title
displayName: Title
helpText: The title of the blog post
- id: id
isRequired: true
isEditable: true
type: RichText
slug: content
displayName: Content
helpText: The content of the blog post
- id: id
isRequired: true
isEditable: true
type: Reference
slug: author
displayName: Author
helpText: The author of the blog post
get:
path: /collections/{collection_id}
method: GET
Expand Down
51 changes: 6 additions & 45 deletions .mock/definition/collections/fields.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
types:
FieldCreateType:
enum:
- Color
- DateTime
- Email
- ExtFileRef
- File
- Image
- Link
- MultiImage
- Number
- Phone
- PlainText
- RichText
- Switch
- Video
docs: Choose these appropriate field type for your collection data
inline: true
source:
openapi: ../../../openapi/referenced-specs/v2.yml
imports:
root: ../__package__.yml
service:
Expand All @@ -30,7 +9,7 @@ service:
method: POST
auth: true
docs: >
Create a custom field in a collection.
Create a custom field in a collection.


Slugs must be all lowercase letters without spaces.
Expand All @@ -40,10 +19,7 @@ service:

convert the slug to lowercase and replace spaces with "-."


Only some field types can be created through the API.

This endpoint does not currently support bulk creation.
This endpoint does not currently support bulk creation.


Required scope | `cms:write`
Expand All @@ -55,21 +31,7 @@ service:
docs: Unique identifier for a Collection
display-name: Create Collection Field
request:
name: FieldCreate
body:
properties:
isRequired:
type: optional<boolean>
docs: define whether a field is required in a collection
type:
type: FieldCreateType
docs: Choose these appropriate field type for your collection data
displayName:
type: string
docs: The name of a field
helpText:
type: optional<string>
docs: Additional text to help anyone filling out this field
body: root.FieldCreate
content-type: application/json
response:
docs: Request was successful
Expand All @@ -78,16 +40,15 @@ service:
- root.BadRequestError
- root.UnauthorizedError
- root.NotFoundError
- root.ConflictError
- root.TooManyRequestsError
- root.InternalServerError
examples:
- path-parameters:
collection_id: 580e63fc8c9a982ac9b8b745
request:
isRequired: false
type: RichText
displayName: Post Body
helpText: Add the body of your post here
type: Color
displayName: displayName
response:
body:
id: 75821f618da60c18383330bcc0ca488b
Expand Down
Loading