For the complete documentation index, see llms.txt. This page is also available as Markdown.

Queries

Queries from an extraction. Learn more about queries here.

Deprecated

List Queries

get
/api/v1/query/queries

Warning: This endpoint is deprecated. Please use the List Resources endpoint instead with filter={"operator":"exact","field":"type","value":"query"}.

Authorizations
Responses
200

List of queries.

application/json
countintegerOptional

The total count of items returned.

Example: 315
total_pagesintegerOptional

The total number of pages.

Example: 7
get/api/v1/query/queries
GET /api/v1/query/queries HTTP/1.1
Host: api.secoda.co
Accept: */*
{
  "links": {
    "next": "https://api.secoda.co/resource/all/?page=2",
    "previous": "None"
  },
  "meta": {
    "page": 1,
    "previous_page": "None",
    "next_page": 2
  },
  "count": 315,
  "total_pages": 7,
  "results": [
    {
      "id": "d935a76c-2125-4c30-9389-ef42fa7e23bb",
      "created_at": "2023-08-16T23:12:53.245493Z",
      "updated_at": "2023-08-16T23:12:53.245507Z",
      "entity_type": "table",
      "native_type": "Dataset",
      "bookmarked_by": [
        "d935a76c-2125-4c30-9389-ef42fa7e23bb",
        "33733f42-8ff7-460b-9e20-50a2133d3bb0",
        "c90dedee-40ee-47ec-9c27-96dc3b2ec363"
      ],
      "icon": "icon-url.png",
      "title": "Sample Table",
      "title_full": "Sample Database.Sample Schema.Sample Table",
      "title_cased": "sampleTable",
      "description": "This is a description for a sample table.",
      "definition": "text",
      "definition_version": 1,
      "multiplayers": [
        "429693a2-a5e7-4525-b413-ece5e96bc5b3",
        "f71585fa-251c-4102-8d81-c97c57c8d435"
      ],
      "multiplayer_last_modified_by": "429693a2-a5e7-4525-b413-ece5e96bc5b3",
      "multiplayer_last_modified": "2023-08-16T23:12:53.245507Z",
      "owners": [
        "429693a2-a5e7-4525-b413-ece5e96bc5b3",
        "f71585fa-251c-4102-8d81-c97c57c8d435"
      ],
      "owners_groups": [
        "3b2c7185-fb5d-4d94-89d4-3dae08e093a9"
      ],
      "collections": [
        "e8ac09ed-e51e-4e61-8eaf-59942c98c260"
      ],
      "tags": [
        "f7466f09-33bf-4ac2-9ff2-165fb4b8bdc2",
        "a17f4ed0-0e5a-45a9-92c0-6c93c0b8242c"
      ],
      "workspace_id": "f71585fa-251c-4102-8d81-c97c57c8d435",
      "total_usage": 483,
      "published": false,
      "archived": false,
      "pii": true,
      "verified": false,
      "url": "https://example.com/sample-table",
      "parent": "df2c0597-13d9-4159-bb6d-00b3f54235dc",
      "children_count": 2,
      "integration": "ca529385-fbc9-4934-afae-e372affe795b",
      "external_updated_at": "2023-08-16T23:12:53.245507Z",
      "internal_usage": 3,
      "internal_users": [
        "04654d61-4f64-4f08-b697-3915b5137c49"
      ],
      "external_users": [
        "33733f42-8ff7-460b-9e20-50a2133d3bb0"
      ],
      "external_usage": 38,
      "databuilder_id": "b818280a-ae1a-43bf-90d3-dbccf812b025.x68605bd2",
      "search_metadata": {
        "cluster": "glue",
        "database": "awsdatacatalog",
        "schema": "secoda-glue",
        "type": "table"
      },
      "sources": [
        "8a3af948-026c-45d6-983d-3873f6156f86"
      ],
      "subscribers": [
        "33733f42-8ff7-460b-9e20-50a2133d3bb0",
        "c90dedee-40ee-47ec-9c27-96dc3b2ec363"
      ],
      "teams": [
        "8680f886-97d2-4f4e-92c8-c80b46a3017d"
      ],
      "stale": false,
      "current_user_permissions": {
        "read": true,
        "write": true,
        "execute": false
      },
      "type": "None",
      "freq": 0
    }
  ]
}

Get Query

get
/api/v1/query/queries/{query_id}

This endpoint allows you to retrieve a query by its unique identifier (query_id).

Authorizations
Path parameters
query_idstringRequired

The unique identifier of the query

Example: 871fc00d-828b-4348-9353-c635313ee459
Responses
200

Query retrieved successfully

application/json
idstringOptional

The unique identifier of the resource.

Example: d935a76c-2125-4c30-9389-ef42fa7e23bb
created_atstring · date-timeOptional

The timestamp when the resource was created in Secoda in UTC format.

Example: 2023-08-16T23:12:53.245493Z
updated_atstring · date-timeOptional

The timestamp when the resource was last updated in Secoda in UTC format.

Example: 2023-08-16T23:12:53.245507Z
entity_typestringOptional

The type of resource in Secoda.

Example: table
native_typestringOptional

The native type of the resource as it is referred to in the integration.

Example: Dataset
bookmarked_bystring[]Optional

List of member IDs that have bookmarked the resource.

Example: ["d935a76c-2125-4c30-9389-ef42fa7e23bb","33733f42-8ff7-460b-9e20-50a2133d3bb0","c90dedee-40ee-47ec-9c27-96dc3b2ec363"]
iconstringOptional

The icon associated with the resource.

Example: icon-url.png
titlestringOptional

The title of the resource.

Example: Sample Table
title_fullstringOptional

The full title of the resource, including its ancestry.

Example: Sample Database.Sample Schema.Sample Table
title_casedstringOptional

The title in a cased format.

Example: sampleTable
descriptionstringOptional

A description of the resource.

Example: This is a description for a sample table.
definitionstring · markdownOptional

The documentation of the resource, written in Mark Down format.

definition_versionintegerOptional

The version of the resource's documentation.

Example: 1
multiplayersstring[]Optional

List of members who have opened or worked with the resource recently.

Example: ["429693a2-a5e7-4525-b413-ece5e96bc5b3","f71585fa-251c-4102-8d81-c97c57c8d435"]
multiplayer_last_modified_bystringOptional

The last member who modified this resource.

Example: 429693a2-a5e7-4525-b413-ece5e96bc5b3
multiplayer_last_modifiedstring · date-timeOptional

The timestamp when the multiplayer was last modified in UTC format.

Example: 2023-08-16T23:12:53.245507Z
ownersstring[]Optional

List of owner IDs for the resource.

Example: ["429693a2-a5e7-4525-b413-ece5e96bc5b3","f71585fa-251c-4102-8d81-c97c57c8d435"]
owners_groupsstring[]Optional

List of owner group IDs for the resource.

Example: ["3b2c7185-fb5d-4d94-89d4-3dae08e093a9"]
collectionsstring[]Optional

List of IDs representing the collection(s) that the resource has been added to.

Example: ["e8ac09ed-e51e-4e61-8eaf-59942c98c260"]
tagsstring[]Optional

List of tag IDs added to the resource.

Example: ["f7466f09-33bf-4ac2-9ff2-165fb4b8bdc2","a17f4ed0-0e5a-45a9-92c0-6c93c0b8242c"]
workspace_idstringOptional

The ID of the workspace.

Example: f71585fa-251c-4102-8d81-c97c57c8d435
total_usageintegerOptional

The total usage count for the resource.

Example: 483
publishedbooleanOptional

Indicates if the resource is published and can be seen by Viewers.

Example: false
archivedbooleanOptional

Indicates if the resource is deleted.

Example: false
piibooleanOptional

Indicates if the resource contains Personally Identifiable Information (PII). Values can be -

  • True
  • False

Example: true
verifiedbooleanOptional

Indicates if the resource is verified. Values can be -

  • True
  • False

Example: false
urlstringOptional

The URL associated with the resource.

Example: https://example.com/sample-table
parentstringOptional

The parent resource's ID.

Example: df2c0597-13d9-4159-bb6d-00b3f54235dc
children_countintegerOptional

The count of children entities of the resource.

Example: 2
integrationstringOptional

The integration ID associated with the resource.

Example: ca529385-fbc9-4934-afae-e372affe795b
external_updated_atstring · date-timeOptional

The timestamp of the last update for the resource in the source.

Example: 2023-08-16T23:12:53.245507Z
internal_usageintegerOptional

The internal usage count for the resource.

Example: 3
internal_usersstring[]Optional

List of internal user IDs for the resource.

Example: ["04654d61-4f64-4f08-b697-3915b5137c49"]
external_usersstring[]Optional

List of external user IDs for the resource extracted from the integration.

Example: ["33733f42-8ff7-460b-9e20-50a2133d3bb0"]
external_usageintegerOptional

The external usage count for the resource extracted from the source source. This is what is used to calculate Popularity of a resource.

Example: 38
databuilder_idstringOptional

The databuilder ID associated with the resource. This is a generated field.

Example: b818280a-ae1a-43bf-90d3-dbccf812b025.x68605bd2
search_metadataobjectOptional

Metadata related to indexing the resource for optimizing search.

Example: {"cluster":"glue","database":"awsdatacatalog","schema":"secoda-glue","type":"table"}
sourcesstring[]Optional

List of other integrations associated with the resource. For example, if a description is pulled in from DBT for a Snowflake table, this field will reference DBT.

Example: ["8a3af948-026c-45d6-983d-3873f6156f86"]
subscribersstring[]Optional

List of User IDs who subscribe to the resource.

Example: ["33733f42-8ff7-460b-9e20-50a2133d3bb0","c90dedee-40ee-47ec-9c27-96dc3b2ec363"]
teamsstring[]Optional

List of team IDs associated with the resource.

Example: ["8680f886-97d2-4f4e-92c8-c80b46a3017d"]
stalebooleanOptional

Indicates if the resource is stale. This means this resource no longer exists in the source, as of the last extraction.

Example: false
typestringOptional

Indicates the type of query. Currently this is returned as None.

Example: None
freqintegerOptional

Represents the frequency with which the query is running. Currently this will be returned as 0.

Example: 0
get/api/v1/query/queries/{query_id}
GET /api/v1/query/queries/{query_id} HTTP/1.1
Host: api.secoda.co
Accept: */*
{
  "id": "d935a76c-2125-4c30-9389-ef42fa7e23bb",
  "created_at": "2023-08-16T23:12:53.245493Z",
  "updated_at": "2023-08-16T23:12:53.245507Z",
  "entity_type": "table",
  "native_type": "Dataset",
  "bookmarked_by": [
    "d935a76c-2125-4c30-9389-ef42fa7e23bb",
    "33733f42-8ff7-460b-9e20-50a2133d3bb0",
    "c90dedee-40ee-47ec-9c27-96dc3b2ec363"
  ],
  "icon": "icon-url.png",
  "title": "Sample Table",
  "title_full": "Sample Database.Sample Schema.Sample Table",
  "title_cased": "sampleTable",
  "description": "This is a description for a sample table.",
  "definition": "text",
  "definition_version": 1,
  "multiplayers": [
    "429693a2-a5e7-4525-b413-ece5e96bc5b3",
    "f71585fa-251c-4102-8d81-c97c57c8d435"
  ],
  "multiplayer_last_modified_by": "429693a2-a5e7-4525-b413-ece5e96bc5b3",
  "multiplayer_last_modified": "2023-08-16T23:12:53.245507Z",
  "owners": [
    "429693a2-a5e7-4525-b413-ece5e96bc5b3",
    "f71585fa-251c-4102-8d81-c97c57c8d435"
  ],
  "owners_groups": [
    "3b2c7185-fb5d-4d94-89d4-3dae08e093a9"
  ],
  "collections": [
    "e8ac09ed-e51e-4e61-8eaf-59942c98c260"
  ],
  "tags": [
    "f7466f09-33bf-4ac2-9ff2-165fb4b8bdc2",
    "a17f4ed0-0e5a-45a9-92c0-6c93c0b8242c"
  ],
  "workspace_id": "f71585fa-251c-4102-8d81-c97c57c8d435",
  "total_usage": 483,
  "published": false,
  "archived": false,
  "pii": true,
  "verified": false,
  "url": "https://example.com/sample-table",
  "parent": "df2c0597-13d9-4159-bb6d-00b3f54235dc",
  "children_count": 2,
  "integration": "ca529385-fbc9-4934-afae-e372affe795b",
  "external_updated_at": "2023-08-16T23:12:53.245507Z",
  "internal_usage": 3,
  "internal_users": [
    "04654d61-4f64-4f08-b697-3915b5137c49"
  ],
  "external_users": [
    "33733f42-8ff7-460b-9e20-50a2133d3bb0"
  ],
  "external_usage": 38,
  "databuilder_id": "b818280a-ae1a-43bf-90d3-dbccf812b025.x68605bd2",
  "search_metadata": {
    "cluster": "glue",
    "database": "awsdatacatalog",
    "schema": "secoda-glue",
    "type": "table"
  },
  "sources": [
    "8a3af948-026c-45d6-983d-3873f6156f86"
  ],
  "subscribers": [
    "33733f42-8ff7-460b-9e20-50a2133d3bb0",
    "c90dedee-40ee-47ec-9c27-96dc3b2ec363"
  ],
  "teams": [
    "8680f886-97d2-4f4e-92c8-c80b46a3017d"
  ],
  "stale": false,
  "current_user_permissions": {
    "read": true,
    "write": true,
    "execute": false
  },
  "type": "None",
  "freq": 0
}

Last updated

Was this helpful?