Source

The source API allows you to create folders, files, and media.

GET

Parameters

Headers

https://main--docket--da-pilot.aem.live/fragments/api/headers

Path

https://main--docket--da-pilot.aem.page/fragments/api/path

Examples

Request

  • curl (bash)
  • Javascript
curl -X POST \
  'https://admin.da.live/source/geometrixx/outdoors/drafts/cmillar/test.json' \
  --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
  --form 'data=@/Users/cmillar/Desktop/my-file.json'
const opts = {
  headers: { Authorization: `Bearer ${token}` },
  method: 'GET',
};
const fullpath = `https://admin.da.live/source/${org}/${repo}/drafts/cmillar/hello-world.html`;
const resp = await fetch(fullpath, opts);

Response

  • 200 (json)
  • 201 (json)
  • 400 (json)
  • 500 (json)
{
    "webPath": "/en/2021/blog",
    "resourcePath": "/en/2021/blog.md",
    "live": {
        "status": 200,
        "url": "https://main--site--org.aem.live/en/2021/blog",
        "lastModified": "2021-05-29T22:00:00Z",
        "lastModifiedBy": "[email protected]",
        "contentBusId": "helix-content-bu/h3-theblog-123ab123ab12ab123a12b3a/live/en/2021/blog.md",
        "permissions": [
            "read"
        ]
    },
    "preview": {
        "status": 200,
        "url": "https://main--site--org.aem.page/en/2021/blog",
        "lastModified": "2021-05-31T23:00:00Z",
        "lastModifiedBy": "anonymous",
        "contentBusId": "helix-content-bu/h3-theblog-123ab123ab12ab123a12b3a/preview/en/2021/blog.md",
        "permissions": [
            "read",
            "write"
        ]
    },
    "edit": {
        "status": 200,
        "url": "https://adobe.sharepoint.com/",
        "sourceLocation": "onedrive:/drives/b!DyVXacYnlkm_17hZL307Me9vzRzaKwZCpVMBYbPOKaVT_gD5WmlHRbC-PCpiwGPx/items/012VWERI4JFIU56LICZNBZA4MYHF6Z4AKJ",
        "lastModified": "2021-05-29T21:00:00Z"
    },
    "code": {
        "status": 404,
        "codeBusId": "helix-code-bus/adobe/blog/main/blog.md",
        "permissions": [
            "read"
        ]
    },
    "links": {
        "status": "https://admin.hlx.page/status/adobe/blog/main/blog",
        "preview": "https://admin.hlx.page/preview/adobe/blog/main/blog",
        "live": "https://admin.hlx.page/live/adobe/blog/main/blog",
        "code": "https://admin.hlx.page/code/adobe/blog/main/blog"
    }
}
{
    "webPath": "/en/2021/blog",
    "resourcePath": "/en/2021/blog.md",
    "live": {
        "status": 200,
        "url": "https://main--site--org.aem.live/en/2021/blog",
        "lastModified": "2021-05-29T22:00:00Z",
        "lastModifiedBy": "[email protected]",
        "contentBusId": "helix-content-bu/h3-theblog-123ab123ab12ab123a12b3a/live/en/2021/blog.md",
        "permissions": [
            "read"
        ]
    },
    "preview": {
        "status": 200,
        "url": "https://main--site--org.aem.page/en/2021/blog",
        "lastModified": "2021-05-31T23:00:00Z",
        "lastModifiedBy": "anonymous",
        "contentBusId": "helix-content-bu/h3-theblog-123ab123ab12ab123a12b3a/preview/en/2021/blog.md",
        "permissions": [
            "read",
            "write"
        ]
    },
    "edit": {
        "status": 200,
        "url": "https://adobe.sharepoint.com/",
        "sourceLocation": "onedrive:/drives/b!DyVXacYnlkm_17hZL307Me9vzRzaKwZCpVMBYbPOKaVT_gD5WmlHRbC-PCpiwGPx/items/012VWERI4JFIU56LICZNBZA4MYHF6Z4AKJ",
        "lastModified": "2021-05-29T21:00:00Z"
    },
    "code": {
        "status": 404,
        "codeBusId": "helix-code-bus/adobe/blog/main/blog.md",
        "permissions": [
            "read"
        ]
    },
    "links": {
        "status": "https://admin.hlx.page/status/adobe/blog/main/blog",
        "preview": "https://admin.hlx.page/preview/adobe/blog/main/blog",
        "live": "https://admin.hlx.page/live/adobe/blog/main/blog",
        "code": "https://admin.hlx.page/code/adobe/blog/main/blog"
    }
}
{
    "webPath": "/en/2021/blog",
    "resourcePath": "/en/2021/blog.md",
    "live": {
        "status": 200,
        "url": "https://main--site--org.aem.live/en/2021/blog",
        "lastModified": "2021-05-29T22:00:00Z",
        "lastModifiedBy": "[email protected]",
        "contentBusId": "helix-content-bu/h3-theblog-123ab123ab12ab123a12b3a/live/en/2021/blog.md",
        "permissions": [
            "read"
        ]
    }
}
{
    "webPath": "/en/2021/blog",
    "resourcePath": "/en/2021/blog.md",
    "links": {
        "status": "https://admin.hlx.page/status/adobe/blog/main/blog",
        "preview": "https://admin.hlx.page/preview/adobe/blog/main/blog",
        "live": "https://admin.hlx.page/live/adobe/blog/main/blog",
        "code": "https://admin.hlx.page/code/adobe/blog/main/blog"
    }
}

POST

Parameters

Headers

https://main--docket--da-pilot.aem.live/fragments/api/headers

Path

https://main--docket--da-pilot.aem.page/fragments/api/path

Examples

Request

  • curl (bash)
  • Javascript
curl -X POST \
  'https://admin.da.live/source/geometrixx/outdoors/drafts/cmillar/test.json' \
  --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
  --form 'data=@/Users/cmillar/Desktop/my-file.json'
const opts = {
  headers: { Authorization: `Bearer ${token}` },
  method: 'GET',
};
const fullpath = `https://admin.da.live/source/${org}/${repo}/drafts/cmillar/hello-world.html`;
const resp = await fetch(fullpath, opts);