Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select parameter #1

Closed
abierman opened this issue Aug 5, 2014 · 4 comments
Closed

select parameter #1

abierman opened this issue Aug 5, 2014 · 4 comments
Assignees
Labels

Comments

@abierman
Copy link
Contributor

@abierman abierman commented Aug 5, 2014

o What syntax should be used for the "select" query parameter? The
current choices are "XPath" and "path-expr". Perhaps an
additional parameter to identify the select string format is
needed to allow extensibility?

Status: solution proposal added by Martin.

   leaf select {
     type string {
       length "1 .. max";
     }
     description
       "The 'select' query parameter is used to optionally identify
        data nodes within the target resource to be retrieved in a
        GET method.  The client can use this parameter to retrieve
        a subset of all nodes in a resource.

        A value of the 'select' query parameter matches the
        following rule:

          select-expr = path '(' select-expr / '*' ')' /
                        path ';' select-expr /
                        path
          path = api-identifier [ '/' path ]

        'api-identifier' is defined in section 5.3.1.1.

        ';' is used to select multiple nodes.  For example, to
        retreive only the 'genre' and 'year' of an album, use:
        'select=genre;year'.

        Parentheses are used to specify sub-selectors of a node.
        For example, to retreive only the 'label' and
        'catalogue-number' of an album, use:
        'select=admin(label;catalogue-number)'.

        '/' is used in a path to retreive a child node of a node.
        For example, to retreive only the 'label' of an album, use:
        'select=admin/label'.

        This parameter is only allowed for GET methods on api,
        datastore, and data resources.  A 400 Bad Request error
        is returned if used for other methods or resource types.";
   reference
     "RFC XXXX: [sec. 5.3.1.1 ABNF For Data Resource Identifiers]";
   }
@abierman
Copy link
Contributor Author

@abierman abierman commented Sep 8, 2014

No objections to this new syntax.
Will move to text section (not in YANG module)
Add some examples

@abierman abierman self-assigned this Oct 7, 2014
@abierman abierman closed this Oct 7, 2014
@abierman
Copy link
Contributor Author

@abierman abierman commented Oct 7, 2014

No comment since added so accepting proposed syntax for select parameter.

@abierman abierman reopened this Dec 15, 2014
@abierman
Copy link
Contributor Author

@abierman abierman commented Dec 15, 2014

select parameter is being renamed the fields parameter

@abierman
Copy link
Contributor Author

@abierman abierman commented Jul 16, 2015

Fixed in -04 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant