Get a memory layer by ID
memory_layers.retrieve(id, **kwargs) -> MemoryLayer { metadata, spec, info }
GET/v1/workspaces/{workspaceId}/memory_layers/{id}
Get a memory layer by ID
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
memory_layer = cadenya.memory_layers.retrieve("id", workspace_id: "workspaceId")
puts(memory_layer){
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "MEMORY_LAYER_TYPE_UNSPECIFIED",
"description": "description",
"expiresAt": "2019-12-27T18:11:19.117Z",
"systemManaged": true
},
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_UNSPECIFIED",
"email": "email",
"name": "name"
}
},
"entryCount": 0,
"lastUsedAt": "2019-12-27T18:11:19.117Z"
}
}Returns Examples
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "MEMORY_LAYER_TYPE_UNSPECIFIED",
"description": "description",
"expiresAt": "2019-12-27T18:11:19.117Z",
"systemManaged": true
},
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_UNSPECIFIED",
"email": "email",
"name": "name"
}
},
"entryCount": 0,
"lastUsedAt": "2019-12-27T18:11:19.117Z"
}
}