Back to Content Management API

siteSettingsRevision

Returns a site settings' revision.

Arguments

  • Name
    id
    Type
    ID!
    Description

    The ID of the section.

  • Name
    revisionId
    Type
    ID!
    Description

    The ID of the revision.

Returns

Request

import { PackClient } from '@pack/client'
const packClient = new PackClient({
  token: 'YOUR-PACK-TOKEN'
});

const query = `
query SiteSettingsRevision($id: ID!, $revisionId: ID!) {
  siteSettingsRevision(id: $id, revisionId: $revisionId) {
    id
    seo
  }
}
`
const variables = {
  id: 'site-settings-id',
  revisionId: 'revision-id'
}
const response = await packClient.fetch(query, { variables: variables });
console.log(response.data);

Response

{
    "data": {
        "siteSettingsRevision": {
            "id": "site-settings-id",
            "seo": {
                "title": "SEO Title",
                "description": "SEO Description",
                "keywords": "SEO Keywords",
                "image": {
                    "url": "https://example.com/image.jpg",
                    "alt": "Image Alt Text"
                }
            }
        }
    }
}

Was this page helpful?