keboola / looker-api
Requires
- php: >=5.5 <8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-10-29 15:00:00 UTC
README
API 4.0 is the current release of the Looker API. API 3.1 is deprecated.
Authorization
The classic method of API authorization uses Looker API credentials for authorization and access control. Looker admins can create API credentials on Looker's Admin/Users page. API 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests. For details, see Looker API Authorization.
API Explorer
The API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs. For details, see the API Explorer documentation.
Looker Language SDKs
The Looker API is a RESTful system that should be usable by any programming language capable of making HTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker has an OpenSource sdk-codegen project that provides several language SDKs. Language SDKs generated by sdk-codegen
have an Authentication manager that can automatically authenticate API requests when needed.
For details on available Looker SDKs, see Looker API Client SDKs.
API Versioning
Future releases of Looker expand the latest API version release-by-release to securely expose more and more of the core power of the Looker platform to API client applications. API endpoints marked as "beta" may receive breaking changes without warning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking changes in future releases. For details, see Looker API Versioning.
In This Release
API 4.0 version was introduced to make adjustments to API functions, parameters, and response types to fix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can make to the previous API 3.1. One benefit of these type adjustments in API 4.0 is dramatically better support for strongly typed languages like TypeScript, Kotlin, Swift, Go, C#, and more. See the API 4.0 GA announcement for more information about API 4.0. The API Explorer can be used to interactively compare the differences between API 3.1 and 4.0.
API and SDK Support Policies
Looker API versions and language SDKs have varying support levels. Please read the API and SDK support policies for more information.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 4.0.23.6
- Build package: io.swagger.codegen.languages.PhpClientCodegen For more information, please visit https://help.looker.com
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/keboola/looker-api.git"
}
],
"require": {
"keboola/looker-api": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Swagger\Client\Api\AlertApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); $limit = 789; // int | (Optional) Number of results to return (used with `offset`). $offset = 789; // int | (Optional) Number of results to skip before returning any (used with `limit`). try { $result = $apiInstance->alertNotifications($limit, $offset); print_r($result); } catch (Exception $e) { echo 'Exception when calling AlertApi->alertNotifications: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://example.looker.com:443/api/4.0
Documentation For Models
- AccessToken
- Alert
- AlertAppliedDashboardFilter
- AlertConditionState
- AlertDestination
- AlertField
- AlertFieldFilter
- AlertNotifications
- AlertPatch
- ApiSession
- ApiVersion
- ApiVersionElement
- Artifact
- ArtifactNamespace
- ArtifactUsage
- BackupConfiguration
- Board
- BoardItem
- BoardSection
- ColorCollection
- ColorStop
- ColumnSearch
- ConnectionFeatures
- ContentFavorite
- ContentMeta
- ContentMetaGroupUser
- ContentSearch
- ContentValidation
- ContentValidationAlert
- ContentValidationDashboard
- ContentValidationDashboardElement
- ContentValidationDashboardFilter
- ContentValidationError
- ContentValidationFolder
- ContentValidationLook
- ContentValidationLookMLDashboard
- ContentValidationLookMLDashboardElement
- ContentValidationScheduledPlan
- ContentValidatorError
- ContentView
- ContinuousPalette
- CostEstimate
- CreateCostEstimate
- CreateCredentialsApi3
- CreateDashboardFilter
- CreateDashboardRenderTask
- CreateEmbedUserRequest
- CreateFolder
- CreateOAuthApplicationUserStateRequest
- CreateOAuthApplicationUserStateResponse
- CreateQueryTask
- CredentialsApi3
- CredentialsEmail
- CredentialsEmailSearch
- CredentialsEmbed
- CredentialsGoogle
- CredentialsLDAP
- CredentialsLookerOpenid
- CredentialsOIDC
- CredentialsSaml
- CredentialsTotp
- CustomWelcomeEmail
- DBConnection
- DBConnectionBase
- DBConnectionOverride
- DBConnectionTestResult
- Dashboard
- DashboardAggregateTableLookml
- DashboardAppearance
- DashboardBase
- DashboardElement
- DashboardFilter
- DashboardLayout
- DashboardLayoutComponent
- DashboardLookml
- DataActionForm
- DataActionFormField
- DataActionFormSelectOption
- DataActionRequest
- DataActionResponse
- DataActionUserState
- Datagroup
- DelegateOauthTest
- DependencyGraph
- Dialect
- DialectInfo
- DialectInfoOptions
- DigestEmailSend
- DigestEmails
- DiscretePalette
- EgressIpAddresses
- EmbedCookielessSessionAcquire
- EmbedCookielessSessionAcquireResponse
- EmbedCookielessSessionGenerateTokens
- EmbedCookielessSessionGenerateTokensResponse
- EmbedParams
- EmbedSecret
- EmbedSsoParams
- EmbedUrlResponse
- Error
- ExternalOauthApplication
- Folder
- FolderBase
- GitBranch
- GitConnectionTest
- GitConnectionTestResult
- GitStatus
- Group
- GroupHierarchy
- GroupIdForGroupInclusion
- GroupIdForGroupUserInclusion
- GroupSearch
- HomepageItem
- HomepageSection
- ImportedProject
- Integration
- IntegrationHub
- IntegrationParam
- IntegrationRequiredField
- IntegrationTestResult
- InternalHelpResources
- InternalHelpResourcesContent
- LDAPConfig
- LDAPConfigTestIssue
- LDAPConfigTestResult
- LDAPGroupRead
- LDAPGroupWrite
- LDAPUser
- LDAPUserAttributeRead
- LDAPUserAttributeWrite
- LegacyFeature
- Locale
- LocalizationSettings
- Look
- LookBasic
- LookModel
- LookWithDashboards
- LookWithQuery
- LookmlModel
- LookmlModelExplore
- LookmlModelExploreAccessFilter
- LookmlModelExploreAlias
- LookmlModelExploreAlwaysFilter
- LookmlModelExploreConditionallyFilter
- LookmlModelExploreError
- LookmlModelExploreField
- LookmlModelExploreFieldEnumeration
- LookmlModelExploreFieldMapLayer
- LookmlModelExploreFieldMeasureFilters
- LookmlModelExploreFieldSqlCase
- LookmlModelExploreFieldTimeInterval
- LookmlModelExploreFieldset
- LookmlModelExploreJoins
- LookmlModelExploreSet
- LookmlModelExploreSupportedMeasureType
- LookmlModelNavExplore
- LookmlTest
- LookmlTestResult
- Manifest
- MaterializePDT
- MergeFields
- MergeQuery
- MergeQuerySourceQuery
- MobileFeatureFlags
- MobilePayload
- MobileSettings
- MobileToken
- Model
- ModelFieldSuggestions
- ModelNamedValueFormats
- ModelSet
- ModelsNotValidated
- OIDCConfig
- OIDCGroupRead
- OIDCGroupWrite
- OIDCUserAttributeRead
- OIDCUserAttributeWrite
- OauthClientApp
- PasswordConfig
- Permission
- PermissionSet
- PrivatelabelConfiguration
- Project
- ProjectError
- ProjectFile
- ProjectValidation
- ProjectValidationCache
- ProjectWorkspace
- Query
- QueryTask
- RenderTask
- RepositoryCredential
- ResultMakerFilterables
- ResultMakerFilterablesListen
- ResultMakerWithIdVisConfigAndDynamicFields
- Role
- RoleSearch
- RunningQueries
- SamlConfig
- SamlGroupRead
- SamlGroupWrite
- SamlMetadataParseResult
- SamlUserAttributeRead
- SamlUserAttributeWrite
- ScheduledPlan
- ScheduledPlanDestination
- Schema
- SchemaColumn
- SchemaColumns
- SchemaTable
- SchemaTables
- Session
- SessionConfig
- Setting
- SmtpNodeStatus
- SmtpSettings
- SmtpStatus
- Snippet
- SqlQuery
- SqlQueryCreate
- SshPublicKey
- SshServer
- SshTunnel
- SupportAccessAddEntries
- SupportAccessAllowlistEntry
- SupportAccessEnable
- SupportAccessStatus
- Theme
- ThemeSettings
- Timezone
- UpdateArtifact
- UpdateFolder
- User
- UserAttribute
- UserAttributeGroupValue
- UserAttributeWithValue
- UserEmailOnly
- UserLoginLockout
- UserPublic
- ValidationError
- ValidationErrorDetail
- WelcomeEmailTest
- WhitelabelConfiguration
- Workspace
- WriteScheduledPlan
Documentation For Authorization
All endpoints do not require authorization.