# Get screen view versions

- Operation ID: `listOfScreenViewVersions`
- HTTP method: `GET`
- Path: `/schema-service/screenViews/versions/{screenViewId}`
- [Human-readable API reference](https://hub.synerise.com/api-reference/asset-management#operation/listOfScreenViewVersions)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.5
paths:
  /schema-service/screenViews/versions/{screenViewId}:
    get:
      deprecated: true
      tags:
        - Screen views (legacy)
      summary: Get screen view versions
      description: |
        Retrieve all versions of a screen view campaign.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`

        **User role permission required:** `assets_docs: read`
      operationId: listOfScreenViewVersions
      security:
        - JWT: []
        - BasicAuth: []
      parameters:
        - name: screenViewId
          in: path
          required: true
          description: UUID of the screen view
          schema:
            type: string
            format: uuid
        - in: query
          name: limit
          description: The maximum number of items to retrieve for pagination
          required: true
          schema:
            type: string
        - in: query
          name: page
          description: The number of the page to retrieve
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  draft:
                    type: object
                    description: Data of the screen view
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: UUID of the screen view
                      version:
                        type: string
                        description: Version of the screen view
                      status:
                        type: string
                        enum:
                          - DRAFT
                          - ACTIVE
                          - SCHEDULED
                          - PAUSED
                          - FINISHED
                        description: |
                          Status of the screen view

                          - DRAFT: a screen view that is a work in progress, not complete for activation
                          - ACTIVE: a screen view that can be displayed to customers
                          - SCHEDULED: a screen view scheduled to activate later
                          - PAUSED: a screen view that is temporarily stopped and cannot be displayed
                          - FINISHED: a screen view that is stopped and cannot be displayed
                      hash:
                        type: string
                        description: Hash ID of the version. Consists of the UUID of the screen view and and the version ID.
                        example: bb6639b2-a98e-49d9-804f-ed6c0e2a0d2f:2019-12-05T08:22:10.094
                      parentVersion:
                        type: string
                        description: If the current was created from another version, this is is the UUID of the parent version.
                      authorId:
                        type: string
                        description: ID of the user who created the screen view
                      businessProfileId:
                        type: integer
                        description: ID of the workspace where this screen view is saved
                      priority:
                        type: integer
                        description: Priority determines which screen view to show to a customer if their profile matches the conditions of more than one screen view. `1` is the highest priority.
                        default: 99
                      name:
                        type: string
                        description: Name of the screen view
                      description:
                        type: string
                        description: Description of the screen view
                      isActive:
                        type: boolean
                        description: Defines if the screen view is active.
                      createdAt:
                        type: string
                        description: Creation date
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                        description: Last update time
                      deletedAt:
                        type: string
                        format: date-time
                        description: Deletion time, if applicable
                        nullable: true
                  currentlyPublished:
                    type: object
                    description: Data of the screen view
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: UUID of the screen view
                      version:
                        type: string
                        description: Version of the screen view
                      status:
                        type: string
                        enum:
                          - DRAFT
                          - ACTIVE
                          - SCHEDULED
                          - PAUSED
                          - FINISHED
                        description: |
                          Status of the screen view

                          - DRAFT: a screen view that is a work in progress, not complete for activation
                          - ACTIVE: a screen view that can be displayed to customers
                          - SCHEDULED: a screen view scheduled to activate later
                          - PAUSED: a screen view that is temporarily stopped and cannot be displayed
                          - FINISHED: a screen view that is stopped and cannot be displayed
                      hash:
                        type: string
                        description: Hash ID of the version. Consists of the UUID of the screen view and and the version ID.
                        example: bb6639b2-a98e-49d9-804f-ed6c0e2a0d2f:2019-12-05T08:22:10.094
                      parentVersion:
                        type: string
                        description: If the current was created from another version, this is is the UUID of the parent version.
                      authorId:
                        type: string
                        description: ID of the user who created the screen view
                      businessProfileId:
                        type: integer
                        description: ID of the workspace where this screen view is saved
                      priority:
                        type: integer
                        description: Priority determines which screen view to show to a customer if their profile matches the conditions of more than one screen view. `1` is the highest priority.
                        default: 99
                      name:
                        type: string
                        description: Name of the screen view
                      description:
                        type: string
                        description: Description of the screen view
                      isActive:
                        type: boolean
                        description: Defines if the screen view is active.
                      createdAt:
                        type: string
                        description: Creation date
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                        description: Last update time
                      deletedAt:
                        type: string
                        format: date-time
                        description: Deletion time, if applicable
                        nullable: true
                  previouslyPublished:
                    type: object
                    description: Paginated list of previously published screen views
                    required:
                      - data
                      - pagination
                    properties:
                      data:
                        type: array
                        description: A page of screen views
                        items:
                          type: object
                          description: Data of the screen view
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: UUID of the screen view
                            version:
                              type: string
                              description: Version of the screen view
                            status:
                              type: string
                              enum:
                                - DRAFT
                                - ACTIVE
                                - SCHEDULED
                                - PAUSED
                                - FINISHED
                              description: |
                                Status of the screen view

                                - DRAFT: a screen view that is a work in progress, not complete for activation
                                - ACTIVE: a screen view that can be displayed to customers
                                - SCHEDULED: a screen view scheduled to activate later
                                - PAUSED: a screen view that is temporarily stopped and cannot be displayed
                                - FINISHED: a screen view that is stopped and cannot be displayed
                            hash:
                              type: string
                              description: Hash ID of the version. Consists of the UUID of the screen view and and the version ID.
                              example: bb6639b2-a98e-49d9-804f-ed6c0e2a0d2f:2019-12-05T08:22:10.094
                            parentVersion:
                              type: string
                              description: If the current was created from another version, this is is the UUID of the parent version.
                            authorId:
                              type: string
                              description: ID of the user who created the screen view
                            businessProfileId:
                              type: integer
                              description: ID of the workspace where this screen view is saved
                            priority:
                              type: integer
                              description: Priority determines which screen view to show to a customer if their profile matches the conditions of more than one screen view. `1` is the highest priority.
                              default: 99
                            name:
                              type: string
                              description: Name of the screen view
                            description:
                              type: string
                              description: Description of the screen view
                            isActive:
                              type: boolean
                              description: Defines if the screen view is active.
                            createdAt:
                              type: string
                              description: Creation date
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                              description: Last update time
                            deletedAt:
                              type: string
                              format: date-time
                              description: Deletion time, if applicable
                              nullable: true
                      pagination:
                        type: object
                        description: Pagination metadata
                        required:
                          - limit
                          - page
                          - pages
                          - total
                        properties:
                          limit:
                            type: integer
                            description: The number of items per page
                          page:
                            type: integer
                            description: The current page
                          pages:
                            type: integer
                            description: The total number of pages
                          total:
                            type: integer
                            description: The total number of items on all pages
        "400":
          description: See error message for details
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  errorCode:
                    type: string
                    description: |
                      Code of the error, needed for troubleshooting

                      See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
                  status:
                    type: integer
                    description: Error's HTTP status code
                  message:
                    type: string
                    description: Description of the problem
        "401":
          description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: string
                    description: Time when the error occurred
                  error:
                    type: string
                    description: Summary of the error
                  message:
                    type: string
                    description: Description of the problem
                  status:
                    type: integer
                    format: int32
                    description: HTTP status code
        "403":
          description: Forbidden; insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: string
                    description: Time when the error occurred
                  error:
                    type: string
                    description: Summary of the error
                  message:
                    type: string
                    description: Description of the problem
                  status:
                    type: integer
                    format: int32
                    description: HTTP status code
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  errorCode:
                    type: string
                    description: |
                      Code of the error, needed for troubleshooting

                      See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
                  status:
                    type: integer
                    description: Error's HTTP status code
                  message:
                    type: string
                    description: Description of the problem
        "500":
          description: See error message for details
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  errorCode:
                    type: string
                    description: |
                      Code of the error, needed for troubleshooting

                      See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
                  status:
                    type: integer
                    description: Error's HTTP status code
                  message:
                    type: string
                    description: Description of the problem
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewVersions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE' \
              --header 'Authorization: Basic REPLACE_BASIC_AUTH'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Basic REPLACE_BASIC_AUTH" }

            conn.request("GET", "/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Authorization", "Basic REPLACE_BASIC_AUTH");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE",
              "headers": {
                "Authorization": "Basic REPLACE_BASIC_AUTH"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_STRING_VALUE',
              'page' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Basic REPLACE_BASIC_AUTH'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE")
              .header("Authorization", "Basic REPLACE_BASIC_AUTH")
              .asString();
servers:
  - url: https://api.synerise.com
    description: Microsoft Azure EU
  - url: https://api.azu.synerise.com
    description: Microsoft Azure USA
  - url: https://api.geb.synerise.com
    description: Google Cloud Platform
tags:
  - name: Screen views (legacy)
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |
        Synerise uses [JSON Web Token (JWT)](https://jwt.io/) as the authorization method.

        The token is generated by the *auth/login* endpoints.

        You need to include it in the `Authorization` header of your requests, with a `Bearer` prefix.


        By default, the token is valid for **one week** (see [workspace settings](https://hub.synerise.com/docs/settings/tool/iam-for-apps/general/#jwt-lifetime)).  
        You can request a refreshed key for the session by using the *auth/refresh* endpoint **before** the current token expires.


        You can verify your JWT signature by using the [public key](https://api.synerise.com/v4/public.pem).


        See Developer Guides on JWT API authentication for:
        - [profiles](https://hub.synerise.com/developers/api/api-authorization/client-login/);
        - [workspaces](https://hub.synerise.com/developers/api/api-authorization/workspace-login/#api-authentication-with-jwt);
        - [users](https://hub.synerise.com/developers/api/api-authorization/user-login/).
    BasicAuth:
      type: http
      scheme: basic
      description: |
        Basic authentication with login (workspace GUID) and password (workspace API key) encoded with Base64 and sent in the `Authorization` header. **Must be enabled in the settings of the API key**.

        <span style="color:red">This is less secure than JWTs.</span> Limit the API key permissions to only those that you need. Consider API key rotation and other security measures.

        You can still use JWTs from the same API key when basic authentication is enabled.

        For details, see ["Workspace authentication"](https://hub.synerise.com/jwt-or-basic/#basic-api-authentication-with-api-keys).
```
