...
through a connected python session.
Cleaning your Tag
When developing a C3 package, you frequently need to provision and re-provision progressively changing versions of a given package.
This can result in older versions of your data lingering on your Tag even though you're no longer using it. Additionally, when you use
your tag for a different package, you may leave behind old data which is not used.
You can remove data from your tag with either of the following commands
Code Block |
---|
|
Tag.removeData() |
for JavaScript, and
Code Block |
---|
|
c3.Tag.removeData() |
for Python.
Checking Your Authorization
For some of the above commands, you may not be authorized to execute it. To check this, you can use the Authorizer Type.
For example, to check whether Tag.removeData is allowed, execute the following in JavaScript:
Code Block |
---|
|
Authorizer.isAuthorized("Tag", "removeData") |
or
Code Block |
---|
|
Authorizer.actionAuthzRoles({typeName: {typeName: 'Tag'}, action: 'removeData'}) |
and the same in Python would be:
Code Block |
---|
|
c3.Authorizer.isAuthorized("Tag", "removeData") |
or
Code Block |
---|
|
c3.Authorizer.actionAuthzRoles(spec={'typeName': {'typeName': 'Tag'}, 'action': 'removeData'}) |