Project

Profile

Help

Story #5519

closed

Story #5517: [EPIC] Automation Hub Release Blockers

As an API user, I have an 'exclude' field that is the opposite of the 'fields' parameter

Added by bmbouter about 5 years ago. Updated about 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Problem

Currently Pulp provides a 'fields' parameter. The want to exclude the one or two large fields, e.g. docs blobs and include all others which causes their query to look like:

http://localhost:5002/pulp/api/v3/content/ansible/collection_versions/?is_highest=True&offset=0&limit=10&fields=artifact,id,authors,description,documentation,homepage,issues,is_certified,license,name,namespace,repository,version,contents

Solution

Adding an 'excludes' parameter that is the opposite of the 'fields' parameter would make it much easier for clients who only want to exclude a small set of params.

Actions #1

Updated by bmbouter about 5 years ago

  • Parent issue set to #5517
Actions #2

Updated by daviddavis about 5 years ago

This field already exists. It just needs to be exposed via the REST API schema.

$ http :/pulp/api/v3/repositories/?fields!=description

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "_created": "2019-09-20T14:55:17.521706Z",
            "_href": "/pulp/api/v3/repositories/f7e09d0b-66eb-4865-94f5-905599449c65/",
            "_latest_version_href": "/pulp/api/v3/repositories/f7e09d0b-66eb-4865-94f5-905599449c65/versions/1/",
            "_versions_href": "/pulp/api/v3/repositories/f7e09d0b-66eb-4865-94f5-905599449c65/versions/",
            "name": "foo",
            "plugin_managed": false
        }
    ]
}
Actions #3

Updated by daviddavis about 5 years ago

  • Status changed from NEW to POST
  • Assignee set to daviddavis

Added by daviddavis about 5 years ago

Revision ed236671 | View on GitHub

Expose exclude_fields in the REST API schema

fixes #5519

Actions #4

Updated by daviddavis about 5 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #5

Updated by bmbouter about 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF