Create collection
Creates a new collection.
Request
POST
https://api.datalens.tech/rpc/createCollection
Headers
|
Name |
Description |
|
x-dl-api-version |
Type: string API version header. Const: Example: |
Body
application/json
{
"title": "example",
"description": "example",
"parentId": "example"
}
|
Name |
Description |
|
parentId |
Type: string | null ID of the parent collection in which to create the collection. Example: |
|
title |
Type: string Title of the collection. Example: |
|
description |
Type: string Description of the collection. Example: |
Responses
200 OK
Response
Body
application/json
{
"collectionId": "example",
"title": "example",
"description": "example",
"parentId": "example",
"tenantId": "example",
"createdBy": "example",
"createdAt": "example",
"updatedBy": "example",
"updatedAt": "example",
"meta": {},
"operation": {
"id": "example",
"description": "example",
"createdBy": "example",
"createdAt": {
"seconds": "example",
"nanos": 0.5
},
"modifiedAt": {
"seconds": "example",
"nanos": 0.5
},
"metadata": {},
"done": true
}
}
|
Name |
Description |
||
|
collectionId |
Type: string Unique identifier of the collection. Example: |
||
|
createdAt |
Type: string Creation timestamp. Example: |
||
|
createdBy |
Type: string ID of the user who created the collection. Example: |
||
|
description |
Type: string | null Description of the collection. Example: |
||
|
meta |
Type: object
Metadata associated with the collection. Example
|
||
|
parentId |
Type: string | null ID of the parent collection. Example: |
||
|
tenantId |
Type: string ID of the DataLens tenant. Example: |
||
|
title |
Type: string Title of the collection. Example: |
||
|
updatedAt |
Type: string Last update timestamp. Example: |
||
|
updatedBy |
Type: string ID of the user who last updated the collection. Example: |
||
|
operation |
Type: DatalensOperation Asynchronous datalens operation. Example
|
DatalensOperation
Asynchronous datalens operation.
|
Name |
Description |
||||
|
createdAt |
Type: object
Operation creation timestamp. Example
|
||||
|
createdBy |
Type: string ID of the user who created the operation. Example: |
||||
|
description |
Type: string Description of the operation. Example: |
||||
|
done |
Type: boolean Indicates if the operation has completed. |
||||
|
id |
Type: string Unique identifier of the operation. Example: |
||||
|
metadata |
Type: objectMetadata associated with the operation. Example
|
||||
|
modifiedAt |
Type: object
Operation last modification timestamp. Example
|
Example
{
"id": "example",
"description": "example",
"createdBy": "example",
"createdAt": {
"seconds": "example",
"nanos": 0.5
},
"modifiedAt": {
"seconds": "example",
"nanos": 0.5
},
"metadata": {},
"done": true
}