User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
ColorCollection : Manage Color Collections

Get all Color Collections beta

GET/api/3.1/color_collections
all_color_collections(fields)

Implementation Notes

Get an array of all existing Color Collections.

Get a single color collection by id with ColorCollection)

Get all standard color collections with ColorCollection)

Get all custom color collections with ColorCollection)

Note: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return Not Found (404) errors.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
fields false Requested fields. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Create ColorCollection beta

POST/api/3.1/color_collections
create_color_collection(body)

Implementation Notes

Create a custom color collection with the specified information.

Creates a new custom color collection object, returning the details, including the created id.

Update an existing color collection with Update Color Collection)

Permanently delete an existing custom color collection with Delete Color Collection)

Note: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return Not Found (404) errors.

Response Class

ColorCollection {
id (string, read-only): Unique Id,
label (string): Label of color collection,
categoricalPalettes (Array[DiscretePalette]): Array of categorical palette definitions,
sequentialPalettes (Array[ContinuousPalette]): Array of discrete palette definitions,
divergingPalettes (Array[ContinuousPalette]): Array of diverging palette definitions
}
DiscretePalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
colors (Array[string]): Array of colors in the palette
}
ContinuousPalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
stops (Array[ColorStop]): Array of ColorStops in the palette
}
ColorStop {
color (string): CSS color string,
offset (long): Offset in continuous palette (0 to 100)
}

Parameters

Parameter Required? Description Parameter Type Data Type
body false ColorCollection body
ColorCollection {
id (string, read-only): Unique Id,
label (string): Label of color collection,
categoricalPalettes (Array[DiscretePalette]): Array of categorical palette definitions,
sequentialPalettes (Array[ContinuousPalette]): Array of discrete palette definitions,
divergingPalettes (Array[ContinuousPalette]): Array of diverging palette definitions
}
DiscretePalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
colors (Array[string]): Array of colors in the palette
}
ContinuousPalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
stops (Array[ColorStop]): Array of ColorStops in the palette
}
ColorStop {
color (string): CSS color string,
offset (long): Offset in continuous palette (0 to 100)
}

Response Messages

HTTP Status Code Reason Response Model
403 Permission Denied
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Get all Custom Color Collections beta

GET/api/3.1/color_collections/custom
color_collections_custom(fields)

Implementation Notes

Get an array of all existing **Custom Color Collections.**

Get a single color collection by id with ColorCollection)

Get all standard color collections with ColorCollection)

Note: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return Not Found (404) errors.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
fields false Requested fields. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get all Standard Color Collections beta

GET/api/3.1/color_collections/standard
color_collections_standard(fields)

Implementation Notes

Get an array of all existing **Standard Color Collections.**

Get a single color collection by id with ColorCollection)

Get all custom color collections with ColorCollection)

Note: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return Not Found (404) errors.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
fields false Requested fields. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Set Default Color Collection beta

PUT/api/3.1/color_collections/default
set_default_color_collection(collection_id)

Implementation Notes

Set the global default Color Collection by ID.

Returns the new specified default Color Collection object. Note: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return Not Found (404) errors.

Response Class

ColorCollection {
id (string, read-only): Unique Id,
label (string): Label of color collection,
categoricalPalettes (Array[DiscretePalette]): Array of categorical palette definitions,
sequentialPalettes (Array[ContinuousPalette]): Array of discrete palette definitions,
divergingPalettes (Array[ContinuousPalette]): Array of diverging palette definitions
}
DiscretePalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
colors (Array[string]): Array of colors in the palette
}
ContinuousPalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
stops (Array[ColorStop]): Array of ColorStops in the palette
}
ColorStop {
color (string): CSS color string,
offset (long): Offset in continuous palette (0 to 100)
}

Parameters

Parameter Required? Description Parameter Type Data Type
collection_id true ID of color collection to set as default string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Get Default Color Collection beta

GET/api/3.1/color_collections/default
default_color_collection()

Implementation Notes

Get the default color collection.

Use this to retrieve the default Color Collection.

Set the default color collection with ColorCollection)

Response Class

ColorCollection {
id (string, read-only): Unique Id,
label (string): Label of color collection,
categoricalPalettes (Array[DiscretePalette]): Array of categorical palette definitions,
sequentialPalettes (Array[ContinuousPalette]): Array of discrete palette definitions,
divergingPalettes (Array[ContinuousPalette]): Array of diverging palette definitions
}
DiscretePalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
colors (Array[string]): Array of colors in the palette
}
ContinuousPalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
stops (Array[ColorStop]): Array of ColorStops in the palette
}
ColorStop {
color (string): CSS color string,
offset (long): Offset in continuous palette (0 to 100)
}

Parameters

  None

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get Color Collection by ID beta

GET/api/3.1/color_collections/{collection_id}
color_collection(collection_id, fields)

Implementation Notes

Get a Color Collection by ID.

Use this to retrieve a specific Color Collection. Get a single color collection by id with ColorCollection)

Get all standard color collections with ColorCollection)

Get all custom color collections with ColorCollection)

Note: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return Not Found (404) errors.

Response Class

ColorCollection {
id (string, read-only): Unique Id,
label (string): Label of color collection,
categoricalPalettes (Array[DiscretePalette]): Array of categorical palette definitions,
sequentialPalettes (Array[ContinuousPalette]): Array of discrete palette definitions,
divergingPalettes (Array[ContinuousPalette]): Array of diverging palette definitions
}
DiscretePalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
colors (Array[string]): Array of colors in the palette
}
ContinuousPalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
stops (Array[ColorStop]): Array of ColorStops in the palette
}
ColorStop {
color (string): CSS color string,
offset (long): Offset in continuous palette (0 to 100)
}

Parameters

Parameter Required? Description Parameter Type Data Type
collection_id true Id of Color Collection string string
fields false Requested fields. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Update Custom Color collection beta

PATCH/api/3.1/color_collections/{collection_id}
update_color_collection(collection_id, body)

Implementation Notes

Update a custom color collection by id.

Note: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return Not Found (404) errors.

Response Class

ColorCollection {
id (string, read-only): Unique Id,
label (string): Label of color collection,
categoricalPalettes (Array[DiscretePalette]): Array of categorical palette definitions,
sequentialPalettes (Array[ContinuousPalette]): Array of discrete palette definitions,
divergingPalettes (Array[ContinuousPalette]): Array of diverging palette definitions
}
DiscretePalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
colors (Array[string]): Array of colors in the palette
}
ContinuousPalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
stops (Array[ColorStop]): Array of ColorStops in the palette
}
ColorStop {
color (string): CSS color string,
offset (long): Offset in continuous palette (0 to 100)
}

Parameters

Parameter Required? Description Parameter Type Data Type
collection_id true Id of Custom Color Collection string string
body true ColorCollection body
ColorCollection {
id (string, read-only): Unique Id,
label (string): Label of color collection,
categoricalPalettes (Array[DiscretePalette]): Array of categorical palette definitions,
sequentialPalettes (Array[ContinuousPalette]): Array of discrete palette definitions,
divergingPalettes (Array[ContinuousPalette]): Array of diverging palette definitions
}
DiscretePalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
colors (Array[string]): Array of colors in the palette
}
ContinuousPalette {
id (string, read-only): Unique identity string,
label (string): Label for palette,
type (string): Type of palette,
stops (Array[ColorStop]): Array of ColorStops in the palette
}
ColorStop {
color (string): CSS color string,
offset (long): Offset in continuous palette (0 to 100)
}

Response Messages

HTTP Status Code Reason Response Model
403 Permission Denied
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Delete ColorCollection beta

DELETE/api/3.1/color_collections/{collection_id}
delete_color_collection(collection_id)

Implementation Notes

Delete a custom color collection by id.

This operation permanently deletes the identified Custom color collection.

Standard color collections cannot be deleted

Because multiple color collections can have the same label, they must be deleted by ID, not name. Note: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return Not Found (404) errors.

Response Class

Parameters

Parameter Required? Description Parameter Type Data Type
collection_id true Id of Color Collection string string

Response Messages

HTTP Status Code Reason Response Model
403 Permission Denied
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
204 Successfully deleted. string
Top