Updating list and sections

Updating list and sections

#%RAML 0.8
title: PAL
baseUri: http://pal.host
version: v1

/_config:
  get:
    description: Request the status of a pal instance. Provides the same response as /healthcheck.
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "name": "pal-server",
                "version": "0.123.16-651",
                "uptime": 510716465,
                "env": {
                  "COUCHDB_URL": "http://10.60.162.43:5984,http://10.60.162.44:5984",
                  "LOGTOP": "/var/log",
                  "CUSTOMER": "CNN",
                  "OLDPWD": "/etc/sv/cnn-pal",
                  "USER": "www-data",
                  "STATIC_FILE_URL": "http://cnn-static-domestic.stage.56m.dmtio.net",
                  "REDIS_URL": "http://10.60.162.41:6379,http://10.60.162.42:64001",
                  "SERIAL": "b2fee31e-3d71-ec9c-cfb0-aeef6788b7cf",
                  "PRODTOP": "/opt",
                  "PACKAGE_SIZE": "2x4x32-kvm",
                  "OWNER": "ictops",
                  "PATH": "/opt/cnn-pal/current/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin",
                  "PWD": "/opt/cnn-pal/current",
                  "HEALTHCHECK": "/healthcheck",
                  "ENVIRONMENT": "stage",
                  "HOME": "/opt/cnn-pal/current",
                  "SHLVL": "0",
                  "CONFTAG": "PROD",
                  "CHASSIS": "SDC_VIRTUAL",
                  "PRODUCT": "cnn-pal",
                  "TYPE": "deployit",
                  "PORT": "5000",
                  "IBIS_URL": "http://cnn-ibis.stage.56m.dmtio.net",
                  "LOCATION": "56m",
                  "DEBUG": "pal-server*"
                },
                "ttl":"60000 ms"
              }
/article:
    /{edition}/v1/videos/{videoUri}/:
      get:
        description: Request a template model for a video object.
        responses:
          200:
            body:
              application/json:
                example: |
                  {
                    adType: "yes",
                    ads: {},
                    analytics: {},
                    autoStartVideo: true,
                    background: { },
                    branding: {},
                    byline: "",
                    bylineLabel: "",
                    canonicalUrl: "http://www.cnn.com/videos/showbiz/2014/02/13/hazy-shade-of-winter.cnn",
                    currentVideoCollection: [],
                    dateCreated: "February 13, 2014",
                    description: "",
                    descriptionText: [ ],
                    edition: "domestic",
                    env: "ref",
                    firstPublishDate: "2014-02-13T23:16:13Z",
                    lastPublishDate: "2014-02-13T23:16:13Z",
                    lastPublishDateFormatted: "",
                    lastPublishDateHKFormatted: "",
                    layout: "left-rail-short",
                    livefyre: {},
                    logo: { },
                    metaImage: "http://cnn-ref-cms3-dist-dam1.56m.vgtf.net:8080/dam/assets//140213181555-hazy-shade-of-winter-00002001-full-169.jpg",
                    metaKeywords: "showbiz, Hazy Shade of Winter",
                    nav: {},
                    ogType: "video.other",
                    pageContents: [],
                    pageTheme: "blue",
                    pageType: "video",
                    partner: { },
                    schemaVersion: 2,
                    sectionName: "videos",
                    seoTitle: "Hazy Shade of Winter",
                    show: "",
                    showName: "",
                    showUrl: "",
                    socialCommenting: true,
                    socialLogin: true,
                    socialNewsfeed: false,
                    socialSharebar: true,
                    socialTrending: false,
                    status: 200,
                    title: "Hazy Shade of Winter",
                    type: "page",
                    videoIdForOg: "/videos/showbiz/2014/02/13/hazy-shade-of-winter.cnn",
                    sourceName: "CNN",
                    pageOhDear: {}
                  }
                schema:
          404:
            body:
              application/json:
                example: |
                  {
                    status: 404,
                    key: "/video/data/3.0/video/showbiz/2014/02/13/hazy-shade-of-winter.cnn1/index.xml/video/playlists/great-cover-songs-collection/",
                    message: "File not found",
                    responseMilliSeconds: 18,
                    type: "page",
                    env: "ref",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
          500:
            body:
              application/json:
                example: |
                  {
                    status: 500,
                    key: "/video/data/3.0/video/showbiz/2014/02/13/hazy-shade-of-winter.cnn1/index.xml/video/playlists/great-cover-songs-collection/",
                    message: "Pal-Server fetchContent error: Ibis Search request error Error: getaddrinfo ENOTFOUND ",
                    responseMilliSeconds: 18,
                    type: "page",
                    env: "ref",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
    /{edition}/v1/videos/{videoUri}/video/playlists/{videoCollectionUri}/:
      get:
        description: Request a template model for a video with the associated video collection.
        responses:
          200:
            body:
              application/json:
                example: |
                  {
                    adType: "yes",
                    ads: {},
                    analytics: {},
                    autoStartVideo: true,
                    background: { },
                    branding: {},
                    byline: "",
                    bylineLabel: "",
                    canonicalUrl: "http://www.cnn.com/videos/showbiz/2014/02/13/hazy-shade-of-winter.cnn",
                    currentVideoCollection: [],
                    dateCreated: "February 13, 2014",
                    description: "",
                    descriptionText: [ ],
                    edition: "domestic",
                    env: "ref",
                    firstPublishDate: "2014-02-13T23:16:13Z",
                    lastPublishDate: "2014-02-13T23:16:13Z",
                    lastPublishDateFormatted: "",
                    lastPublishDateHKFormatted: "",
                    layout: "left-rail-short",
                    livefyre: {},
                    logo: { },
                    metaImage: "http://cnn-ref-cms3-dist-dam1.56m.vgtf.net:8080/dam/assets//140213181555-hazy-shade-of-winter-00002001-full-169.jpg",
                    metaKeywords: "showbiz, Hazy Shade of Winter",
                    nav: {},
                    ogType: "video.other",
                    pageContents: [],
                    pageTheme: "blue",
                    pageType: "video",
                    partner: { },
                    schemaVersion: 2,
                    sectionName: "videos",
                    seoTitle: "Hazy Shade of Winter",
                    show: "",
                    showName: "",
                    showUrl: "",
                    socialCommenting: true,
                    socialLogin: true,
                    socialNewsfeed: false,
                    socialSharebar: true,
                    socialTrending: false,
                    status: 200,
                    title: "Hazy Shade of Winter",
                    type: "page",
                    videoIdForOg: "/videos/showbiz/2014/02/13/hazy-shade-of-winter.cnn",
                    sourceName: "CNN",
                    pageOhDear: {}
                  }
          404:
            body:
              application/json:
                example: |
                  {
                    status: 404,
                    key: "/video/data/3.0/video/showbiz/2014/02/13/hazy-shade-of-winter.cnn1/index.xml/video/playlists/great-cover-songs-collection/",
                    message: "File not found",
                    responseMilliSeconds: 18,
                    type: "page",
                    env: "ref",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
          500:
            body:
              application/json:
                example: |
                  {
                    status: 500,
                    key: "/video/data/3.0/video/showbiz/2014/02/13/hazy-shade-of-winter.cnn1/index.xml/video/playlists/great-cover-songs-collection/",
                    message: "Pal-Server fetchContent error: Ibis Search request error Error: getaddrinfo ENOTFOUND ",
                    responseMilliSeconds: 18,
                    type: "page",
                    env: "ref",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
    /{edition}/v1/{articleUri}/:
      get:
        description: Request a template model for an article object, full page gallery object, or audio object.
        responses:
          200:
            body:
              application/json:
                example: |
                  {
                    adType: "Normal",
                    ads: {},
                    analytics: {},
                    autoStartVideo: false,
                    background: {},
                    branding: {},
                    byline: "Greg Botelho, Marie-Louise Gumuchian and Nick Paton Walsh, CNN",
                    bylineLabel: "By",
                    canonicalUrl: "http://www.cnn.com/2014/03/13/europe/ukraine-crisis/index.html",
                    currentVideoCollection: [ ],
                    dateCreated: "",
                    description: "Moments after blasting what he called Russia's illegal "military aggression" of his nation, Ukraine's interim leader insisted Thursday that a peaceful resolution that ends with Kiev and Moscow becoming "real partners" is still possible.",
                    descriptionText: [ ],
                    edition: "domestic",
                    env: "dev",
                    firstPublishDate: "2014-03-13T22:39:56Z",
                    lastPublishDate: "2014-03-24T20:23:46Z",
                    lastPublishDateFormatted: "3:23 PM ET, Mon March 24, 2014",
                    lastPublishDateHKFormatted: "",
                    layout: "left-rail-tall",
                    livefyre: {},
                    logo: {},
                    metaKeywords: "europe, As Russian troops stage drills nearby, Ukraine leader says peace is still possible",
                    nav: {},
                    ogType: "article",
                    pageContents: [],
                    pageTheme: "white",
                    pageType: "article",
                    partner: { },
                    schemaVersion: 2,
                    sectionName: "europe",
                    seoTitle: "As Russian troops stage drills nearby, Ukraine leader says peace is still possible",
                    show: "",
                    showName: "",
                    showUrl: "",
                    socialCommenting: true,
                    socialLogin: true,
                    socialNewsfeed: false,
                    socialSharebar: true,
                    socialTrending: false,
                    status: 200,
                    title: "As Russian troops stage drills nearby, Ukraine leader says peace is still possible",
                    type: "page",
                    videoIdForOg: "",
                    pageOhDear: {}
                  }
          404:
            body:
              application/json:
                example: |
                  {
                    status: 404,
                    key: "/2014/03/13/europe/ukraine-crisis-1/index.html",
                    message: "File not found",
                    responseMilliSeconds: 42,
                    type: "page",
                    env: "dev",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
          500:
            body:
              application/json:
                example: |
                  {
                    status: 500,
                    key: "/2014/03/13/europe/ukraine-crisis/index.html",
                    message: "Pal-Server fetchContent error: Ibis Search request error Error: getaddrinfo ENOTFOUND ",
                    responseMilliSeconds: 52,
                    type: "page",
                    env: "local",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
/healthcheck:
  get:
    description: Request the status of a pal instance. Provides the same response as /_config.
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "name": "pal-server",
                "version": "0.123.16-651",
                "uptime": 510716465,
                "env": {
                  "COUCHDB_URL": "http://10.60.162.43:5984,http://10.60.162.44:5984",
                  "LOGTOP": "/var/log",
                  "CUSTOMER": "CNN",
                  "OLDPWD": "/etc/sv/cnn-pal",
                  "USER": "www-data",
                  "STATIC_FILE_URL": "http://cnn-static-domestic.stage.56m.dmtio.net",
                  "REDIS_URL": "http://10.60.162.41:6379,http://10.60.162.42:64001",
                  "SERIAL": "b2fee31e-3d71-ec9c-cfb0-aeef6788b7cf",
                  "PRODTOP": "/opt",
                  "PACKAGE_SIZE": "2x4x32-kvm",
                  "OWNER": "ictops",
                  "PATH": "/opt/cnn-pal/current/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin",
                  "PWD": "/opt/cnn-pal/current",
                  "HEALTHCHECK": "/healthcheck",
                  "ENVIRONMENT": "stage",
                  "HOME": "/opt/cnn-pal/current",
                  "SHLVL": "0",
                  "CONFTAG": "PROD",
                  "CHASSIS": "SDC_VIRTUAL",
                  "PRODUCT": "cnn-pal",
                  "TYPE": "deployit",
                  "PORT": "5000",
                  "IBIS_URL": "http://cnn-ibis.stage.56m.dmtio.net",
                  "LOCATION": "56m",
                  "DEBUG": "pal-server*"
                },
                "ttl":"60000 ms"
              }
/list:
  /{edition}/v1/{listUri}:
    get:
      description: Request a template model for a list (topic) object. Includes subsections and some specials objects.
      responses:
        200:
          body:
            application/json:
              example: |
                {
                  adType: "",
                  ads: {},
                  analytics: {},
                  autoStartVideo: false,
                  background: {},
                  branding: {},
                  byline: "",
                  bylineLabel: "",
                  canonicalUrl: "http://www.cnn.com/health/be-healthy",
                  currentVideoCollection: [ ],
                  dateCreated: "",
                  description: "",
                  descriptionText: [ ],
                  edition: "domestic",
                  env: "local",
                  firstPublishDate: "2014-01-20T16:14:10Z",
                  lastPublishDate: "2014-04-18T17:49:03Z",
                  lastPublishDateFormatted: "12:49 PM ET, Fri April 18, 2014",
                  lastPublishDateHKFormatted: "",
                  layout: "no-rail",
                  livefyre: {},
                  logo: { },
                  metaImage: "",
                  metaKeywords: "health",
                  nav: {},
                  ogType: "website",
                  pageContents: [],
                  pageTheme: "",
                  pageType: "special",
                  partner: { },
                  schemaVersion: 2,
                  sectionName: "health",
                  seoTitle: "",
                  show: "",
                  showName: "",
                  showUrl: "",
                  socialCommenting: false,
                  socialLogin: false,
                  socialNewsfeed: false,
                  socialSharebar: false,
                  socialTrending: false,
                  status: 200,
                  title: "",
                  type: "page",
                  videoIdForOg: "",
                  pageOhDear: {}
                }
        404:
          body:
            application/json:
              example: |
                {
                  status: 404,
                  key: "/health/be-healthy-1/index.html",
                  message: "File not found",
                  responseMilliSeconds: 427,
                  type: "page",
                  env: "local",
                  edition: "domestic",
                  location: "",
                  description: "",
                  layout: "no-rail",
                  pageType: "section",
                  sectionName: "",
                  seoTitle: "",
                  editorialSource: "",
                  nav: {}
                }
        500:
          body:
            application/json:
              example: |
                {
                  status: 500,
                  key: "/health/be-healthy-1/index.html",
                  message: "Pal-Server fetchContent error: Ibis Search request error Error: getaddrinfo ENOTFOUND ",
                  responseMilliSeconds: 31,
                  type: "page",
                  env: "local",
                  edition: "domestic",
                  location: "",
                  description: "",
                  layout: "no-rail",
                  pageType: "section",
                  sectionName: "",
                  seoTitle: "",
                  editorialSource: "",
                  nav: {}
                }
/profile:
  /{edition}/v1/{profileUri}:
    get:
      description: Request a template model for a profile object.
      responses:
        200:
        404:
        500:
/section:
  /{edition}/v1/{sectionUri}:
    get:
      description: Request a template model for a section object and some specials object.
      responses:
        200:
        404:
        500:
/show:
  /{edition}/v1/{showUri}:
    get:
      description: Request a template model for a show object.
      responses:
        200:
        404:
        500:

#%RAML 0.8
title: PAL
baseUri: http://pal.host
version: v1

/_config:
  get:
    description: Request the status of a pal instance. Provides the same response as /healthcheck.
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "name": "pal-server",
                "version": "0.123.16-651",
                "uptime": 510716465,
                "env": {
                  "COUCHDB_URL": "http://10.60.162.43:5984,http://10.60.162.44:5984",
                  "LOGTOP": "/var/log",
                  "CUSTOMER": "CNN",
                  "OLDPWD": "/etc/sv/cnn-pal",
                  "USER": "www-data",
                  "STATIC_FILE_URL": "http://cnn-static-domestic.stage.56m.dmtio.net",
                  "REDIS_URL": "http://10.60.162.41:6379,http://10.60.162.42:64001",
                  "SERIAL": "b2fee31e-3d71-ec9c-cfb0-aeef6788b7cf",
                  "PRODTOP": "/opt",
                  "PACKAGE_SIZE": "2x4x32-kvm",
                  "OWNER": "ictops",
                  "PATH": "/opt/cnn-pal/current/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin",
                  "PWD": "/opt/cnn-pal/current",
                  "HEALTHCHECK": "/healthcheck",
                  "ENVIRONMENT": "stage",
                  "HOME": "/opt/cnn-pal/current",
                  "SHLVL": "0",
                  "CONFTAG": "PROD",
                  "CHASSIS": "SDC_VIRTUAL",
                  "PRODUCT": "cnn-pal",
                  "TYPE": "deployit",
                  "PORT": "5000",
                  "IBIS_URL": "http://cnn-ibis.stage.56m.dmtio.net",
                  "LOCATION": "56m",
                  "DEBUG": "pal-server*"
                },
                "ttl":"60000 ms"
              }
/article:
    /{edition}/v1/videos/{videoUri}/:
      get:
        description: Request a template model for a video object.
        responses:
          200:
            body:
              application/json:
                example: |
                  {
                    adType: "yes",
                    ads: {},
                    analytics: {},
                    autoStartVideo: true,
                    background: { },
                    branding: {},
                    byline: "",
                    bylineLabel: "",
                    canonicalUrl: "http://www.cnn.com/videos/showbiz/2014/02/13/hazy-shade-of-winter.cnn",
                    currentVideoCollection: [],
                    dateCreated: "February 13, 2014",
                    description: "",
                    descriptionText: [ ],
                    edition: "domestic",
                    env: "ref",
                    firstPublishDate: "2014-02-13T23:16:13Z",
                    lastPublishDate: "2014-02-13T23:16:13Z",
                    lastPublishDateFormatted: "",
                    lastPublishDateHKFormatted: "",
                    layout: "left-rail-short",
                    livefyre: {},
                    logo: { },
                    metaImage: "http://cnn-ref-cms3-dist-dam1.56m.vgtf.net:8080/dam/assets//140213181555-hazy-shade-of-winter-00002001-full-169.jpg",
                    metaKeywords: "showbiz, Hazy Shade of Winter",
                    nav: {},
                    ogType: "video.other",
                    pageContents: [],
                    pageTheme: "blue",
                    pageType: "video",
                    partner: { },
                    schemaVersion: 2,
                    sectionName: "videos",
                    seoTitle: "Hazy Shade of Winter",
                    show: "",
                    showName: "",
                    showUrl: "",
                    socialCommenting: true,
                    socialLogin: true,
                    socialNewsfeed: false,
                    socialSharebar: true,
                    socialTrending: false,
                    status: 200,
                    title: "Hazy Shade of Winter",
                    type: "page",
                    videoIdForOg: "/videos/showbiz/2014/02/13/hazy-shade-of-winter.cnn",
                    sourceName: "CNN",
                    pageOhDear: {}
                  }
                schema:
          404:
            body:
              application/json:
                example: |
                  {
                    status: 404,
                    key: "/video/data/3.0/video/showbiz/2014/02/13/hazy-shade-of-winter.cnn1/index.xml/video/playlists/great-cover-songs-collection/",
                    message: "File not found",
                    responseMilliSeconds: 18,
                    type: "page",
                    env: "ref",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
          500:
            body:
              application/json:
                example: |
                  {
                    status: 500,
                    key: "/video/data/3.0/video/showbiz/2014/02/13/hazy-shade-of-winter.cnn1/index.xml/video/playlists/great-cover-songs-collection/",
                    message: "Pal-Server fetchContent error: Ibis Search request error Error: getaddrinfo ENOTFOUND ",
                    responseMilliSeconds: 18,
                    type: "page",
                    env: "ref",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
    /{edition}/v1/videos/{videoUri}/video/playlists/{videoCollectionUri}/:
      get:
        description: Request a template model for a video with the associated video collection.
        responses:
          200:
            body:
              application/json:
                example: |
                  {
                    adType: "yes",
                    ads: {},
                    analytics: {},
                    autoStartVideo: true,
                    background: { },
                    branding: {},
                    byline: "",
                    bylineLabel: "",
                    canonicalUrl: "http://www.cnn.com/videos/showbiz/2014/02/13/hazy-shade-of-winter.cnn",
                    currentVideoCollection: [],
                    dateCreated: "February 13, 2014",
                    description: "",
                    descriptionText: [ ],
                    edition: "domestic",
                    env: "ref",
                    firstPublishDate: "2014-02-13T23:16:13Z",
                    lastPublishDate: "2014-02-13T23:16:13Z",
                    lastPublishDateFormatted: "",
                    lastPublishDateHKFormatted: "",
                    layout: "left-rail-short",
                    livefyre: {},
                    logo: { },
                    metaImage: "http://cnn-ref-cms3-dist-dam1.56m.vgtf.net:8080/dam/assets//140213181555-hazy-shade-of-winter-00002001-full-169.jpg",
                    metaKeywords: "showbiz, Hazy Shade of Winter",
                    nav: {},
                    ogType: "video.other",
                    pageContents: [],
                    pageTheme: "blue",
                    pageType: "video",
                    partner: { },
                    schemaVersion: 2,
                    sectionName: "videos",
                    seoTitle: "Hazy Shade of Winter",
                    show: "",
                    showName: "",
                    showUrl: "",
                    socialCommenting: true,
                    socialLogin: true,
                    socialNewsfeed: false,
                    socialSharebar: true,
                    socialTrending: false,
                    status: 200,
                    title: "Hazy Shade of Winter",
                    type: "page",
                    videoIdForOg: "/videos/showbiz/2014/02/13/hazy-shade-of-winter.cnn",
                    sourceName: "CNN",
                    pageOhDear: {}
                  }
          404:
            body:
              application/json:
                example: |
                  {
                    status: 404,
                    key: "/video/data/3.0/video/showbiz/2014/02/13/hazy-shade-of-winter.cnn1/index.xml/video/playlists/great-cover-songs-collection/",
                    message: "File not found",
                    responseMilliSeconds: 18,
                    type: "page",
                    env: "ref",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
          500:
            body:
              application/json:
                example: |
                  {
                    status: 500,
                    key: "/video/data/3.0/video/showbiz/2014/02/13/hazy-shade-of-winter.cnn1/index.xml/video/playlists/great-cover-songs-collection/",
                    message: "Pal-Server fetchContent error: Ibis Search request error Error: getaddrinfo ENOTFOUND ",
                    responseMilliSeconds: 18,
                    type: "page",
                    env: "ref",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
    /{edition}/v1/{articleUri}/:
      get:
        description: Request a template model for an article object, full page gallery object, or audio object.
        responses:
          200:
            body:
              application/json:
                example: |
                  {
                    adType: "Normal",
                    ads: {},
                    analytics: {},
                    autoStartVideo: false,
                    background: {},
                    branding: {},
                    byline: "Greg Botelho, Marie-Louise Gumuchian and Nick Paton Walsh, CNN",
                    bylineLabel: "By",
                    canonicalUrl: "http://www.cnn.com/2014/03/13/europe/ukraine-crisis/index.html",
                    currentVideoCollection: [ ],
                    dateCreated: "",
                    description: "Moments after blasting what he called Russia's illegal "military aggression" of his nation, Ukraine's interim leader insisted Thursday that a peaceful resolution that ends with Kiev and Moscow becoming "real partners" is still possible.",
                    descriptionText: [ ],
                    edition: "domestic",
                    env: "dev",
                    firstPublishDate: "2014-03-13T22:39:56Z",
                    lastPublishDate: "2014-03-24T20:23:46Z",
                    lastPublishDateFormatted: "3:23 PM ET, Mon March 24, 2014",
                    lastPublishDateHKFormatted: "",
                    layout: "left-rail-tall",
                    livefyre: {},
                    logo: {},
                    metaKeywords: "europe, As Russian troops stage drills nearby, Ukraine leader says peace is still possible",
                    nav: {},
                    ogType: "article",
                    pageContents: [],
                    pageTheme: "white",
                    pageType: "article",
                    partner: { },
                    schemaVersion: 2,
                    sectionName: "europe",
                    seoTitle: "As Russian troops stage drills nearby, Ukraine leader says peace is still possible",
                    show: "",
                    showName: "",
                    showUrl: "",
                    socialCommenting: true,
                    socialLogin: true,
                    socialNewsfeed: false,
                    socialSharebar: true,
                    socialTrending: false,
                    status: 200,
                    title: "As Russian troops stage drills nearby, Ukraine leader says peace is still possible",
                    type: "page",
                    videoIdForOg: "",
                    pageOhDear: {}
                  }
          404:
            body:
              application/json:
                example: |
                  {
                    status: 404,
                    key: "/2014/03/13/europe/ukraine-crisis-1/index.html",
                    message: "File not found",
                    responseMilliSeconds: 42,
                    type: "page",
                    env: "dev",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
          500:
            body:
              application/json:
                example: |
                  {
                    status: 500,
                    key: "/2014/03/13/europe/ukraine-crisis/index.html",
                    message: "Pal-Server fetchContent error: Ibis Search request error Error: getaddrinfo ENOTFOUND ",
                    responseMilliSeconds: 52,
                    type: "page",
                    env: "local",
                    edition: "domestic",
                    location: "",
                    description: "",
                    layout: "no-rail",
                    pageType: "section",
                    sectionName: "",
                    seoTitle: "",
                    editorialSource: "",
                    nav: {}
                  }
/healthcheck:
  get:
    description: Request the status of a pal instance. Provides the same response as /_config.
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "name": "pal-server",
                "version": "0.123.16-651",
                "uptime": 510716465,
                "env": {
                  "COUCHDB_URL": "http://10.60.162.43:5984,http://10.60.162.44:5984",
                  "LOGTOP": "/var/log",
                  "CUSTOMER": "CNN",
                  "OLDPWD": "/etc/sv/cnn-pal",
                  "USER": "www-data",
                  "STATIC_FILE_URL": "http://cnn-static-domestic.stage.56m.dmtio.net",
                  "REDIS_URL": "http://10.60.162.41:6379,http://10.60.162.42:64001",
                  "SERIAL": "b2fee31e-3d71-ec9c-cfb0-aeef6788b7cf",
                  "PRODTOP": "/opt",
                  "PACKAGE_SIZE": "2x4x32-kvm",
                  "OWNER": "ictops",
                  "PATH": "/opt/cnn-pal/current/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin",
                  "PWD": "/opt/cnn-pal/current",
                  "HEALTHCHECK": "/healthcheck",
                  "ENVIRONMENT": "stage",
                  "HOME": "/opt/cnn-pal/current",
                  "SHLVL": "0",
                  "CONFTAG": "PROD",
                  "CHASSIS": "SDC_VIRTUAL",
                  "PRODUCT": "cnn-pal",
                  "TYPE": "deployit",
                  "PORT": "5000",
                  "IBIS_URL": "http://cnn-ibis.stage.56m.dmtio.net",
                  "LOCATION": "56m",
                  "DEBUG": "pal-server*"
                },
                "ttl":"60000 ms"
              }
/list:
  /{edition}/v1/{listUri}:
    get:
      description: Request a template model for a list (topic) object.
      responses:
        200:
          body:
            application/json:
              example: |
                {
                  adType: "",
                  ads: {},
                  analytics: {},
                  autoStartVideo: false,
                  background: {},
                  branding: {},
                  byline: "",
                  bylineLabel: "",
                  canonicalUrl: "http://www.cnn.com/health/be-healthy",
                  currentVideoCollection: [ ],
                  dateCreated: "",
                  description: "",
                  descriptionText: [ ],
                  edition: "domestic",
                  env: "local",
                  firstPublishDate: "2014-01-20T16:14:10Z",
                  lastPublishDate: "2014-04-18T17:49:03Z",
                  lastPublishDateFormatted: "12:49 PM ET, Fri April 18, 2014",
                  lastPublishDateHKFormatted: "",
                  layout: "no-rail",
                  livefyre: {},
                  logo: { },
                  metaImage: "",
                  metaKeywords: "health",
                  nav: {},
                  ogType: "website",
                  pageContents: [],
                  pageTheme: "",
                  pageType: "special",
                  partner: { },
                  schemaVersion: 2,
                  sectionName: "health",
                  seoTitle: "",
                  show: "",
                  showName: "",
                  showUrl: "",
                  socialCommenting: false,
                  socialLogin: false,
                  socialNewsfeed: false,
                  socialSharebar: false,
                  socialTrending: false,
                  status: 200,
                  title: "",
                  type: "page",
                  videoIdForOg: "",
                  pageOhDear: {}
                }
        404:
          body:
            application/json:
              example: |
                {
                  status: 404,
                  key: "/health/be-healthy-1/index.html",
                  message: "File not found",
                  responseMilliSeconds: 427,
                  type: "page",
                  env: "local",
                  edition: "domestic",
                  location: "",
                  description: "",
                  layout: "no-rail",
                  pageType: "section",
                  sectionName: "",
                  seoTitle: "",
                  editorialSource: "",
                  nav: {}
                }
        500:
          body:
            application/json:
              example: |
                {
                  status: 500,
                  key: "/health/be-healthy-1/index.html",
                  message: "Pal-Server fetchContent error: Ibis Search request error Error: getaddrinfo ENOTFOUND ",
                  responseMilliSeconds: 31,
                  type: "page",
                  env: "local",
                  edition: "domestic",
                  location: "",
                  description: "",
                  layout: "no-rail",
                  pageType: "section",
                  sectionName: "",
                  seoTitle: "",
                  editorialSource: "",
                  nav: {}
                }
/profile:
  /{edition}/v1/{profileUri}:
    get:
      description: Request a template model for a profile object.
      responses:
        200:
        404:
        500:
/section:
  /{edition}/v1/{sectionName}:
    get:
      description: Request a template model for a section object.
      responses:
        200:
        404:
        500:
/show:
  /{edition}/v1/{showUri}:
    get:
      description: Request a template model for a show object.
      responses:
        200:
        404:
        500:


Add project raml to api.raml

Add project raml to api.raml

#%RAML 0.8
title: SciTran
version: 1
baseUri: https://docker.local.flywheel.io:8443/api

traits:
    - validates-json-body:
        description: Validates incoming request body
        responses:
            400:
                description: |
                    JSON did not validate against schema for this endpoint

/download: !include resources/download.raml
/upload/label: !include resources/upload-by-label.raml
/upload/uid: !include resources/upload-by-uid.raml
/upload/uid-match: !include resources/upload-match-uid.raml
/clean-packfiles: !include resources/clean-packfiles.raml
/engine: !include resources/engine.raml
/sites: !include resources/sites.raml
/config: !include resources/config.raml
/config.js: !include resources/config-js.raml
/version: !include resources/version.raml
/users: !include resources/users.raml
/jobs: !include resources/jobs.raml
/gears: !include resources/gears.raml
/rules: !include resources/rules.raml
/groups: !include resources/groups.raml
/projects: !include resources/projects.raml


formatting fix for api spec

formatting fix for api spec

#%RAML 0.8
title: OpenBEL API
version: 0.0.2
baseUri: http://next.belframework.org
schemas:
  - completion_collection: !include http://next.belframework.org/schema/completion_collection.schema.json
  - evidence_collection:   !include http://next.belframework.org/schema/evidence_collection.schema.json
  - evidence:              !include http://next.belframework.org/schema/evidence.schema.json
/api:
  description: The root resource collection.
  options:
    description: Returns allowable HTTP methods.
    responses:
      200:
        headers:
          Accept:
            description: Allowable HTTP methods.
            type:        string
            enum:        [ 'OPTIONS', 'POST', 'GET', 'PUT', 'DELETE' ]
  get:
    headers:
        Accept:
          displayName: Accept
    responses:
      200:
        body:
          application/hal+json:
            example: |
              {
                "_links": {
                  "item": [
                    {
                      "href": "http://next.belframework.org/api/evidence"
                    },
                    {
                      "href": "http://next.belframework.org/api/expressions"
                    },
                    {
                      "href": "http://next.belframework.org/api/functions"
                    },
                    {
                      "href": "http://next.belframework.org/api/namespaces"
                    }
                  ]
                }
              }
  /annotations:
    description: Represents the annotation resource collection.
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
    get:
      description: Retrieves all annotation resources.
    /{annotation}:
      description: Represents a single annotation resource.
      options:
        description: Returns allowable HTTP methods.
        responses:
          200:
            headers:
              Accept:
                description: Allowable HTTP methods.
                type:        string
      get:
        description: Retrieves an annotation resource.
      /{annotation}/values:
        description: Represents all annotation value resources available on the annotation resource identified by *{annotation}*.
        options:
          description: Returns allowable HTTP methods.
          responses:
            200:
              headers:
                Accept:
                  description: Allowable HTTP methods.
                  type:        string
        /{value}:
          description: Represents a single annotation value resources available on the annotation resource identified by *{annotation}* and *{value}*.
          options:
            description: Returns allowable HTTP methods.
            responses:
              200:
                headers:
                  Accept:
                    description: Allowable HTTP methods.
                    type:        string
          get:
            description:
  /evidence:
    description: |
      Operate on the evidence resource collection.

      *Operations*

      - Filter the evidence resource collection using `GET /evidence` with query parameters.
      - Retrieve an evidence resource using `GET /evidence/{id}`.
      - Create a new evidence resource using `POST /evidence` with a supported content type.
      - Update an existing evidence resource using `PUT /evidence/{id}` with a supported content type.
      - Delete an existing evidence resource using `DELETE /evidence/{id}`.

    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
    post:
      description: |
        Create an evidence resource.

        Include a *profile* parameter in the *Content-Type* header to convey the schema evidence schema for the JSON document.

        *Example*:

        - `Content-Type: application/json; profile=http://next.belframework.org/schema/evidence.schema.json`
      responses:
        201:
          description: |
            *201 Created*

            The evidence resource was created.

            The link to the evidence resource is conveyed is the *Link* header.
        415:
          description: |
            *415 Unsupported Media Type*

            The evidence resource body was not a supported media type..
      body:
        application/json:
          schema: evidence
          example: |
            {
              "evidence": {
                "bel_statement": "a(CHEBI:\"reactive oxygen species\") increases r(HGNC:JUN)",
                "citation": {
                  "type": "PubMed",
                  "name": "Free Radic Biol Med 2000 Feb 1 28(3) 463-99",
                  "id": "10699758"
                },
                "biological_context": {
                  "Species": "9606",
                  "CellLine": "LNCAP cell",
                  "Anatomy": "prostate gland",
                  "Cell": "fibroblast",
                  "Disease": "leukemia"
                },
                "metadata": {
                  "status": "Approved"
                }
              }
            }
    get:
      description: |
        Retrieve the evidence resource collection.

        All evidence resources will be returned by default.

        The collection can be returned page by page by providing a *start* (defaults to `0`) index and *size* (defaults to no size limit) to return.

        This collection can be filtered by providing one or more *filter* options. A filter specifies the *category*, *name*, and *value* of the filter and is encoded as a JSON object. For example an evidence metadata filter might be encoded as:

        ```json
          {
            "category": "metadata",
            "name": "status",
            "value": "Approved"
          }
        ```

        This collection can specify the *faceted* boolean option. Facets will reflect all (possibly filtered) evidence resources irrespective of *start* and *size* paging.

        Facts are an array of facet objects that are composed of a *filter* and *count*. For example for the evidence metadata filter the facet object would be encoded as:

        ```json
          {
            "category": "metadata",
            "name": "status",
            "value": "Approved",
            "filter": "{\"category\": \"metadata\", \"name\": \"status\", \"value\": \"Approved \"}",
            "count": 10200
          }
        ```

        The *filter* property value can be used as a *filter* option. This is intended to support filtering the evidence resource collection by selected facets.
      headers:
        Accept:
          displayName: Accept
          description: |
            The Accept header informs the server which media types the client accepts.
      queryParameters:
        start:
          type: integer
          description: |
            The evidence resource to start from for paging purposes.
          example: 100
          required: false
        size:
          type: integer
          description: |
            The size of the evidence resource collection to retrieve. This will return a clice of the evidence resource collection relative to *start*.
          example: 100
          required: false
        filter:
          type: string
          description: |
            A filter to apply to the evidence resource collection to narrow the resources retrieved.
          example: |
            {"category":"context","name":"Anatomy","value":"prostate gland"}
          required: false
        faceted:
          type: string
          description: |
            The boolean indicator to provided faceted results for the evidence resource collection. The default is to not facet.
          enum: [ 'true', 'yes', '1', 'on' ]
          example: yes
      responses:
        200:
          description: |
            An example request for this resource might be:

            - Path: `/api/evidence`
            - Query parameters:
              - `start=0`
              - `size=1`
              - `faceted=yes`
              - `filter`
              ```json
              {
                "category":"biological_context",
                "name":"Anatomy",
                "value":"prostate gland"
              }
              ```

          body:
            application/json:
              schema: evidence_collection
              example: |
                {
                  "evidence": [
                    {
                      "bel_statement": "p(HGNC:CDH1) decreases cat(complex(p(HGNC:ITGAV),p(HGNC:ITGB5)))",
                      "citation": {
                        "type": "Other",
                        "name": "Landes Bioscience - Altered Integrin Expression in Three Common Types of Human Cancer=Breast Cancer",
                        "id": "Landes Bioscience - Altered Integrin Expression in Three Common Types of Human Cancer=Breast Cancer"
                      },
                      "biological_context": {
                        "Species": "9606"
                      },
                      "metadata": {
                        "status": "Review"
                      }
                    }
                  ]
                  "facets": [
                    {
                      "category": "context",
                      "name": "Species",
                      "value": "9606",
                      "filter": "{\"category\":\"context\",\"name\":\"Species\",\"value\":\"9606\"}",
                      "count": 49071
                    },
                    {
                      "category": "context",
                      "name": "Species",
                      "value": "10090",
                      "filter": "{\"category\":\"context\",\"name\":\"Species\",\"value\":\"10090\"}",
                      "count": 19416
                    },
                    {
                      "category": "metadata",
                      "name": "status",
                      "value": "Review",
                      "filter": "{\"category\":\"metadata\",\"name\":\"status\",\"value\":\"Review\"}",
                      "count": 18954
                    },
                    {
                      "category": "metadata",
                      "name": "status",
                      "value": "Approved",
                      "filter": "{\"category\":\"metadata\",\"name\":\"status\",\"value\":\"Approved\"}",
                      "count": 18947
                    },
                    {
                      "category": "metadata",
                      "name": "status",
                      "value": "Rejected",
                      "filter": "{\"category\":\"metadata\",\"name\":\"status\",\"value\":\"Rejected\"}",
                      "count": 18896
                    },
                    {
                      "category": "metadata",
                      "name": "status",
                      "value": "Draft",
                      "filter": "{\"category\":\"metadata\",\"name\":\"status\",\"value\":\"Draft\"}",
                      "count": 18784
                    },
                    {
                      "category": "context",
                      "name": "Species",
                      "value": "10116",
                      "filter": "{\"category\":\"context\",\"name\":\"Species\",\"value\":\"10116\"}",
                      "count": 7091
                    },
                    {
                      "category": "context",
                      "name": "Anatomy",
                      "value": "liver",
                      "filter": "{\"category\":\"context\",\"name\":\"Anatomy\",\"value\":\"liver\"}",
                      "count": 2357
                    }
                  ]
                }
    /{identifier}:
      description:
      options:
        description: Returns allowable HTTP methods.
        responses:
          200:
            headers:
              Accept:
                description: Allowable HTTP methods.
                type:        string
      get:
      put:
        description: |
          Replaces an evidence resource identified by *{identifier}*.

          Include a *profile* parameter in the *Content-Type* header to convey the schema evidence schema for the JSON document.

          *Example*:

          - `Content-Type: application/json; profile=http://next.belframework.org/schema/evidence.schema.json`
        body:
          application/json:
            schema: evidence
            example: |
              {
                "evidence": [
                  {
                    "bel_statement": "a(CHEBI:\"reactive oxygen species\") increases r(HGNC:JUN)",
                    "citation": {
                      "type": "PubMed",
                      "name": "Free Radic Biol Med 2000 Feb 1 28(3) 463-99",
                      "id": "10699758"
                    },
                    "biological_context": {
                      "Species": "9606",
                      "CellLine": "LNCAP cell",
                      "Anatomy": "prostate gland",
                      "Cell": "fibroblast",
                      "Disease": "leukemia"
                    },
                    "metadata": {
                      "status": "Approved"
                    }
                  }
                ]
              }
        responses:
          202:
            description: |
              *202 Accepted*

              The replacement for the evidence resource will be applied.
          404:
            description: |
              *404 Not Found*

              An evidence resource, identified by *{identifier}*, does not exist.
          415:
            description: |
              *415 Unsupported Media Type*

              The evidence resource body was not a supported media type.
      patch:
      delete:
  /expressions/{bel}/completions:
    description: |
      Retrieve completions for the *BEL* expression fragment. The caret position to complete from defaults to the end of *BEL* expression fragment.

      Examples:

        - *aabund* yields functions *microRNAAbundance* and *rnaAbundance*
        - *p(H* yields functions *chaperoneActivity*, *pathology*, *phosphataseActivity* and namespace prefixes *CHEBI*, *CHEBIID*, *HGNC*, *MESHCS*, *MESHD*, *MESHPP*, *SCHEM*
        - *tscript(p(HGNC:* yields namespace values *AKT1*, *AKT2*, etc.

      Custom Caret Position:

      The caret position can be provided to indicate where to complete from.

      Examples:

        - *pro(HGNC:*, *caret_position*: `2` yields functions *biologicalProcess*, *products*, *proteinAbundance*, and *proteinModification*
    uriParameters:
      bel:
        type: string
        description: BEL statement fragment; Completions will be provided for this input.
        required: false
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
    get:
      description: |
        Retrieve completions for the *BEL* expression fragment. The caret position to complete from defaults to the end of *BEL* expression fragment.

        Examples:

        - *aabund* yields functions *microRNAAbundance* and *rnaAbundance*
        - *p(H* yields functions *chaperoneActivity*, *pathology*, *phosphataseActivity* and namespace prefixes *CHEBI*, *CHEBIID*, *HGNC*, *MESHCS*, *MESHD*, *MESHPP*, *SCHEM*
        - *tscript(p(HGNC:* yields namespace values *AKT1*, *AKT2*, etc.

        Custom Caret Position:

        The caret position can be provided to indicate where to complete from.

        Examples:

        - *pro(HGNC:*, *caret_position*: `2` yields functions *biologicalProcess*, *products*, *proteinAbundance*, and *proteinModification*
      headers:
        Accept:
          displayName: Accept
      queryParameters:
        caret_position:
          type: integer
          description: The position of the caret within the *bel* input. Defaults to the right-most caret_position for *bel* (e.g. length of *bel* input).
          example: 0
          required: false
      responses:
        200:
          body:
            application/json:
              example: |
                {
                  "completions": [
                    {
                      "type": "namespace_prefix",
                      "label": "HGNC",
                      "value": "HGNC:",
                      "highlight": {
                        "start_position": 2,
                        "end_position": 3,
                        "range_type": "inclusive"
                      },
                      "actions": [
                        {
                          "delete": {
                              "start_position": 2,
                              "end_position": 3,
                              "range_type": "inclusive"
                          },
                          "insert": {
                              "position": 2,
                              "value": "HGNC:"
                          },
                          "move_cursor": {
                              "position": 7
                          }
                        }
                      ]
                    }
                  ]
                }
              schema: completion_collection
  /functions:
    description: Retrieve the BEL function resource collection.
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
    get:
      headers:
        Accept:
          displayName: Accept
      responses:
        200:
  /functions/{fx}:
    description: Retrieve a BEL function resource.
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
    get:
      headers:
        Accept:
          displayName: Accept
      responses:
        200:
  /namespaces:
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
  /namespaces/{namespace}:
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
  /namespaces/{namespace}/equivalents:
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
    post:
  /namespaces/{namespace}/orthologs:
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
    post:
  /namespaces/{namespace}/{value}:
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
  /namespaces/{namespace}/{value}/equivalents/{target}:
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
  /namespaces/{namespace}/{value}/orthologs/{target}:
    options:
      description: Returns allowable HTTP methods.
      responses:
        200:
          headers:
            Accept:
              description: Allowable HTTP methods.
              type:        string
# vim: ft=yaml sw=2 ts=2 sts=2 expandtab:


Added Extra element.

Added Extra element.

Added Extra element in the form of a list of Key/Valyue pairs.

#%RAML 1.0
title: AquaDesk API
version: 1.0
securitySchemes:
  basic:
      description: This API supports Basic Authentication.
      type: Basic Authentication
baseUri: http://digitaldelta.aquadesk.nl
mediaType: [ application/json ]
description: Digital Delta API

protocols:
  - HTTP
  - HTTPS

# Base types
types:
  Double:
    type: number
    format: double

  KeyValuePair:
    properties:
      key:
        type: string
      value:
        type: string

  Geometry:
    properties:
      type:
        type: string
      coordinates:
        type: Double[]

  Node:
    description: Node objects contain the properties of the data node. A node is an operational implementation of the Digital Delta specification.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      name:
        type: string
        required: true
      description:
        type: string
        required: true
      baseUrl:
        type: string
        required: true

  Location:
    description: Location that may have measurements.
    type: object
    properties:
      url:
        type: string
        description: Url of the location.
      code:
        type: string
        description: Code of the location.
      name:
        type: string
        description: Name of the location.
      geometry:
        type: Geometry
        description: GeoJSON formatted geometry of the location.

  LocationWithNode:
    description: Location that may have measurements including node.
    type: object
    properties:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      url:
        type: string
        description: Url of the location.
      code:
        type: string
        description: Code of the location.
      name:
        type: string
        description: Name of the location.
      geometry:
        type: Geometry
        description: GeoJSON formatted geometry of the location.
      node:
        type: Node

  Datasource:
    description: DataSource (“bronhouder” in Dutch) objects describe the source of the data. A node can have multiple data sources.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      name:
        type: string
        required: true
      node:
        type: Node
        required: true

  ObservationType:
    description: Typing of a measurement.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      quantity:
        type: string
        description: The quantity measured.
        examples: [ "ZICHT", "MONSTER", "CONCTTE", "AANTL" ]
        required: true
      unit:
        type: string
        description: Unit of measurement.
        examples: [ "cm2", "n", "n/m3" ]
        required: true
      parameter:
        type: string
        description: Parameter measured.
        required: false
        examples: [ "Pediastrum", "Tetraedron hastatum" ]
      compartment:
        type: string
        required: false
        description: Compartment in which the measurement was performed.
        examples: [ "OW" ]
      qualifier:
        type: string
        required: false
        description: 'Hoedanigheid'
        examples: [ "AD", "JU", "T20C", "KO" ]
      extra:
        type: KeyValuePair[]

  Event:
    description: |
      Event objects contain the actual value of each observation. |
      Each observation contains a timestamp and a value. There is an optional quality parameter.
    properties:
      value:
        type: number
        required: true
        example: 37.0
      timeStamp:
        type: datetime
        required: false
        example: 2016-12-31T12:45:00Z
      quality:
        type: string
        required: false
        example: "99"
      limitSymbol:
        type: string
        required: false
        examples: ["<", ">", "="]

  TimeseriesEvent:
    description: |
      Event objects contain the actual value of each observation. |
      Each observation contains a timestamp and a value. There is an optional quality parameter.
    properties:
      value:
        type: number
        required: true
        example: 37.0
      timeStamp:
        type: datetime
        required: false
        example: 2016-12-31T12:45:00Z

  TimeseriesType:
    description: |
      TimeSeriesType objects describe the type of measurement the timeseries contains. |
      These can be for example raw measurements, but also aggregations or simulations. |
      This information could be needed to correctly interpret the measurement values
    type: object
    properties:
      code:
        type: string
        required: true
        example: MEAS
      name:
        type: string
        required: true
        example: Measurement

  Timeseries:
    description: |
      Timeseries objects contain all information needed to interpret timeseries. |
      There are references to other objects, such as Node, Location, DataSource, ObservationType and TimeseriesType. |
      The TimeseriesType should be added as a reference because it can indicate if a timeseries containts a RAW dataset or makes use of the current measurements. |
      The Digital Delta specification of timeseries makes no assumptions on the nature of the series, timeseries may describe any series of data points of |
      the same observation type and datasource in time on one location. |
      This includes both equidistant series (fixed time interval between data points) and non-equidistant series (with varying time interval).
    type: object
    properties:
      url:
        type: string
        required: true
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      code:
        type: string
        required: true
      location:
        type: LocationWithNode
        required: true
      observationType:
        type: ObservationType
        required: true
      node:
        type: Node
        required: true
      datasource:
        type: Datasource
        required: true
      timeseriesType:
        type: TimeseriesType
        required: true
      interval:
        type: number
        required: false
      valueType:
        type: string
        required: false
      start:
        type: datetime
        required: true
        example: 2016-01-01T12:45:00Z
      end:
        type: datetime
        required: true
        example: 2016-01-01T12:45:00Z
      events:
        type: TimeseriesEvent[]

# List responses
  NodeListResponse:
    description: Response for a node list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: Node[]
        description: List of Nodes.

  DatasourceListResponse:
    description: Response for a data source list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: Datasource[]
        description: List of Datasource.

  LocationListResponse:
    description: Response for a location list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: LocationWithNode[]
        description: List of Locations.

  ObservationTypeListResponse:
    description: Response for a observation type list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: ObservationType[]
        description: List of observation types.

  TimeseriesListResponse:
    description: Response for a time series list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: Timeseries[]
        description: List of timeseries types.

  LocationPostRequest:
    description: Location filter request
    type: object
    properties:
      code:
        type: string[]

  TimeseriesPostRequest:
    description: Timeseries filter request
    type: object
    properties:
      code:
        type: string[]
      start:
        type: date-only
      end:
        type: date-only

# Methods
/datasources:
  get:
    queryParameters:
      page:
        description: Page number to retrieve. Starts at 1.
        required: false
        type: integer
      pagesize:
        description: Page size, minimum 1, maximum 10000.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
      uuid:
        required: false
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      name:
        required: false
        type: string
    responses:
      200:
        body:
          application/json:
            type: DatasourceListResponse
  /{uuid}:
    description: Request a specific datasource by its Uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
    get:
      responses:
        200:
          body:
            application/json:
              type: Datasource
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid data source"}
/nodes:
  get:
    queryParameters:
      page:
        description: Page number to retrieve. Starts at 1.
        required: false
        type: integer
      pagesize:
        description: Page size, minimum 1, maximum 10000.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
      uuid:
        required: false
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      name:
        required: false
        type: string
    responses:
      200:
        body:
          application/json:
            type: NodeListResponse
  /{uuid}:
    description: Request a specific node by its Uuid.
    uriParameters:
      uuid:
        type: string
    get:
      responses:
        200:
          body:
            application/json:
              type: Node
        404:
          body:
            application/json:
              type: object
              example:
                {"message": "Invalid node source"}

/observationtypes:
  description: Request a list of observation types.
  get:
    queryParameters:
      page:
        description: Page number to retrieve. Starts at 1.
        required: false
        type: integer
      pagesize:
        description: Page size, minimum 1, maximum 10000.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
      parameter:
        description: Parameters
        required: false
        type: string[]
    responses:
      200:
        body:
          application/json:
            type: ObservationTypeListResponse
  /{uuid}:
    description: Request a specific observation type by its Uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
    get:
      responses:
        200:
          body:
            application/json:
              type: ObservationType
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid observation type source"}

/locations:
  description: Request a list of locations, with optional filter parameters.
  get:
    queryParameters:
      in_bbox:
        description: Bounding box representing a rectangle in which the locations must lie.
        required: false
        type: string
      page:
        description: Page number to retrieve. Starts at 1.
        required: false
        type: integer
        minimum: 1
      pagesize:
        description: Page size, minimum 1, maximum 10000.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
      name:
        required: false
        type: string
        description: (Partial) location name.
      node:
        required: false
        type: string
        description: Node.
      uuid:
        type: string
        required: false
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: Node.
      code:
        required: false
        type: string
        description: (Partial) location code.
    responses:
      200:
        body:
          application/json:
            type: LocationListResponse
  /{uuid}:
    description: Request a specific location by its Uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: Location code
    get:
      responses:
        200:
          body:
            application/json:
              type: Location
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid location code"}

  post:
    body:
      application/json:
        type: LocationPostRequest
    responses:
      200:
        body:
          application/json:
            type: LocationListResponse
      404:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}
/timeseries:
  description: Retrieve timeseries.
  get:
    queryParameters:
      page:
        required: false
        type: integer
        minimum: 1
        description: Page number to retrieve. Starts at 1.
      pagesize:
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        description: Page size of the page to retrieve. Minimum is 1, maximum is 10000.
      start:
        type: datetime
        required: false
        description: Retrieve measurements that are measured on or after this date.
      end:
        type: datetime
        required: false
        description: Retrieve measurements that are measured before or on this date.
      locationfilter:
        type: string
        required: false
        description: Retrieve measurements that were measured at a location with a name like the locationfilter.
      observationType:
        type: string
        required: false
        description: Uuid of the observation type.
      timeseriesType:
        type: string
        required: false
        description: Code of the time series. AquaDesk only supports MEAS.
      node:
        required: false
        type: string
        description: Node.
      code:
        required: false
        type: string
        description: Code.
      uuid:
        type: string
        required: false
        description: Node.
      valueType:
        type: string
        required: false
        description: Value type.
        example: "float"
    responses:
      200:
        body:
          application/json:
            type: TimeseriesListResponse
      404:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}
  post: # post bodies define filters
    body:
      application/json:
        type: TimeseriesPostRequest
    responses:
      200:
        body:
          application/json:
            type: TimeseriesListResponse
      404:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}
  /{uuid}:
    description: Request a specific timeseries by its Uuid.
    uriParameters:
      uuid:
        type: string
        description: Time series uuid
    get:
      responses:
        200:
          body:
            application/json:
              type: Timeseries
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid time series"}
    /data:
      get:
        queryParameters:
          start:
            type: date-only
            required: false
          end:
            type: date-only
            required: false
        responses:
          200:
            body:
              application/json:
                type: Event[]
          404:
            body:
              application/json:
                type: object
                example: |
                  {"message": "Invalid time series"}

#%RAML 1.0
title: Digital Delta API
version: 1.0
securitySchemes:
  basic:
      description: This API supports Basic Authentication.
      type: Basic Authentication
baseUri: http://digitaldelta.aquadesk.nl
mediaType: [ application/json ]
description: Digital Delta API

protocols:
  - HTTP
  - HTTPS

# Base types
types:
  Double:
    type: number
    format: double

  Geometry:
    properties:
      type:
        type: string
      coordinates:
        type: Double[]

  Location:
    description: Location that may have measurements.
    type: object
    properties:
      url:
        type: string
        description: Url of the location.
      code:
        type: string
        description: Code of the location.
      name:
        type: string
        description: Name of the location.
      geometry:
        type: Geometry
        description: GeoJSON formatted geometry of the location.

  Node:
    description: Node objects contain the properties of the data node. A node is an operational implementation of the Digital Delta specification.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      name:
        type: string
        required: true
      description:
        type: string
        required: true
      baseUrl:
        type: string
        required: true

  LocationWithNode:
    description: Location that may have measurements including node.
    type: object
    properties:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      url:
        type: string
        description: Url of the location.
      code:
        type: string
        description: Code of the location.
      name:
        type: string
        description: Name of the location.
      geometry:
        type: Geometry
        description: GeoJSON formatted geometry of the location.
      node:
        type: Node

  Datasource:
    description: DataSource (“bronhouder” in Dutch) objects describe the source of the data. A node can have multiple data sources.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      name:
        type: string
        required: true
      node:
        type: Node
        required: true

  ObservationType:
    description: Typing of a measurement.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      quantity:
        type: string
        description: The quantity measured.
        examples: [ "ZICHT", "MONSTER", "CONCTTE", "AANTL" ]
        required: true
      unit:
        type: string
        description: Unit of measurement.
        examples: [ "cm2", "n", "n/m3" ]
        required: true
      parameter:
        type: string
        description: Parameter measured.
        required: false
        examples: [ "Pediastrum", "Tetraedron hastatum" ]
      compartment:
        type: string
        required: false
        description: Compartment in which the measurement was performed.
        examples: [ "OW" ]
      qualifier:
        type: string
        required: false
        description: 'Hoedanigheid'
        examples: [ "AD", "JU", "T20C", "KO" ]

  Event:
    description: |
      Event objects contain the actual value of each observation. |
      Each observation contains a timestamp and a value. There is an optional quality parameter.
    properties:
      value:
        type: number
        required: true
        example: 37.0
      timeStamp:
        type: datetime
        required: false
        example: 2016-12-31T12:45:00Z
      quality:
        type: string
        required: false
        example: "99"
      limitSymbol:
        type: string
        required: false
        examples: ["<", ">", "="]

  TimeseriesEvent:
    description: |
      Event objects contain the actual value of each observation. |
      Each observation contains a timestamp and a value. There is an optional quality parameter.
    properties:
      value:
        type: number
        required: true
        example: 37.0
      timeStamp:
        type: datetime
        required: false
        example: 2016-12-31T12:45:00Z

  TimeseriesType:
    description: |
      TimeSeriesType objects describe the type of measurement the timeseries contains. |
      These can be for example raw measurements, but also aggregations or simulations. |
      This information could be needed to correctly interpret the measurement values
    type: object
    properties:
      code:
        type: string
        required: true
        example: MEAS
      name:
        type: string
        required: true
        example: Measurement

  Timeseries:
    description: |
      Timeseries objects contain all information needed to interpret timeseries. |
      There are references to other objects, such as Node, Location, DataSource, ObservationType and TimeseriesType. |
      The TimeseriesType should be added as a reference because it can indicate if a timeseries containts a RAW dataset or makes use of the current measurements. |
      The Digital Delta specification of timeseries makes no assumptions on the nature of the series, timeseries may describe any series of data points of |
      the same observation type and datasource in time on one location. |
      This includes both equidistant series (fixed time interval between data points) and non-equidistant series (with varying time interval).
    type: object
    properties:
      url:
        type: string
        required: true
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      code:
        type: string
        required: true
      location:
        type: LocationWithNode
        required: true
      observationType:
        type: ObservationType
        required: true
      node:
        type: Node
        required: true
      datasource:
        type: Datasource
        required: true
      timeseriesType:
        type: TimeseriesType
        required: true
      interval:
        type: number
        required: false
      valueType:
        type: string
        required: false
      start:
        type: datetime
        required: true
        example: 2016-01-01T12:45:00Z
      end:
        type: datetime
        required: true
        example: 2016-01-01T12:45:00Z
      events:
        type: TimeseriesEvent[]

# List responses
  NodeListResponse:
    description: Response for a node list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: Node[]
        description: List of Nodes.

  DatasourceListResponse:
    description: Response for a data source list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: Datasource[]
        description: List of Datasource.

  LocationListResponse:
    description: Response for a location list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: Location[]
        description: List of Locations.

  ObservationTypeListResponse:
    description: Response for a observation type list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: ObservationType[]
        description: List of observation types.

  TimeseriesListResponse:
    description: Response for a time series list request.
    type: object
    properties:
      count:
        description: Number of records satisfying the query parameters.
        type: number
        example: 1123
      previous:
        description: Link to the previous page
        type: string
      next:
        description: Link to the next page
        type: string
      maxpagesize:
        description: Maximum page size
        type: number
      results:
        type: Timeseries[]
        description: List of timeseries types.

  LocationPostRequest:
    description: Location filter request
    type: object
    properties:
      code:
        type: string[]

  TimeseriesPostRequest:
    description: Timeseries filter request
    type: object
    properties:
      code:
        type: string[]
      start:
        type: date-only
        required: false
      end:
        type: date-only
        required: false

# Methods
/datasources:
  get:
    queryParameters:
      page:
        description: Page number to retrieve. Starts at 1.
        required: false
        type: integer
      pagesize:
        description: Page size, minimum 1, maximum 10000.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
      uuid:
        required: false
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      name:
        required: false
        type: string
    responses:
      200:
        body:
          application/json:
            type: DatasourceListResponse
  /{uuid}:
    description: Request a specific datasource by its Uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
    get:
      responses:
        200:
          body:
            application/json:
              type: Datasource
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid data source"}
/nodes:
  get:
    queryParameters:
      page:
        description: Page number to retrieve. Starts at 1.
        required: false
        type: integer
      pagesize:
        description: Page size, minimum 1, maximum 10000.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
      uuid:
        required: false
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
      name:
        required: false
        type: string
    responses:
      200:
        body:
          application/json:
            type: NodeListResponse
  /{uuid}:
    description: Request a specific node by its Uuid.
    uriParameters:
      uuid:
        type: string
    get:
      responses:
        200:
          body:
            application/json:
              type: Node
        404:
          body:
            application/json:
              type: object
              example:
                {"message": "Invalid node source"}

/observationtypes:
  description: Request a list of observation types.
  get:
    queryParameters:
      page:
        description: Page number to retrieve. Starts at 1.
        required: false
        type: integer
      pagesize:
        description: Page size, minimum 1, maximum 10000.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
    responses:
      200:
        body:
          application/json:
            type: ObservationTypeListResponse
  /{uuid}:
    description: Request a specific observation type by its Uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
    get:
      responses:
        200:
          body:
            application/json:
              type: ObservationType
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid observation type source"}

/locations:
  description: Request a list of locations, with optional filter parameters.
  get:
    queryParameters:
      in_bbox:
        description: Bounding box representing a rectangle in which the locations must lie.
        required: false
        type: string
      page:
        description: Page number to retrieve. Starts at 1.
        required: false
        type: integer
        minimum: 1
      pagesize:
        description: Page size, minimum 1, maximum 10000.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
      name:
        required: false
        type: string
        description: (Partial) location name.
      node:
        required: false
        type: string
        description: Node.
      uuid:
        type: string
        required: false
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: Node.
      code:
        required: false
        type: string
        description: (Partial) location code.
    responses:
      200:
        body:
          application/json:
            type: LocationListResponse
  /{uuid}:
    description: Request a specific location by its Uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: Location code
    get:
      responses:
        200:
          body:
            application/json:
              type: Location
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid location code"}

  post:
    body:
      application/json:
        type: LocationPostRequest
    responses:
      200:
        body:
          application/json:
            type: LocationListResponse
      404:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}
/timeseries:
  description: Retrieve timeseries.
  get:
    queryParameters:
      page:
        required: false
        type: integer
        minimum: 1
        description: Page number to retrieve. Starts at 1.
      pagesize:
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        description: Page size of the page to retrieve. Minimum is 1, maximum is 10000.
      start:
        type: datetime
        required: false
        description: Retrieve measurements that are measured on or after this date.
      end:
        type: datetime
        required: false
        description: Retrieve measurements that are measured before or on this date.
      locationfilter:
        type: string
        required: false
        description: Retrieve measurements that were measured at a location with a name like the locationfilter.
      observationType:
        type: string
        required: false
        description: Uuid of the observation type.
      timeseriesType:
        type: string
        required: false
        description: Code of the time series. AquaDesk only supports MEAS.
      node:
        required: false
        type: string
        description: Node.
      code:
        required: false
        type: string
        description: Code.
      uuid:
        type: string
        required: false
        description: Node.
      valueType:
        type: string
        required: false
        description: Value type.
        example: "float"
    responses:
      200:
        body:
          application/json:
            type: TimeseriesListResponse
      404:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}
  post: # post bodies define filters
    body:
      application/json:
        type: TimeseriesPostRequest
    responses:
      200:
        body:
          application/json:
            type: TimeseriesListResponse
      404:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}
  /{uuid}:
    description: Request a specific timeseries by its Uuid.
    uriParameters:
      uuid:
        type: string
        description: Time series uuid
    get:
      responses:
        200:
          body:
            application/json:
              type: Timeseries
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid time series"}
    /data:
      get:
        queryParameters:
          start:
            type: date-only
            required: false
          end:
            type: date-only
            required: false
        responses:
          200:
            body:
              application/json:
                type: Event[]
          404:
            body:
              application/json:
                type: object
                example: |
                  {"message": "Invalid time series"}