This message was deleted.
# secoda-support
w
This message was deleted.
c
The same applies to the import of tags (annotating existing columns in a schema with specific tags). Find the right database/schema in secoda and annotate specific columns of tables inside this schema through an API call.
c
Hi @colossal-planet-41331, you could make a
GET
request to the
<https://api.secoda.co/table/columns/?table_schema=><schema-name>&table_database=<database-name>&tags=<tag-uuid>
To get all the columns in a certain database schema that have your desired tag. To update the tags on a specific column, you could make a
PUT
request to the following endpoint
<https://api.secoda.co/table/columns/column-id/>
with the following payload
Copy code
{
  "tags": [
    "uuid1",
    "uuid2"
  ]
}
If you are on the EU instance, you would have to use
<https://eapi.secoda.co>
instead of
<https://api.secoda.co>
Also if you would like to get the list of columns as a CSV without having to paginate through all of them, you could add this header to your
GET
request headers:
Copy code
Content-Type: text/csv
c
Oh nice, thanks @careful-application-95617! Does
column-id
on the put request refer to a column uuid (I assume so as the table isn't specified)?
c
Yes the column uuid
c
Can I pass multiple tags in
tags
on the GET request? How to separate, if so?
c
Yes, you could separate them with a comma
,
c
Yeehaw! Thanks @careful-application-95617 ❤️
🙌 1
Last question - probably an easy one - how do I obtain the
uuid
for a given tag (or all tags that are defined, so I can filter myself)
c
You could do a get request to
<https://api.secoda.co/tag/>
and it should return the list of all tags
👍 1
c
Why wouldn't I find that info on
<https://api.secoda.co/api/schema/redoc/>
when searching for
tag
though? I am feeling a little dumb right now because your answers were pretty straight forward 😂
Hi again! Since I need columns-ids to tag specific columns, I would first need to translate from a column name to it's id. Is there an API to retrieve all columns of a given table (ideally by the table's name, not it's uuid, because that will make me translate all table names to IDs first, too....).
c
Hi, yes you could get all the columns in a table by making a GET request to this endpoint:
Copy code
<https://api.secoda.co/table/columns/?table_schema=><schema-name>&table_database=<database-name>&table_title=<table-name>
This response is paginated to 50 results per page. You could also download all the tables all at once as a CSV by setting this http header
Copy code
Content-Type: text/csv
c
thanks! I tried
table_name
and it didn't work.... who would have thought it was title...
[redacted random mumbling about how I didn't see a bug in my program 😕 ] please disregard