tags
List all device tags across your account
tags(
offset: Int
limit: Int
filter: TagFilter
): TagPage!
Arguments
tags.offset ● Int scalar common
tags.limit ● Int scalar common
tags.filter ● TagFilter input devices
Type
TagPage object devices
The Result Set for a search using tags query
Code Samples
- cURL
- JavaScript
- Python
- Go
curl -X POST https://graphql.pointonenav.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"query": "query Tags($offset: Int, $limit: Int) { tags(offset: $offset, limit: $limit) { content { key value createdAt } totalElements pageNumber totalPages } }",
"variables": {
"offset": 0,
"limit": 10
}
}'
const query = `
query Tags($offset: Int, $limit: Int) {
tags(offset: $offset, limit: $limit) {
content {
key
value
createdAt
}
totalElements
pageNumber
totalPages
}
}
`;
const variables = {
"offset": 0,
"limit": 10
};
const response = await fetch('https://graphql.pointonenav.com/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
},
body: JSON.stringify({
query: query,
variables: variables
})
});
const data = await response.json();
console.log(data);
import requests
import json
query = """
query Tags($offset: Int, $limit: Int) {
tags(offset: $offset, limit: $limit) {
content {
key
value
createdAt
}
totalElements
pageNumber
totalPages
}
}
"""
variables = {
"offset": 0,
"limit": 10
}
response = requests.post(
'https://graphql.pointonenav.com/graphql',
json={
'query': query,
'variables': variables
},
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
}
)
data = response.json()
print(json.dumps(data, indent=2))
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
type GraphQLRequest struct {
Query string `json:"query"`
Variables interface{} `json:"variables"`
}
func main() {
query := `
query Tags($offset: Int, $limit: Int) {
tags(offset: $offset, limit: $limit) {
content {
key
value
createdAt
}
totalElements
pageNumber
totalPages
}
}`
variables := map[string]interface{}{
"offset": 0,
"limit": 10,
}
reqBody := GraphQLRequest{
Query: query,
Variables: variables,
}
jsonData, _ := json.Marshal(reqBody)
req, _ := http.NewRequest("POST", "https://graphql.pointonenav.com/graphql", bytes.NewBuffer(jsonData))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_TOKEN")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}