GET
/
api
/
projects
/
{id}
/
templates
curl --request GET \
  --url https://api.gnomy.io/api/projects/{id}/templates \
  --header 'x-api-key: <api-key>'
{
  "data": [
    {
      "id": "<string>",
      "project_id": "<string>",
      "template_id": "<string>",
      "name": "<string>",
      "size": "<string>",
      "preview_image": "<string>",
      "preview_thumbnail": "<string>",
      "descriptions": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "pagination": {
    "page": 123,
    "pageSize": 123,
    "total": 123,
    "totalPages": 123
  }
}

Retrieves a paginated list of templates for a specific project.

Authentication

This endpoint requires an API key for authentication. Include your API key in the request headers using the x-api-key header.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe ID of the project

Query Parameters

ParameterTypeRequiredDefaultDescription
pagenumberNo1The page number for pagination
pageSizenumberNo10The number of items per page

Response

Success Response (200 OK)

{
  "data": [
    {
      "id": "string",
      "project_id": "string",
      "template_id": "string",
      "name": "string",
      "size": "string",
      "preview_image": "string",
      "preview_thumbnail": "string",
      "descriptions": "string",
      "created_at": "string (ISO date)"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 10,
    "total": 100,
    "totalPages": 10
  }
}

Error Response (400 Bad Request)

{
  "error": "Project ID is required"
}

Error Response (401 Unauthorized)

{
  "error": "Unauthorized"
}

Error Response (404 Not Found)

{
  "error": "Project not found or you do not have access to this project"
}

Error Response (500 Internal Server Error)

{
  "error": "Error message"
}

Example

curl -X GET "https://api.gnomy.io/api/projects/project123/templates?page=1&pageSize=20" \
  -H "x-api-key: YOUR_API_KEY"

Authorizations

x-api-key
string
header
required

Path Parameters

id
string
required

The ID of the project

Query Parameters

page
integer
default:1

The page number for pagination

pageSize
integer
default:10

The number of items per page

Response

200
application/json

Successfully retrieved templates

The response is of type object.

GET
/
api
/
projects
/
{id}
/
templates
curl --request GET \
  --url https://api.gnomy.io/api/projects/{id}/templates \
  --header 'x-api-key: <api-key>'
{
  "data": [
    {
      "id": "<string>",
      "project_id": "<string>",
      "template_id": "<string>",
      "name": "<string>",
      "size": "<string>",
      "preview_image": "<string>",
      "preview_thumbnail": "<string>",
      "descriptions": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "pagination": {
    "page": 123,
    "pageSize": 123,
    "total": 123,
    "totalPages": 123
  }
}

Retrieves a paginated list of templates for a specific project.

Authentication

This endpoint requires an API key for authentication. Include your API key in the request headers using the x-api-key header.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe ID of the project

Query Parameters

ParameterTypeRequiredDefaultDescription
pagenumberNo1The page number for pagination
pageSizenumberNo10The number of items per page

Response

Success Response (200 OK)

{
  "data": [
    {
      "id": "string",
      "project_id": "string",
      "template_id": "string",
      "name": "string",
      "size": "string",
      "preview_image": "string",
      "preview_thumbnail": "string",
      "descriptions": "string",
      "created_at": "string (ISO date)"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 10,
    "total": 100,
    "totalPages": 10
  }
}

Error Response (400 Bad Request)

{
  "error": "Project ID is required"
}

Error Response (401 Unauthorized)

{
  "error": "Unauthorized"
}

Error Response (404 Not Found)

{
  "error": "Project not found or you do not have access to this project"
}

Error Response (500 Internal Server Error)

{
  "error": "Error message"
}

Example

curl -X GET "https://api.gnomy.io/api/projects/project123/templates?page=1&pageSize=20" \
  -H "x-api-key: YOUR_API_KEY"

Authorizations

x-api-key
string
header
required

Path Parameters

id
string
required

The ID of the project

Query Parameters

page
integer
default:1

The page number for pagination

pageSize
integer
default:10

The number of items per page

Response

200
application/json

Successfully retrieved templates

The response is of type object.