Wirestock Content GraphQL API
Send a GraphQL query to our API and get exactly what you need, nothing more and nothing less. Our GraphQL queries always return predictable results. Apps using GraphQL are fast and stable because they control the data they get, not the server.
Type system
Our GraphQL API is organized in terms of types and fields, not endpoints. Access the full capabilities of Wirestock content from a single endpoint. GraphQL uses types to ensure Apps only ask for what’s possible and provide clear and helpful errors. Apps can use types to avoid writing manual parsing code.
No versioning
Even if we add new fields and types to our GraphQL API, it will not impact existing queries. You shouldn't worry about versions and the compatibility between them.
Dvelopment tools
There are lot of handy tools for GraphQL development like
- Testfully
- Insomnia
- Postman
- GraphiQL
- Altair
We recomend the Altair. Altair is a beautiful feature-rich GraphQL Client IDE for all platforms. Available for MacOS, Windows, Linux, Chrome, Firefox. It enables you interact with any GraphQL server you are authorized to access from any platform you are on.
API Endpoints
https://integration.wirestock.io/graphql
Headers
# The Barear token must be here.
Authorization: Public
Queries
getMediaDetails
Description
Retrieves details of a specific media by id
Example
Query
query GetMediaDetails($id: Int!) {
getMediaDetails(id: $id) {
id
creator {
id
display_name
username
avatar
}
geometry {
aspect_ratio
width
height
}
motion {
frame_rate
duration
}
sources {
thumbnail
preview
download_original
download_original_optimized
}
extension
type
description
submission_date
license
keywords {
keyword
}
is_mature
with_release
}
}
Variables
{"id": 123}
Response
{
"data": {
"getMediaDetails": {
"id": 123,
"creator": Creator,
"geometry": Geometry,
"motion": Motion,
"sources": Sources,
"extension": "xyz789",
"type": "xyz789",
"description": "abc123",
"submission_date": "xyz789",
"license": "xyz789",
"keywords": [Keyword],
"is_mature": false,
"with_release": true
}
}
}
login
Description
Retrieves authorization token required for extended requests to API
Response
Returns a
Credentials
Example
Query
query Login(
$username: String!,
$password: String!
) {
login(
username: $username,
password: $password
) {
access_token
}
}
Variables
{
"username": "abc123",
"password": "abc123"
}
Response
{
"data": {
"login": {"access_token": "abc123"}
}
}
searchMedia
Description
Search media by criteria from the filter
Response
Returns a
SearchMediaResults
Arguments
Name | Description |
---|---|
filter -
SearchFilter
|
|
page -
Int
|
|
perPage -
Int
|
Example
Query
query SearchMedia(
$filter: SearchFilter,
$page: Int,
$perPage: Int
) {
searchMedia(
filter: $filter,
page: $page,
perPage: $perPage
) {
results {
id
creator {
...CreatorFragment
}
geometry {
...GeometryFragment
}
motion {
...MotionFragment
}
sources {
...SourcesFragment
}
extension
type
description
submission_date
license
keywords {
...KeywordFragment
}
is_mature
with_release
}
pagination {
total
}
}
}
Variables
{"filter": SearchFilter, "page": 987, "perPage": 123}
Response
{
"data": {
"searchMedia": {
"results": [Media],
"pagination": SearchMediaResultsPagination
}
}
}
Types
Boolean
Description
The Boolean
scalar type represents true
or false
.
Creator
Credentials
Fields
Field Name | Description |
---|---|
access_token -
String!
|
Example
{"access_token": "abc123"}
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by
IEEE 754.
Example
123.45
Geometry
ID
Description
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
Example
"4"
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
Keyword
Fields
Field Name | Description |
---|---|
keyword -
String
|
Example
{"keyword": "xyz789"}
Media
Example
{
"id": 987,
"creator": Creator,
"geometry": Geometry,
"motion": Motion,
"sources": Sources,
"extension": "xyz789",
"type": "abc123",
"description": "abc123",
"submission_date": "xyz789",
"license": "abc123",
"keywords": [Keyword],
"is_mature": true,
"with_release": true
}
MediaType
Values
Enum Value | Description |
---|---|
|
|
|
|
|
Example
"photo"
Motion
Orientation
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
Example
"landscape"
SearchFilter
Description
Stores the criteria by which the media is searched for
Fields
Input Field | Description |
---|---|
searchQuery -
String
|
This phrase is used to search by the media description field |
types -
[MediaType]
|
|
orientation -
Orientation
|
|
mature -
Boolean
|
If you would like to filter adult content, put 'false' here |
withRelease -
Boolean
|
Example
{
"searchQuery": "abc123",
"types": ["photo"],
"orientation": "landscape",
"mature": true,
"withRelease": false
}
SearchMediaResults
Fields
Field Name | Description |
---|---|
results -
[Media]
|
Found media |
pagination -
SearchMediaResultsPagination
|
Example
{
"results": [Media],
"pagination": SearchMediaResultsPagination
}
SearchMediaResultsPagination
Fields
Field Name | Description |
---|---|
total -
Int
|
Total count of search results |
Example
{"total": 987}
Sources
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"