Hi All
I want to get Properties from Chart with OpenApi
Is there any example or documentation for doing this?
curl -X 'GET' \
'<http://localhost:9002/openapi/v2/entity/dataset/{chart_urn}/editabledatasetproperties?systemMetadata=false>' \
-H 'accept: application/json'```
<@U0445MUD81W> how can i get the chart_urn?
i used datahub 0.10.4
and this chart is from Metabase platform
you can use this GQL to get all URNs in of type “CHART” in given platform
search(input: {type: CHART,
query: "*", start: 0, count: 10
orFilters: [
{
and: [
{
field: "platform"
values: ["tableau"]
condition: CONTAIN
}
]
}
]
}
){
start
count
total
searchResults {
entity {
urn
... on Dataset {
urn
}
}
}
}
}```
I got this message <@U0445MUD81W>
"servlet": "openapiServlet",
"message": "Not Found",
"url": "/openapi/v2/entity/dataset/urn:li:chart:(metabase,1019)/editabledatasetproperties",
"status": "404"
}```
hey it looks this this openapi is not supported in v0.10.4
it is available in later releases
https://demo.datahubproject.io/openapi/swagger-ui/index.html#/editableDatasetProperties%20Aspect/getEditableDatasetProperties
can’t you use GQL for the same …?
oh
<@U0445MUD81W> can you give me an example of GQL to get the same result as
'<http://localhost:9002/openapi/v2/entity/dataset/{chart_urn}/editabledatasetproperties?systemMetadata=false>' \
-H 'accept: application/json'```
using chart urn
chart(urn: "<urn>") {
urn
type
exists
lastIngested
tool
chartId
platform {
name
}
properties {
name
description
externalUrl
type
access
lastRefreshed
lastModified {
time
}
created {
time
}
customProperties {
key
value
}
__typename
}
editableProperties {
description
__typename
}
}
}```
using search with querying string
search(input: { count: 1,type:CHART, query: "<search_str>"}) {
searchResults {
entity {
urn
type
... on Chart {
info {
name
externalUrl
}
platform {
name
}
properties {
name
description
customProperties {
key
value
}
externalUrl
}
editableProperties {
description
}
}
}
}
}
}```
its work <@U0445MUD81W>
Thank you so much