API-Referenz

Tags

Funktionsunterstützung über app.capabilities prüfen, Autorisierung über app.access und Host-Berechtigungen. Die Beispiele verwenden synthetische Werte; vor dem Aufruf Pfade, IDs, Eingaben und Filter ersetzen.

Typdefinitionen

graphql
type Mutation {
  addToTags(type: DataType!, tagIds: [ID!]!, query: String!): Boolean!
  createTag(type: DataType!, name: String!): Tag!
  deleteTag(id: ID!): Boolean!
  removeFromTags(type: DataType!, tagIds: [ID!]!, query: String!): Boolean!
  updateTag(id: ID!, name: String!): Tag!
  updateTagRelations(type: DataType!, keys: [String!]!, addTagIds: [ID!]!, removeTagIds: [ID!]!): Boolean!
}

type Query {
  tagKeys(id: ID!): [String!]!
  tagRelations(type: DataType!, keys: [String!]!): [TagRelation!]!
  tags(type: DataType!): [Tag!]!
}

enum DataType {
	DEFAULT
	AUDIO
	VIDEO
	IMAGE
	SMS
	CONTACT
	NOTE
	FEED_ENTRY
	CALL
	PACKAGE
	FILE
	APP_FILE
	DOC
}

type Tag {
	id: ID!
	name: String!
	type: DataType!
	count: Int!
}

type TagRelation {
	tagId: ID!
	key: String!
}

Operationen

mutation

addToTags

Ordnet allen passenden Einträgen einen oder mehrere Tags zu.

graphql
mutation addToTags($type: DataType!, $tagIds: [ID!]!, $query: String!) {
  addToTags(type: $type, tagIds: $tagIds, query: $query)
}
mutation

createTag

Erstellt einen neuen Tag innerhalb eines Datentyps.

graphql
mutation createTag($type: DataType!, $name: String!) {
  createTag(type: $type, name: $name) { id name type count }
}
mutation

deleteTag

Löscht einen Tag und entfernt ihn von allen zugeordneten Einträgen.

graphql
mutation deleteTag($id: ID!) {
  deleteTag(id: $id)
}
mutation

removeFromTags

Entfernt einen oder mehrere Tags von allen passenden Einträgen.

graphql
mutation removeFromTags($type: DataType!, $tagIds: [ID!]!, $query: String!) {
  removeFromTags(type: $type, tagIds: $tagIds, query: $query)
}
mutation

updateTag

Benennt einen vorhandenen Tag um.

graphql
mutation updateTag($id: ID!, $name: String!) {
  updateTag(id: $id, name: $name) { id name type count }
}
mutation

updateTagRelations

Fügt einem einzelnen Eintrag in einem Aufruf Tags hinzu und/oder entfernt sie.

graphql
mutation updateTagRelations($type: DataType!, $keys: [String!]!, $addTagIds: [ID!]!, $removeTagIds: [ID!]!) {
  updateTagRelations(type: $type, keys: $keys, addTagIds: $addTagIds, removeTagIds: $removeTagIds)
}
query

tagKeys

Listet die dem angegebenen Tag zugeordneten Eintragsschlüssel auf.

graphql
query tagKeys($id: ID!) {
  tagKeys(id: $id)
}
query

tagRelations

Ermittelt Tagzuordnungen für eine Gruppe von Eintragsschlüsseln, etwa Medien- oder Notiz-IDs, innerhalb eines Datentyps.

graphql
query tagRelations($type: DataType!, $keys: [String!]!) {
  tagRelations(type: $type, keys: $keys) { tagId key }
}
query

tags

Listet alle Tags für den angegebenen Datentyp auf.

graphql
query tags($type: DataType!) {
  tags(type: $type) { id name type count }
}