Updated on 2022-02-22 GMT+08:00

Obtaining a Template List

Function

Obtain a template list.

URI

  • URI format
    GET /v1/{project_id}/screens/templates
  • Parameter description
    Table 1 URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Request

Table 2 describes the request parameters.
Table 2 Request parameters

Parameter

Mandatory

Type

Description

workspaceId

Yes

String

Workspace ID, which consists of 32 characters. For details about how to obtain the workspace ID, see Obtaining a Workspace ID.

Response

Table 3 describes the response parameters.
Table 3 Response parameters

Parameter

Type

Description

id

String

ID of the template.

name

String

Name of the template.

description

String

Description of the template.

thumbnail

String

Address for storing template thumbnails.

priority

Integer

Template priority, that is, the template position on the console. The first digit from left to right is 0.

size

String

Size of the template screen.

createDate

Long

Time when the template was created.

updateDate

Long

Time when the template was updated.

status

Integer

Status of the screen: 0-created, 1-deleted, 2-shared

locale

String

Language identifier.

permission

Boolean

Indicates whether the user has the permission to access the template. true: The user has permission. false: The user has no permission.

Examples

  • Request example
    GET https://{dlv_endpoint}/v1/{project_id}/screens/templates
    Request header
    
    {
        "workspaceId": "86ce107974ce4f93b618acb232863027"
    }

  • Example of a successful response
    [
        {
            "id": "32546212564",
            "name": "blank_template",
    "description": "create a screen of your own on the blank canvas." ,
            "thumbnail": "",
            "priority": 0,
    "Size": "user-defined",
            "createDate": 1533176653819,
            "updateDate": 1533176653819,
            "status": 0,
            "locale": en-us,
            "permission": true
        }
    ]

  • Example of a failed response
    {
        "errors": [
            {
                "error_code": "1004",
                "error_msg": "The operation with the resource entity occur some error."
            }
        ]
    }

Status Codes

For details about status codes, see Status Codes.