List of Styles

GET /v1/entities/style

Retrieves a list of styles.

Request Parameters

Location Parameter Type Required/ Optional Description
query offset number optional The numeric offset of the first record to return. May be a value between 1 and 1000 inclusive.
query cursor string optional The cursor ID of the first record to return. Example: minimal
query limit number optional The number of records to return. May be a value between 1 and 100 inclusive. If a value is not specified, the default is 10
query id string optional Filter. Will match to records whose id contains the given string
query name string optional Filter. Will match to records whose name contains the given string

For a description of how to use these query parameters, see Pagination.

Example Request

GET /v1/entities/style?offset=0&limit=2 HTTP/1.1
Host: api.ampermusic.com
Content-Type: application/vnd.api+json
Authorization: Basic abcxyz

Response Data

Data Item Type Description
data array
data[].type string The type of data (entity_style in this case)
data[].id string The string ID of the style
data[].attributes object
data[].attributes.name string The string name of the style
data[].attributes.category string The string category of the style. Will always be style
data[].links object
data[].links.self string The URL of the style
links object
links.self string The URL of this list of styles
links.first string The URL of the first (or possibly only) page of results. It is always available
links.prev string The URL of the previous page of results when using offset/limit mode. It is omitted if there is no previous page and is not available in cursor/limit mode
links.next string The URL of the next page of results when using offset/limit mode. It is omitted if there are no additional pages and is available on the first page, and on any subsequent page, accessed with offset/limit mode
links.next_cursor string The URL of the next page of results when using cursor/limit mode. It is omitted if there are no additional pages and is available on the first page, and on any subsequent page, accessed with cursor/limit mode

Example Response

Header

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

Body

{
	"data": [
		{
			"attributes": {
				"category": "style",
				"name": "Documentary"
			},
			"id": "documentary",
			"links": {
				"self": "https://api.ampermusic.com/v1/entities/style/documentary"
			},
			"type": "entity_style"
		},
		{
			"attributes": {
				"category": "style",
				"name": "Minimal"
			},
			"id": "minimal",
			"links": {
				"self": "https://api.ampermusic.com/v1/entities/style/minimal"
			},
			"type": "entity_style"
		}
	],
	"links": {
		"first": "https://api.ampermusic.com/v1/entities/style?limit=2",
		"next": "https://api.ampermusic.com/v1/entities/style?limit=2&offset=2",
		"next_cursor": "https://api.ampermusic.com/v1/entities/style?limit=2&cursor=minimal",
		"self": "https://api.ampermusic.com/v1/entities/style?limit=2"
	}
}