Content

Getting Started

IntroductionOptimization

Integrations

NextNuxtReactVue 3

GraphQL API

To views all available queries/mutation you can open apollo sandbox explorer, by this link:

https://studio.apollographql.com/sandbox/explorer

and copy & paste this endpoint

https:/contentdelivr.com/graphql

to connect

Sign in or Sign Up into your account

Create a Bucket

Via /

Mutation Query

GraphQL

mutation AppNew($data: AppDataInput!) {
	AppNew(data: $data) {
		status
		data {
		  id
		  uuid
		  name
		  title
		  description
		  ownerId
		  createdAt
		  token
		}
	}
}

Mutation Data

JSON

{
  "data": {
    "title": "New Bucket Title",
    "name": "slugify-name-that-used-in-url",
    "description": "some description to identify the bucket target"
  }
}

Mutation Response

GraphQL

AppNew {
	status: 'ok'
	data {
		id: 123
		uuid: 'uuid'
		name: 'slugify-name-that-used-in-url'
		title: 'New Bucket Title'
		description: 'some description to identify the bucket target'
		ownerId: 123
		createdAt: '2021-01-01 00:00:00'
		token: 'token-with-64-length'
	}
}

That bucket link looks something like this:

https://cdndelivr.com/bucket-name/preset?/content-name.extension?arguments=value

You need an access token to upload new files, and name to get a link to your content

Upload an image to Bucket

Mutation Query

GraphQL

mutation PhotoSave($data: PhotoSaveInput!) {
  PhotoSave(data: $data) {
    status
    message
    completed
    name
    uuid
    meta {
      timings {
        appContext
        validate
        hashing
        photoContext
        prepare
        saveToStorage
        total
      }
    }
    hash {
      primary
      phash
      jshash
    }
    size {
      jpeg
      png
      webp
      svg
      heic
    }
  }
}

Mutation Data

JSON

{
  "data": {
    "appToken": "some-token",
    "base64": "image/base64",
    "mime": "image/jpeg",
    "meta": "if you want to describe image",
    "name": "name-in-url",
    "quality": 80
  }
}

Mutation Response

GraphQL

{
	PhotoSave {
		status: 'ok'
		message: 'Photo saved'
		completed: true
		name: 'name-in-url'
		uuid: 'uuid'
		meta {
			timings {
				appContext: 0.1
				validate: 0.1
				hashing: 0.1
				photoContext: 0.1
				prepare: 0.1
				saveToStorage: 0.1
				total: 0.1
			}
		}
		hash {
			primary: 'hash'
			phash: 'phash'
			jshash: 'jshash'
		}
		size {
			jpeg: 123
			png: 123
			webp: 123
			svg: 123
			heic: 123
		}
	}
}

That bucket link looks something like this:

https://cdndelivr.com/bucket-name/name-in-url.jpeg


Products

Image APIDAMDemoRoadMapFAQ

TelegramDiscordX (Twitter)YouTubeInstagram