Tags API
Retrieve a list of tags
Retrieve a list of tags for the authenticated workspace.
GET
/
tags
JavaScript
import Codeqr from '@codeqr/ts';
const client = new Codeqr({
apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted
});
const tags = await client.tags.list();
console.log(tags);curl --request GET \
--url https://api.codeqr.io/tags \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.codeqr.io/tags"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.codeqr.io/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.codeqr.io/tags"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.codeqr.io/tags")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.codeqr.io/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"name": "<string>"
}
]{
"error": {
"code": "bad_request",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#bad-request"
}
}{
"error": {
"code": "unauthorized",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#unauthorized"
}
}{
"error": {
"code": "forbidden",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#forbidden"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#not-found"
}
}{
"error": {
"code": "conflict",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#conflict"
}
}{
"error": {
"code": "invite_expired",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#invite-expired"
}
}{
"error": {
"code": "unprocessable_entity",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#unprocessable-entity"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#rate-limit_exceeded"
}
}{
"error": {
"code": "internal_server_error",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#internal-server_error"
}
}Authorizations
Default authentication mechanism
Query Parameters
The field to sort the tags by.
Available options:
name, createdAt The order to sort the tags by.
Available options:
asc, desc The search term to filter the tags by.
IDs of tags to filter by.
The page number for pagination.
Required range:
x > 0Example:
1
The number of items per page.
Required range:
0 < x <= 100Example:
50
⌘I
JavaScript
import Codeqr from '@codeqr/ts';
const client = new Codeqr({
apiKey: process.env['CODEQR_API_KEY'], // This is the default and can be omitted
});
const tags = await client.tags.list();
console.log(tags);curl --request GET \
--url https://api.codeqr.io/tags \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.codeqr.io/tags"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.codeqr.io/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.codeqr.io/tags"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.codeqr.io/tags")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.codeqr.io/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"name": "<string>"
}
]{
"error": {
"code": "bad_request",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#bad-request"
}
}{
"error": {
"code": "unauthorized",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#unauthorized"
}
}{
"error": {
"code": "forbidden",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#forbidden"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#not-found"
}
}{
"error": {
"code": "conflict",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#conflict"
}
}{
"error": {
"code": "invite_expired",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#invite-expired"
}
}{
"error": {
"code": "unprocessable_entity",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#unprocessable-entity"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#rate-limit_exceeded"
}
}{
"error": {
"code": "internal_server_error",
"message": "The requested resource was not found.",
"doc_url": "https://docs.codeqr.io/api-reference/errors#internal-server_error"
}
}
