Riferimento API

Tag

Verificare app.capabilities per il supporto delle funzionalità e app.access insieme alle autorizzazioni host per l’autorizzazione. Gli esempi usano valori sintetici; sostituire percorsi, ID, input e filtri prima della chiamata.

Definizioni di tipo

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!
}

Operazioni

mutation

addToTags

Aggiungere tutti gli elementi corrispondenti a una query a uno o più tag.

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

createTag

Creare un nuovo tag per un tipo di dati.

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

deleteTag

Eliminare un tag e rimuoverlo da tutti gli elementi contrassegnati.

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

removeFromTags

Rimuovere da uno o più tag tutti gli elementi corrispondenti a una query.

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

updateTag

Rinominare un tag esistente.

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

updateTagRelations

Aggiungere e/o rimuovere tag da un singolo elemento in una chiamata.

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

tagKeys

Elencare le chiavi degli elementi associati al tag specificato.

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

tagRelations

Cercare le assegnazioni dei tag per un insieme di chiavi di elementi (ad es. ID multimediali o di note) in un tipo di dati.

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

tags

Elencare tutti i tag del tipo di dati indicato.

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