Origin

Available endpoints:
NameMethodPath
get/v3/origin
post/v3/origin
get/v3/origin/{id}
patch/v3/origin/{id}
delete/v3/origin/{id}
post/v3/origin/aws

List of Origins

gethttps://api.cdn77.com/v3/origin

Responses

200Origin list for CDN Resource setup was returned
// response
[
  {
    "cdns": [
      {
        "id": 0,
        "label": "My cdn"
      }
    ],
    "id": "e56564d1-8d3e-4457-93a6-082b054bc736",
    "label": "My origin",
    "scheme": "https",
    "aws_access_key_id": "KLAMIDYDRAP8CJYC1DN",
    "aws_region": "us-east-1",
    "base_dir": "/pictures/images/",
    "host": "my.s3.amazonaws.com",
    "port": 1000,
    "type": "aws"
  },
  {
    "cdns": [
      {
        "id": 0,
        "label": "My cdn"
      }
    ],
    "id": "e56564d1-8d3e-4457-93a6-082b054bc736",
    "label": "My origin",
    "scheme": "https",
    "usage": {
      "space": 7216780,
      "nodes": 123456789,
      "time": "2021-09-17T10:52:31.152Z"
    },
    "server": {
      "id": "push-XX.cdn77.com",
      "location": "Europe - Frankfurt"
    },
    "type": "storage"
  },
  {
    "cdns": [
      {
        "id": 0,
        "label": "My cdn"
      }
    ],
    "id": "e56564d1-8d3e-4457-93a6-082b054bc736",
    "label": "My origin",
    "scheme": "https",
    "base_dir": "/pictures/images/",
    "host": "my-domain.com",
    "port": 8080,
    "type": "url"
  }
]

Create Your Origin

posthttps://api.cdn77.com/v3/origin

Request bodyrequired

base_dirstring

Directory where the content is stored on the URL Origin. Maximum length is 255.

labelrequiredstring

The label helps you to identify your URL Origin.

portinteger

URL Origin port. If not specified, default scheme port is used. Allowed range is between 1 and 65535.

schemerequiredstring

Scheme of the URL Origin.

hostrequiredstring

URL Origin host without scheme and port. Can be domain name or IP address.

Responses

201Origin created.
// response
{
  "cdns": [
    {
      "id": 0,
      "label": "My cdn"
    }
  ],
  "id": "e56564d1-8d3e-4457-93a6-082b054bc736",
  "label": "My origin",
  "scheme": "https",
  "base_dir": "/pictures/images/",
  "host": "my-domain.com",
  "port": 8080,
  "type": "url"
}

Detail of Your Origin

gethttps://api.cdn77.com/v3/origin/{id}

Request parameters

idrequiredstring in path

Origin ID.

Responses

200Detail of the given Origin returned.
// response
{
  "cdns": [
    {
      "id": 0,
      "label": "My cdn"
    }
  ],
  "id": "e56564d1-8d3e-4457-93a6-082b054bc736",
  "label": "My origin",
  "scheme": "https"
}
404Origin not found.

Edit Origin

Change of origin affects all your assigned CDN Resources.

patchhttps://api.cdn77.com/v3/origin/{id}

Request parameters

idrequiredstring in path

Origin ID.

Request bodyrequired

aws_access_key_idstring
aws_access_key_secretstring
aws_regionstring
base_dirstring
labelstring
schemestring
hoststring
portstring

Responses

204Origin updated.
404Origin not found.

Delete Origin

deletehttps://api.cdn77.com/v3/origin/{id}

Request parameters

idrequiredstring in path

Origin ID.

Responses

204Origin removed.
404Origin not found.

Create AWS Origin

posthttps://api.cdn77.com/v3/origin/aws

Request bodyrequired

aws_access_key_idrequiredstring

Located in the Security Credentials section of your AWS account.

aws_access_key_secretrequiredstring

Located in the Security Credentials section of your AWS account.

aws_regionrequiredstring

Located in the Security Credentials section of your AWS account. Possibly stored as AWS_DEFAULT_REGION.

base_dirstring

Directory of the stored content on your AWS Origin. Maximum length is 255. characters

labelrequiredstring

The label helps you to identify your AWS Origin.

schemestring

Scheme of the AWS Origin.

hostrequiredstring

AWS Origin host without scheme and port. Can be a domain name or an IP address.

portinteger

AWS Origin port. If not specified, the default scheme port is used. Allowed range is between 1 and 65535.

Responses

201AWS Origin for CDN Resource setup was added.
// response
{
  "cdns": [
    {
      "id": 0,
      "label": "My cdn"
    }
  ],
  "id": "e56564d1-8d3e-4457-93a6-082b054bc736",
  "label": "My origin",
  "scheme": "https",
  "aws_access_key_id": "KLAMIDYDRAP8CJYC1DN",
  "aws_region": "us-east-1",
  "base_dir": "/pictures/images/",
  "host": "my.s3.amazonaws.com",
  "port": 1000,
  "type": "aws"
}
422Unable to create AWS origin.