Skip to main content
POST
/
diagram-parsing
/
libraries
/
{libraryId}
/
copy
Copy library
curl --request POST \
  --url https://{cluster}.cognitedata.com/api/v1/projects/{project}/diagram-parsing/libraries/{libraryId}/copy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "createdTime": 1730204346000,
  "externalId": "my.known.id",
  "lastUpdatedTime": 1730204346000,
  "name": "<string>",
  "scope": "Global",
  "symbols": [
    {
      "assetTypeId": {
        "space": "<string>",
        "externalId": "my.known.id"
      },
      "externalId": "my.known.id",
      "geometries": [
        {
          "createdTime": 1730204346000,
          "externalId": "my.known.id",
          "lastUpdatedTime": 1730204346000,
          "paths": [
            {
              "id": "<string>",
              "d": "<string>",
              "styleId": "<string>"
            }
          ],
          "symbolId": "my.known.id"
        }
      ],
      "lastUpdatedTime": 1730204346000,
      "libraryId": "my.known.id",
      "createdTime": 1730204346000
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Path Parameters

libraryId
string
required

External ID of a library The external ID provided by the client. Must be unique for the resource type.

Maximum string length: 255
Example:

"my.known.id"

Body

application/json

Name of the new library

name
string
required

The name of the copied library

Response

The copied library with its symbols and geometries

Library with all of its symbols and geometries joined

createdTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

externalId
string
required

The external ID of the library

Maximum string length: 255
Example:

"my.known.id"

lastUpdatedTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

name
string
required

The name of the library

scope
enum<string>
required

Global or project scope where the library is available

Available options:
Global,
Project
symbols
object[]
required

List of symbols of this library

Last modified on April 23, 2026