updated evidence examples based on species change

#%RAML 0.8
title: OpenBEL API
version: 0.0.2
baseUri: http://next.belframework.org
schemas:
  - annotation:                            !include http://next.belframework.org/schema/annotation.schema.json
  - annotation_resource:                   !include http://next.belframework.org/schema/annotation_resource.schema.json
  - annotation_collection:                 !include http://next.belframework.org/schema/annotation_collection.schema.json
  - completion:                            !include http://next.belframework.org/schema/completion.schema.json
  - completion_collection:                 !include http://next.belframework.org/schema/completion_collection.schema.json
  - evidence:                              !include http://next.belframework.org/schema/evidence.schema.json
  - evidence_collection:                   !include http://next.belframework.org/schema/evidence_collection.schema.json
  - match_result:                          !include http://next.belframework.org/schema/match_result.schema.json
  - match_result_collection:               !include http://next.belframework.org/schema/match_result_collection.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.
      responses:
        200:
          body:
            application/json:
              schema:  annotation_collection
              example: !include http://next.belframework.org/example/annotation_collection.example.json
    /{annotation}:
      description: Represents a single annotation resource.
      uriParameters:
        annotation:
          type: string
          description: An identifier string for an annotation. This is either the annotation name or prefix.
          required: true
      options:
        description: Returns allowable HTTP methods.
        responses:
          200:
            headers:
              Accept:
                description: Allowable HTTP methods.
                type:        string
      get:
        description: Retrieves an annotation resource.
        responses:
          200:
            body:
              application/json:
                schema:  annotation_resource
                example: !include http://next.belframework.org/example/annotation_resource.example.json
      /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:
        /match-results/{match}:
          description: Represents a resource collection of match_results for annotation values.
          uriParameters:
            match:
              type: string
              description: A string to match against the properties of an annotation. This includes identifier, name, and synonyms.
              required: true
          options:
            description: Returns allowable HTTP methods.
            responses:
              200:
                headers:
                  Accept:
                    description: Allowable HTTP methods.
                    type:        string
          get:
            description: Returns a match_results resource collection that represent annotation values found by *{match}*.
            responses:
              200:
                body:
                  application/json:
                    schema: match_result_collection
  /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",
                  "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:

#%RAML 0.8
title: OpenBEL API
version: 0.0.2
baseUri: http://next.belframework.org
schemas:
  - annotation:                            !include http://next.belframework.org/schema/annotation.schema.json
  - annotation_resource:                   !include http://next.belframework.org/schema/annotation_resource.schema.json
  - annotation_collection:                 !include http://next.belframework.org/schema/annotation_collection.schema.json
  - completion:                            !include http://next.belframework.org/schema/completion.schema.json
  - completion_collection:                 !include http://next.belframework.org/schema/completion_collection.schema.json
  - evidence:                              !include http://next.belframework.org/schema/evidence.schema.json
  - evidence_collection:                   !include http://next.belframework.org/schema/evidence_collection.schema.json
  - match_result:                          !include http://next.belframework.org/schema/match_result.schema.json
  - match_result_collection:               !include http://next.belframework.org/schema/match_result_collection.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.
      responses:
        200:
          body:
            application/json:
              schema:  annotation_collection
              example: !include http://next.belframework.org/example/annotation_collection.example.json
    /{annotation}:
      description: Represents a single annotation resource.
      uriParameters:
        annotation:
          type: string
          description: An identifier string for an annotation. This is either the annotation name or prefix.
          required: true
      options:
        description: Returns allowable HTTP methods.
        responses:
          200:
            headers:
              Accept:
                description: Allowable HTTP methods.
                type:        string
      get:
        description: Retrieves an annotation resource.
        responses:
          200:
            body:
              application/json:
                schema:  annotation_resource
                example: !include http://next.belframework.org/example/annotation_resource.example.json
      /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:
        /match-results/{match}:
          description: Represents a resource collection of match_results for annotation values.
          uriParameters:
            match:
              type: string
              description: A string to match against the properties of an annotation. This includes identifier, name, and synonyms.
              required: true
          options:
            description: Returns allowable HTTP methods.
            responses:
              200:
                headers:
                  Accept:
                    description: Allowable HTTP methods.
                    type:        string
          get:
            description: Returns a match_results resource collection that represent annotation values found by *{match}*.
            responses:
              200:
                body:
                  application/json:
                    schema: match_result_collection
  /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:


bumped docs; mostly for GET /api/evidence

refs #12

#%RAML 0.8
title: OpenBEL API
version: 0.0.2
baseUri: http://next.belframework.org
/api:
  description: The root resource collection.
  get:
    headers:
        Accept:
          displayName: Accept
    responses:
      200:
        body:
          application/hal+json:
            example: |
              {
                "_links": {
                  "item": [
                    {
                      "href": "http://next.belframework.org/api/annotations"
                    },
                    {
                      "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.
    get:
      description: Retrieves all annotation resources.
    /{annotation}:
      description: Represents a single annotation resource.
      get:
        description: Retrieves an annotation resource.
      /{annotation}/values:
        description: Represents all annotation value resources available on the annotation resource identified by *{annotation}*.
        /{value}:
          description: Represents a single annotation value resources available on the annotation resource identified by *{annotation}* and *{value}*.
          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}`.

    post:
      description: Create an evidence resource.
    get:
      description: |
        Retrieve the evidence resource collection.

        This collection must be paged using *offset* (defaults to `0`) as the start index and *length* (defaults to `100`) as the number of evidence resources to return.

        This collection can be filtered by specifying one or more *filter* query parameters. A filter query parameter specifies the *category*, *name*, and *value* of the filter and is encoded as a JSON object. For example the citation id filter might be encoded as:

        ```json
          {
            "category": "citation",
            "name": "id",
            "value": "133785101"
          }
        ```

        This collection includes a *facets* array where each facet value is captured individually. For example for the citation id filter the facet object would be encoded as:

        ```json
          {
            "category": "citation",
            "name": "id",
            "value": "133785101",
            "filter": "{\"category\": \"citation\", \"name\": \"id\", \"value\": \"133785101\"}",
            "count": 25
          }
        ```

        The *filter* property value has the same form as the *filter* query parameter. 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:
        offset:
          type: integer
          description: The evidence resource index that starts a page of the evidence resource collection.
          example: 0
          required: false
        length:
          type: integer
          description: The length of the evidence resource collection to retrieve.
          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
      responses:
        200:
          description: |
            An example path for this resource might be `http://next.belframework.org/api/evidence?offset=0&length=1&filter={%22category%22:%22context%22,%22name%22:%22Anatomy%22,%22value%22:%22prostate%20gland%22}`.
          body:
            application/json:
              example: |
                {
                  "_embedded": {
                    "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:
      get:
      put:
      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
    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: |
                [
                  {
                    "completion": {
                      "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: |
                {
                  "$schema": "http://json-schema.org/draft-04/schema",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "completion"
                    ],
                    "properties": {
                      "completion": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "type",
                          "label",
                          "value",
                          "highlight",
                          "actions"
                        ],
                        "properties": {
                          "type": {
                            "enum": [
                              "function",
                              "namespace_prefix",
                              "namespace_value"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          },
                          "highlight": {
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "start_position",
                                  "end_position",
                                  "range_type"
                                ],
                                "properties": {
                                  "start_position": {
                                    "type": "integer"
                                  },
                                  "end_position": {
                                    "type": "integer"
                                  },
                                  "range_type": {
                                    "enum": [
                                      "exclusive",
                                      "inclusive"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "actions": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "delete"
                                  ],
                                  "properties": {
                                    "delete": {
                                      "type": "object",
                                      "required": [
                                        "start_position",
                                        "end_position",
                                        "range_type"
                                      ],
                                      "properties": {
                                        "start_position": {
                                          "type": "integer"
                                        },
                                        "end_position": {
                                          "type": "integer"
                                        },
                                        "range_type": {
                                          "enum": [
                                            "exclusive",
                                            "inclusive"
                                          ]
                                        }
                                      }
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "insert"
                                  ],
                                  "properties": {
                                    "insert": {
                                      "type": "object",
                                      "required": [
                                        "position",
                                        "value"
                                      ],
                                      "properties": {
                                        "position": {
                                          "type": "integer"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      }
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "move_cursor"
                                  ],
                                  "properties": {
                                    "move_cursor": {
                                      "type": "object",
                                      "required": [
                                        "position"
                                      ],
                                      "properties": {
                                        "position": {
                                          "type": "integer"
                                        }
                                      }
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
  /functions:
    description: Retrieve the BEL function resource collection.
    get:
      headers:
        Accept:
          displayName: Accept
      responses:
        200:
  /functions/{fx}:
    get:
      headers:
        Accept:
          displayName: Accept
      responses:
        200:
  /namespaces:
  /namespaces/{namespace}:

  /namespaces/{namespace}/equivalents:
    post:
  /namespaces/{namespace}/orthologs:
    post:
  /namespaces/{namespace}/{value}:
  /namespaces/{namespace}/{value}/equivalents/namespaces/{target}:
  /namespaces/{namespace}/{value}/orthologs/namespaces/{target}:
# vim: ft=yaml sw=2 ts=2 sts=2 expandtab:

#%RAML 0.8
title: OpenBEL API
version: 0.0.2
baseUri: http://next.belframework.org
/api:
  description: The root resource collection.
  get:
    headers:
        Accept:
          displayName: Accept
    responses:
      200:
        body:
          application/hal+json:
            example: |
              {
                "_links": {
                  "item": [
                    {
                      "href": "http://next.belframework.org/api/expressions"
                    },
                    {
                      "href": "http://next.belframework.org/api/functions"
                    },
                    {
                      "href": "http://next.belframework.org/api/namespaces"
                    }
                  ]
                }
              }
  /expressions/{bel}/completions:
    description: Retrieve completions for the *BEL* expression fragment.
    uriParameters:
      bel:
        type: string
        description: BEL statement fragment; Completions will be provided for this input.
        required: false
    get:
      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: |
                [
                  {
                    "completion": {
                      "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: |
                {
                  "$schema": "http://json-schema.org/draft-04/schema",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "completion"
                    ],
                    "properties": {
                      "completion": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "type",
                          "label",
                          "value",
                          "highlight",
                          "actions"
                        ],
                        "properties": {
                          "type": {
                            "enum": [
                              "function",
                              "namespace_prefix",
                              "namespace_value"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          },
                          "highlight": {
                            "oneOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "start_position",
                                  "end_position",
                                  "range_type"
                                ],
                                "properties": {
                                  "start_position": {
                                    "type": "integer"
                                  },
                                  "end_position": {
                                    "type": "integer"
                                  },
                                  "range_type": {
                                    "enum": [
                                      "exclusive",
                                      "inclusive"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "actions": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "delete"
                                  ],
                                  "properties": {
                                    "delete": {
                                      "type": "object",
                                      "required": [
                                        "start_position",
                                        "end_position",
                                        "range_type"
                                      ],
                                      "properties": {
                                        "start_position": {
                                          "type": "integer"
                                        },
                                        "end_position": {
                                          "type": "integer"
                                        },
                                        "range_type": {
                                          "enum": [
                                            "exclusive",
                                            "inclusive"
                                          ]
                                        }
                                      }
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "insert"
                                  ],
                                  "properties": {
                                    "insert": {
                                      "type": "object",
                                      "required": [
                                        "position",
                                        "value"
                                      ],
                                      "properties": {
                                        "position": {
                                          "type": "integer"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      }
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "move_cursor"
                                  ],
                                  "properties": {
                                    "move_cursor": {
                                      "type": "object",
                                      "required": [
                                        "position"
                                      ],
                                      "properties": {
                                        "position": {
                                          "type": "integer"
                                        }
                                      }
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
  /evidence:
    description: Operate on the evidence resource collection.
    get:
      description: Retrieve the evidence resource collection. The evidence resources can be traversed by using the *start*.
      headers:
        Accept:
          displayName: Accept
      responses:
        200:
          body:
            application/json:
              example: |
                {
                  "total": 100,
                  "_links": {
                    "start": {
                        "href": "http://next.belframework.org/evidence/1334788813903791767"
                    }
                  }
                }
    delete:
      description: Delete the evidence resource collection.
  /evidence/{identifier}:
    description:
    get:
    put:
    patch:
    delete:
  /evidence/{identifier}/statement:
  /evidence/{identifier}/citation:
  /evidence/{identifier}/biological-context:
  /functions:
    description: Retrieve the BEL function resource collection.
    get:
      headers:
        Accept:
          displayName: Accept
      responses:
        200:
  /functions/{fx}:
    get:
      headers:
        Accept:
          displayName: Accept
      responses:
        200:
  /namespaces:
  /namespaces/{namespace}:

  /namespaces/{namespace}/equivalents:
    post:
  /namespaces/{namespace}/orthologs:
    post:
  /namespaces/{namespace}/{value}:
  /namespaces/{namespace}/{value}/equivalents/namespaces/{target}:
  /namespaces/{namespace}/{value}/orthologs/namespaces/{target}:
  /statements/{belstatement}:


removed unintended edit

removed unintended edit

#%RAML 0.8
---
title: Tracking API
baseUri: https://tracking.bring.com

documentation:
- title: Introduction
  content: |
      The tracking API provides the opportunity to track shipments by reference, package or shipment number. It is an easy way to display details and the status of shipments. The information available in this API is the same information available from the [Tracking web site](http://tracking.bring.com/). Response is available as either XML or JSON.

      *Oh by the way*, we also have a [Java client library](https://github.com/bring/bring-api-java) for the Tracking API.

- title: Authentication
  content: |
    If you are a Mybring user, you can authenticate requests to the Tracking API. Authenticated requests have the following benefits:

    - You get more information about your parcels, for example signatures for proof of develiery
    - No rate limiting

    See the [getting started guide on authentication](/api/#authentication) if you're not sure what this means.

    | Header | Example | Comment |
    |:-------|:--------|:--------|
    | `X-MyBring-API-Uid` | `john.doe@example.com` | Mybring login ID |
    | `X-MyBring-API-Key` | `1234abc-abcd-1234-5678-abcd1234abcd ` | Mybring login's API key |
    | `X-Bring-Client-URL` | `https://example.com/ ` | A URL that sort of identifies where you're using the APIs. |

    Those headers must be present for authenticating requests.

/tracking{mediaTypeExtension}:
  displayName: Tracking endpoint
  securedBy: [mybring_headers, null]
  description: |
      For testing you can use "TESTPACKAGE-AT-PICKUPPOINT" as the tracking number to generate test results. For real tracking this must be a valid number.

      You can find an XSD for the XML response here: [tracking-v1.xsd](/api/tracking/schemas/tracking-v1.xsd).

      A parcel has a number of events connected to it during its travel. Here are a list of current event statuses that can be returned.

      - ARRIVED_COLLECTION
      - ARRIVED_DELIVERY
      - CUSTOMS
      - COLLECTED
      - DELIVERED
      - DELIVERY_CANCELLED
      - DELIVERY_CHANGED
      - DELIVERY_ORDERED
      - DEVIATION
      - HANDED_IN
      - INTERNATIONAL
      - IN_TRANSIT
      - NOTIFICATION_SENT
      - PRE_NOTIFIED
      - READY_FOR_PICKUP
      - RETURN
      - TRANSPORT_TO_RECIPIENT

  uriParameters:
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to specify application/json or .xml to specify application/xml
  get:
    description: Get information about a shipment
    queryParameters:
      q:
        description: Reference, package number, shipment number to search for
        type: string
        required: true
        example: TESTPACKAGE-AT-PICKUPPOINT
      callback:
        description: JSONP callback function name
        type: string
        required: false

    responses:
      200:
        displayName: Successful response
        body:
          application/json:
            example: !include examples/testpackage.json
          application/xml:
            example: !include examples/testpackage.xml
            schema: !include schemas/tracking-v1.xsd
      250:
        displayName: Status - notification received
        description: |
          The example below is showing a package that have been EDI notified, but is not received by Bring.
        body:
          application/json:
            example: !include examples/notification_received.json
          application/xml:
            example: !include examples/notification_received.xml
      251:
        displayName: Status - waiting at pickup point
        description: |
          The example below is showing a package waiting for the recipient to collect it at a pickup point
        body:
          application/json:
            example: !include examples/waiting_at_pup.json
          application/xml:
            example: !include examples/waiting_at_pup.xml
      252:
        displayName: Status - loaded for delivery
        description: |
          The example below is showing a package that has been loaded on a distribution car for delivery to the reciepient.
        body:
          application/json:
            example: !include examples/loaded_for_delivery.json
          application/xml:
            example: !include examples/loaded_for_delivery.xml
      253:
        displayName: Status - delivered
        description: |
          The example below is showing a package that has been delivered to the reciepient.
        body:
          application/json:
            example: !include examples/delivered.json
          application/xml:
            example: !include examples/delivered.xml

#%RAML 0.8
---
title: Tracking API
baseUri: https://tracking.bring.com

documentation:
- title: Introduction
  content: |
      The tracking API provides the opportunity to track shipments by reference, package or shipment number. It is an easy way to display details and the status of shipments. The information available in this API is the same information available from the [Tracking web site](http://tracking.bring.com/). Response is available as either XML or JSON.
      hfasdhafh
      *Oh by the way*, we also have a [Java client library](https://github.com/bring/bring-api-java) for the Tracking API.

- title: Authentication
  content: |
    If you are a Mybring user, you can authenticate requests to the Tracking API. Authenticated requests have the following benefits:

    - You get more information about your parcels, for example signatures for proof of develiery
    - No rate limiting

    See the [getting started guide on authentication](/api/#authentication) if you're not sure what this means.

    | Header | Example | Comment |
    |:-------|:--------|:--------|
    | `X-MyBring-API-Uid` | `john.doe@example.com` | Mybring login ID |
    | `X-MyBring-API-Key` | `1234abc-abcd-1234-5678-abcd1234abcd ` | Mybring login's API key |
    | `X-Bring-Client-URL` | `https://example.com/ ` | A URL that sort of identifies where you're using the APIs. |

    Those headers must be present for authenticating requests.

/tracking{mediaTypeExtension}:
  displayName: Tracking endpoint
  securedBy: [mybring_headers, null]
  description: |
      For testing you can use "TESTPACKAGE-AT-PICKUPPOINT" as the tracking number to generate test results. For real tracking this must be a valid number.

      You can find an XSD for the XML response here: [tracking-v1.xsd](/api/tracking/schemas/tracking-v1.xsd).

      A parcel has a number of events connected to it during its travel. Here are a list of current event statuses that can be returned.

      - ARRIVED_COLLECTION
      - ARRIVED_DELIVERY
      - CUSTOMS
      - COLLECTED
      - DELIVERED
      - DELIVERY_CANCELLED
      - DELIVERY_CHANGED
      - DELIVERY_ORDERED
      - DEVIATION
      - HANDED_IN
      - INTERNATIONAL
      - IN_TRANSIT
      - NOTIFICATION_SENT
      - PRE_NOTIFIED
      - READY_FOR_PICKUP
      - RETURN
      - TRANSPORT_TO_RECIPIENT

  uriParameters:
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to specify application/json or .xml to specify application/xml
  get:
    description: Get information about a shipment
    queryParameters:
      q:
        description: Reference, package number, shipment number to search for
        type: string
        required: true
        example: TESTPACKAGE-AT-PICKUPPOINT
      callback:
        description: JSONP callback function name
        type: string
        required: false

    responses:
      200:
        displayName: Successful response
        body:
          application/json:
            example: !include examples/testpackage.json
          application/xml:
            example: !include examples/testpackage.xml
            schema: !include schemas/tracking-v1.xsd
      250:
        displayName: Status - notification received
        description: |
          The example below is showing a package that have been EDI notified, but is not received by Bring.
        body:
          application/json:
            example: !include examples/notification_received.json
          application/xml:
            example: !include examples/notification_received.xml
      251:
        displayName: Status - waiting at pickup point
        description: |
          The example below is showing a package waiting for the recipient to collect it at a pickup point
        body:
          application/json:
            example: !include examples/waiting_at_pup.json
          application/xml:
            example: !include examples/waiting_at_pup.xml
      252:
        displayName: Status - loaded for delivery
        description: |
          The example below is showing a package that has been loaded on a distribution car for delivery to the reciepient.
        body:
          application/json:
            example: !include examples/loaded_for_delivery.json
          application/xml:
            example: !include examples/loaded_for_delivery.xml
      253:
        displayName: Status - delivered
        description: |
          The example below is showing a package that has been delivered to the reciepient.
        body:
          application/json:
            example: !include examples/delivered.json
          application/xml:
            example: !include examples/delivered.xml