-
Notifications
You must be signed in to change notification settings - Fork 45
Tag Api
Property | Type | Writable | Encrypted | Versioned | Description |
---|---|---|---|---|---|
id | string | no | no | no | The UUID of the tag |
label | string | yes | yes | yes | User defined label of the tag |
color | string | yes | yes | yes | The color of the tag. Any valid CSSv3 color is accepted. |
created | int | no | no | no | Unix timestamp when the tag was created |
updated | int | no | no | yes | Unix timestamp when the tag was updated |
edited | int | yes | no | yes | Unix timestamp when the user last edited the tag name or color |
revision | string | no | no | yes | UUID of the current revision |
cseType | string | yes | no | yes | Type of the used client side encryption |
cseKey | string | yes | no | yes | UUID of the key used for client side encryption |
sseType | string | no | no | yes | Type of the used server side encryption |
client | string | no | no | yes | Name of the client which created this revision |
hidden | bool | yes | no | yes | Hides the tag in list / find actions |
trashed | bool | no | no | yes | True if the tag is in the trash |
favorite | bool | yes | no | yes | True if the user has marked the tag as favorite |
Level | Description |
---|---|
model | Returns the base model |
+revisions | Adds the revisions property which contains all revisions. A revision consists of all properties marked as versioned and its own created property |
+passwords | Adds the passwords property with the base model of all passwords in this tag |
The properties "revisions" and "passwords" are also processed if necessary.
Property | Type | Description |
---|---|---|
type | string | Object type, the value is "tag" |
created | Date | Date when the tag was created |
updated | Date | Date when the tag was last updated |
edited | Date | Date when the user last edited the tag |
Action | Url | Method | Description |
---|---|---|---|
list | /api/1.0/tag/list |
GET | List all tags with the default detail level |
list | /api/1.0/tag/list |
POST | List all tags with the given detail level |
show | /api/1.0/tag/show |
POST | Show a tag |
find | /api/1.0/tag/find |
POST | Find tags matching given criteria |
create | /api/1.0/tag/create |
POST | Create a new tag |
update | /api/1.0/tag/update |
PATCH | Update an existing tag |
delete | /api/1.0/tag/delete |
DELETE | Delete a tag |
restore | /api/1.0/tag/restore |
PATCH | Restore an earlier state of a tag |
The create action creates a new tag with the given attributes.
Argument | Type | Default | Required | Description |
---|---|---|---|---|
label | string | - | yes | The label of the tag |
color | string | - | yes | The color of the tag |
cseType | string | "none" | no | The client side encryption type |
cseKey | string | "" | no | The UUID of the key used for client side encryption. Required if cseType not "none" |
edited | int | 0 | no | Unix timestamp when the user has last edited the tag |
hidden | bool | false | no | Whether or not the tag should be hidden |
favorite | bool | false | no | Whether or not the user has marked this tag as favorite |
The success status code is 201 Created
Argument | Type | Description |
---|---|---|
id | string | The UUID of the tag |
revision | string | The UUID of the revision |
- If the
edited
argument is "0", missing or in the future, the current time will be used
The update action creates a new revision of a tag with an updated set of attributes.
Argument | Type | Default | Required | Description |
---|---|---|---|---|
id | string | - | yes | The id of the tag |
label | string | - | yes | The label of the tag |
color | string | - | yes | The color of the tag |
cseType | string | "none" | no | The client side encryption type |
cseKey | string | "" | no | The UUID of the key used for client side encryption. Required if cseType not "none" |
edited | int | 0 | no | Unix timestamp when the user has last edited the tag |
hidden | bool | false | no | Whether or not the tag should be hidden |
favorite | bool | false | no | Whether or not the user has marked this tag as favorite |
The success status code is 200 Ok
Argument | Type | Description |
---|---|---|
id | string | The UUID of the tag |
revision | string | The UUID of the new revision |
- If hou hide a tag, the tag will be no longer visible in passwords which are not hidden, but the passwords will be visible in the tag
- If the
edited
argument is "0" or missing, the timestamp from the last revision will be used - If the
edited
time is in the future, the current time will be used
The delete action moves a tag to the trash or deletes it completely if it is already in the trash.
Arguments | Type | Default | Required | Description |
---|---|---|---|---|
id | string | - | yes | The id of the tag |
revision | string | - | no | Assumed current revision of the tag (Since 2019.6.0) |
The success status code is 200 Ok
Argument | Type | Description |
---|---|---|
id | string | The UUID of the tag |
revision | string | The UUID of the new revision. Only if the tag was moved to the trash |
- If a tag is moved to the trash, the relation to all passwords which are not in trash will be hidden from the password
- If a tag is deleted, all relations to passwords are deleted
- If the
revision
is set, the tag will only be deleted if that revision is the current revision. This way, a tag is not accidentally deleted instead of trashed if the client is out of sync.
The restore action can restore an earlier state of a tag.
Arguments | Type | Default | Required | Description |
---|---|---|---|---|
id | string | - | yes | The id of the tag |
revision | string | - | no | The id of the revision |
The success status code is 200 Ok
Argument | Type | Description |
---|---|---|
id | string | The UUID of the tag |
revision | string | The UUID of the new revision |
- If no revision is given and the tag is in trash, it will be removed from trash
- If no revision is given and the tag is not in trash, nothing is done
- If a revision is given and the revision is marked as in trash, it will be removed from trash
- This action will always create a new revision
- The server side encryption type may change
- Deleted tags can not be restored
The show action lists the properties of a single tag.
Argument | Type | Default | Required | Description |
---|---|---|---|---|
id | string | - | yes | The id of the tag |
details | string | "model" | no | The detail level of the returned tag object |
The success status code is 200 Ok
The return value is a tag object with the given detail level
- This is the only action that can access hidden tags
The list action lists all tags of the user except those in trash and the hidden ones.
Argument | Type | Default | Required | Description |
---|---|---|---|---|
details | string | "model" | no | The detail level of the returned tag objects |
The success status code is 200 Ok
The return value is a list of tag objects with the given detail level
- The list will not include trashed tags
- The list will not include hidden tags
The find action can be used to find all tags matching the given search criteria. Only a specific set of fields is allowed in the criteria. How the criteria array works is explained on the object search page.
Argument | Type | Default | Required | Description |
---|---|---|---|---|
criteria | array | [] | no | The search criteria |
details | string | "model" | no | The detail level of the returned tag objects |
Field | Type | Description |
---|---|---|
created | int | Unix timestamp when the tag was created |
updated | int | Unix timestamp when the tag was updated |
edited | int | Unix timestamp when the user last renamed the tag |
cseType | string | The client side encryption type |
sseType | string | The server side encryption type |
trashed | bool | Whether or not the tag is in the trash |
favorite | bool | Whether or not the user has marked the tag as favorite |
The success status code is 200 Ok
The return value is a list of tag objects that match the criteria with the given detail level
- The property
trashed
will be set tofalse
if not present - The list will not include hidden tags