Skip to content

Pages

pages


GET /api/v1/pages/{slug}

Get Page

Description

Get a Page by its slug.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
refreshed-token header No
slug path string No
token cookie string No

Responses

{
    "slug": "string",
    "published": true,
    "application": {
        "id": "string",
        "name": "string",
        "is_private": true,
        "go_live_missing": [
            {
                "field": "string",
                "label": "string"
            }
        ]
    },
    "url": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "slug": {
            "type": "string",
            "title": "Slug"
        },
        "published": {
            "type": "boolean",
            "title": "Published"
        },
        "application": {
            "$ref": "#/components/schemas/PageApplicationInfo"
        },
        "url": {
            "type": "string",
            "title": "Url",
            "description": "The public URL where this page is served.",
            "readOnly": true
        }
    },
    "type": "object",
    "required": [
        "slug",
        "published",
        "application",
        "url"
    ],
    "title": "PageResponse",
    "description": "Response body for Page details."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /api/v1/pages/{slug}

Delete Page

Description

Delete a Page and its assets.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
refreshed-token header No
slug path string No
token cookie string No

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/pages

Create Page

Description

Create a new Page for an Application.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
refreshed-token header No
token cookie string No

Request body

{
    "application_id": "string",
    "slug": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "application_id": {
            "type": "string",
            "title": "Application Id"
        },
        "slug": {
            "type": "string",
            "title": "Slug"
        }
    },
    "type": "object",
    "required": [
        "application_id",
        "slug"
    ],
    "title": "Body_create_page_api_v1_pages_post"
}

Responses

{
    "slug": "string",
    "published": true,
    "application": {
        "id": "string",
        "name": "string",
        "is_private": true,
        "go_live_missing": [
            {
                "field": "string",
                "label": "string"
            }
        ]
    },
    "url": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "slug": {
            "type": "string",
            "title": "Slug"
        },
        "published": {
            "type": "boolean",
            "title": "Published"
        },
        "application": {
            "$ref": "#/components/schemas/PageApplicationInfo"
        },
        "url": {
            "type": "string",
            "title": "Url",
            "description": "The public URL where this page is served.",
            "readOnly": true
        }
    },
    "type": "object",
    "required": [
        "slug",
        "published",
        "application",
        "url"
    ],
    "title": "PageResponse",
    "description": "Response body for Page details."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PUT /api/v1/pages/{slug}/deploy

Deploy Page

Description

Deploy files to a Page. This replaces all existing files.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
refreshed-token header No
slug path string No
token cookie string No

Request body

{
    "files": [
        "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ="
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "files": {
            "items": {
                "type": "string",
                "format": "binary"
            },
            "type": "array",
            "title": "Files"
        }
    },
    "type": "object",
    "required": [
        "files"
    ],
    "title": "Body_deploy_page_api_v1_pages__slug__deploy_put"
}

Responses

{
    "slug": "string",
    "published": true,
    "application": {
        "id": "string",
        "name": "string",
        "is_private": true,
        "go_live_missing": [
            {
                "field": "string",
                "label": "string"
            }
        ]
    },
    "url": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "slug": {
            "type": "string",
            "title": "Slug"
        },
        "published": {
            "type": "boolean",
            "title": "Published"
        },
        "application": {
            "$ref": "#/components/schemas/PageApplicationInfo"
        },
        "url": {
            "type": "string",
            "title": "Url",
            "description": "The public URL where this page is served.",
            "readOnly": true
        }
    },
    "type": "object",
    "required": [
        "slug",
        "published",
        "application",
        "url"
    ],
    "title": "PageResponse",
    "description": "Response body for Page details."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

Body_create_page_api_v1_pages_post

Name Type Description
application_id string
slug string

Body_deploy_page_api_v1_pages__slug__deploy_put

Name Type Description
files Array<string(binary)>

GoLiveItem

Name Type Description
field string
label string

HTTPValidationError

Name Type Description
detail Array<ValidationError>

PageApplicationInfo

Name Type Description
go_live_missing Array<GoLiveItem> **Beta.** This field is in beta and is subject to breaking changes. If you plan to use it in production, email [info@sweatstack.no](mailto:info@sweatstack.no) before you integrate, so we can tell you about changes in advance and help you migrate. What is missing before anyone but the owner can connect to everything the app requests by default: the empty profile fields (`description`, `url`, `image`, `privacy_statement`), then a purpose for each category among `default_scopes` (`purpose.`), then the developer terms and the DPA until the owner has accepted them on the Consent screen tab (`developer_terms`). Empty means done. `field` names the setting, `label` is a short phrase to show a person.
id string
is_private boolean
name string

PageResponse

Name Type Description
application PageApplicationInfo
published boolean
slug string
url string The public URL where this page is served.

ValidationError

Name Type Description
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
HTTPBearer http bearer
HTTPBasic http basic