Skip to content

Latest commit

 

History

History
194 lines (146 loc) · 11.4 KB

AttributesApi.md

File metadata and controls

194 lines (146 loc) · 11.4 KB

gooddata_api_client.AttributesApi

All URIs are relative to http://localhost

Method HTTP request Description
get_all_entities_attributes GET /api/v1/entities/workspaces/{workspaceId}/attributes Get all Attributes
get_entity_attributes GET /api/v1/entities/workspaces/{workspaceId}/attributes/{objectId} Get an Attribute

get_all_entities_attributes

JsonApiAttributeOutList get_all_entities_attributes(workspace_id)

Get all Attributes

Example

import time
import gooddata_api_client
from gooddata_api_client.api import attributes_api
from gooddata_api_client.model.json_api_attribute_out_list import JsonApiAttributeOutList
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = gooddata_api_client.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with gooddata_api_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = attributes_api.AttributesApi(api_client)
    workspace_id = "workspaceId_example" # str | 
    origin = "ALL" # str |  (optional) if omitted the server will use the default value of "ALL"
    filter = "filter=title==someString;description==someString;dataset.id==321;defaultView.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional)
    include = [
        "include=dataset,defaultView,labels,attributeHierarchies",
    ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL).  __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional)
    page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0
    size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20
    sort = [
        "sort_example",
    ] # [str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)
    x_gdc_validate_relations = False # bool |  (optional) if omitted the server will use the default value of False
    meta_include = [
        "metaInclude=origin,page,all",
    ] # [str] | Include Meta objects. (optional)

    # example passing only required values which don't have defaults set
    try:
        # Get all Attributes
        api_response = api_instance.get_all_entities_attributes(workspace_id)
        pprint(api_response)
    except gooddata_api_client.ApiException as e:
        print("Exception when calling AttributesApi->get_all_entities_attributes: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Get all Attributes
        api_response = api_instance.get_all_entities_attributes(workspace_id, origin=origin, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include)
        pprint(api_response)
    except gooddata_api_client.ApiException as e:
        print("Exception when calling AttributesApi->get_all_entities_attributes: %s\n" % e)

Parameters

Name Type Description Notes
workspace_id str
origin str [optional] if omitted the server will use the default value of "ALL"
filter str Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). [optional]
include [str] Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter "ALL" is present, all possible includes are used (include=ALL). WARNING: Individual include types (collection, relationship or ALL) cannot be combined together. [optional]
page int Zero-based page index (0..N) [optional] if omitted the server will use the default value of 0
size int The size of the page to be returned [optional] if omitted the server will use the default value of 20
sort [str] Sorting criteria in the format: property,(asc desc). Default sort order is ascending. Multiple sort criteria are supported.
x_gdc_validate_relations bool [optional] if omitted the server will use the default value of False
meta_include [str] Include Meta objects. [optional]

Return type

JsonApiAttributeOutList

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.gooddata.api+json

HTTP response details

Status code Description Response headers
200 Request successfully processed -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_entity_attributes

JsonApiAttributeOutDocument get_entity_attributes(workspace_id, object_id)

Get an Attribute

Example

import time
import gooddata_api_client
from gooddata_api_client.api import attributes_api
from gooddata_api_client.model.json_api_attribute_out_document import JsonApiAttributeOutDocument
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = gooddata_api_client.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with gooddata_api_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = attributes_api.AttributesApi(api_client)
    workspace_id = "workspaceId_example" # str | 
    object_id = "objectId_example" # str | 
    filter = "filter=title==someString;description==someString;dataset.id==321;defaultView.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). (optional)
    include = [
        "include=dataset,defaultView,labels,attributeHierarchies",
    ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL).  __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional)
    x_gdc_validate_relations = False # bool |  (optional) if omitted the server will use the default value of False
    meta_include = [
        "metaInclude=origin,all",
    ] # [str] | Include Meta objects. (optional)

    # example passing only required values which don't have defaults set
    try:
        # Get an Attribute
        api_response = api_instance.get_entity_attributes(workspace_id, object_id)
        pprint(api_response)
    except gooddata_api_client.ApiException as e:
        print("Exception when calling AttributesApi->get_entity_attributes: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Get an Attribute
        api_response = api_instance.get_entity_attributes(workspace_id, object_id, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations, meta_include=meta_include)
        pprint(api_response)
    except gooddata_api_client.ApiException as e:
        print("Exception when calling AttributesApi->get_entity_attributes: %s\n" % e)

Parameters

Name Type Description Notes
workspace_id str
object_id str
filter str Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser. You can specify any object parameter and parameter of related entity (for example title=='Some Title';description=='desc'). Additionally, if the entity relationship represents a polymorphic entity type, it can be casted to its subtypes (for example relatedEntity::subtype.subtypeProperty=='Value 123'). [optional]
include [str] Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter "ALL" is present, all possible includes are used (include=ALL). WARNING: Individual include types (collection, relationship or ALL) cannot be combined together. [optional]
x_gdc_validate_relations bool [optional] if omitted the server will use the default value of False
meta_include [str] Include Meta objects. [optional]

Return type

JsonApiAttributeOutDocument

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.gooddata.api+json

HTTP response details

Status code Description Response headers
200 Request successfully processed -

[Back to top] [Back to API list] [Back to Model list] [Back to README]