DE EN EN (Google)

Retrieve tags

GET /api/v1/tags?token=<token>

Retrieves all tags and tag groups. Tags have an order inside tag groups.

Query String

token Session token acquired with /api/v1/session

Returns

Array of tag groups.

Examples

[
    {
        "_basetype": "taggroup",
        "taggroup": {
            "_id": 25,
            "type": "choice",
            "displayname": {
                "de-DE": "Bearbeitungszustand",
                "en-US": "Processing state"
            }
        },
        "_tags": [
            {
                "_basetype": "tag",
                "tag": {
                    "_id": 15,
                    "type": "individual",
                    "displayname": {
                        "de-DE": "neu",
                        "en-US": "new"
                    },
                    "description": {
                        "de-DE": "Datensatz wurde neu erstellt",
                        "en-US": "Record created"
                    },
                    "displaytype": "edit",
                    "sticky": false,
                    "is_default": true
                },
                "_acl": [
                    {
                        "who": {
                            "_basetype": "group",
                            "user": {
                                "displayname": {
                                    "de-DE": "Studenten",
                                    "en-US": "students"
                                },
                                "_id": 22
                            }
                        },
                        "rights": {
                            "read": {}
                        }
                    },
                    {
                        "who": {
                            "_basetype": "group",
                            "user": {
                                "displayname": {
                                    "de-DE": "Qualitätssicherung",
                                    "en-US": "Quality Assurance"
                                },
                                "_id": 11
                            }
                        },
                        "rights": {
                            "write": {}
                        }
                    }
                ]
            },
            {
                "_basetype": "tag",
                "tag": {
                    "_id": 16,
                    "type": "individual",
                    "displayname": {
                        "de-DE": "veröffentlicht",
                        "en-US": "published"
                    },
                    "description": {
                        "de-DE": "Datensatz ist öffentlich zugänglich",
                        "en-US": "Record is published"
                    },
                    "sticky": true,
                    "is_default": false
                },
                "_acl": [
                    {
                        "who": {
                            "_basetype": "group",
                            "user": {
                                "displayname": {
                                    "de-DE": "Internet-User",
                                    "en-US": "internet user"
                                },
                                "_id": 24
                            }
                        },
                        "rights": {
                            "read": {}
                        }
                    }
                ]
            }
        ]
    }
]

Permissions

The session must be authenticated.

HTTP status codes

200 Success
400 Not Authenticated: session is not authenticated

Update tags

POST /api/v1/tags?token=<token>

Updates all tags and tag groups. The list should be always complete. That means, if a tag or tag group is not provided, it will be deleted. Tags or tag groups with _id will be updated; otherwise, they will be created.

Input

Array of tag groups.

Query String

token Session token acquired with /api/v1/session
collection_rights_policy What to do if the operation causes the owner of a collection to lose grantable rights over collection objects (see rightsmanagement)

Returns

Array of tag groups.

Permissions

The user requires the system.tagmanager right.

HTTP status codes

200 Success
202 Confirmation Response (collection owner rights revoked: the operation requires confirmation with a collection_rights_policy
400 API error: something is malformed
400 Not Authenticated: session is not authenticated
400 No System Right: no system right for “_all_fields”
500 Server error: internal server error