For AI agents: this page in Markdown: https://www.pubnub.com/docs/admin-api/update-entity-class-with-complete-resource-replacement.md. Documentation index: https://www.pubnub.com/llms-full.txt.
Update entity class with complete resource replacement
PUT/v2/datasync/subkeys/:subKey/entity-classes/:entityClass/versions/:entityClassVersion
Update entity class with complete resource replacement
Request
Example
{
"data": {
"name": "user-profile",
"description": "Entity class for storing user profile information including basic details and preferences",
"version": 1,
"config": {
"ttlSec": 2678400
},
"properties": [
{
"name": "username",
"path": "/payload/username",
"valueKind": "string",
"filtering": "full"
},
{
"name": "email",
"path": "/payload/email",
"valueKind": "string",
"filtering": "simple",
"isNullable": true
},
{
"name": "dateOfBirth",
"path": "/payload/dateOfBirth",
"valueKind": "date",
"filtering": "simple"
},
{
"name": "isActive",
"path": "/payload/isActive",
"valueKind": "boolean",
"filtering": "simple"
},
{
"name": "score",
"path": "/payload/score",
"valueKind": "number",
"filtering": "simple"
}
]
},
"meta": {
"next_cursor": "eyJpIjoiMjAiLCJzdiI6WyJBZGEiXSwiYiI6ZmFsc2UsInMiOiJuYW1lOmFzYyIsImUiOiJkYiJ9",
"has_next": true,
"prev_cursor": "eyJpIjoiMjAiLCJzdiI6WyJBZGEiXSwiYiI6dHJ1ZSwicyI6Im5hbWU6YXNjIiwiZSI6ImRiIn0",
"has_prev": false,
"limit": 20
}
}Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}Example
"Accept header value is not acceptable. Supported values are [application/json]"Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}Example
{
"errors": [
{
"errorCode": "DS-0100",
"message": "Entity not found: user-42",
"path": "/payload/score",
"location": {
"offset": 6,
"length": 5
}
}
]
}