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

API endpoint /resources #4

Open
6 of 8 tasks
mjstealey opened this issue Jun 20, 2022 · 1 comment
Open
6 of 8 tasks

API endpoint /resources #4

mjstealey opened this issue Jun 20, 2022 · 1 comment

Comments

@mjstealey
Copy link
Member

mjstealey commented Jun 20, 2022

/resources

TODO - separate AFRN from APRN in the models (see diagram attached below)

  • AFRN - statically defined - 1 of 1 per definition type
  • APRN - dynamically defined - 1 of N per definition type
  • instances vs classes of nodes

Endpoints

  • /resources paginated
  • /resources/{int:pk}
  • /resources/{int:pk}/experiments
  • /resources/{int:pk}/projects

Functions

  • search - by name, resource_type - open to any active user
  • create resource - as operator only
  • update resource - as operator only
  • delete resource - as resource_creator only (is_active = False, is_deleted = True) - soft delete

Fields

--- /resources
description:         - string
is_active:           - boolean
location:            - string
name:                - string
resource_class:      - string
resource_id:         - int
resource_mode:       - string
resource_type:       - string
--- /resources/{int:pk}
created_by:          - int
created_date:        - string
description:         - string
hostname:            - string
ip_address:          - string
is_active:           - boolean
is_deleted:          - boolean (only return when resource has been deleted)
location:            - string
name:                - string
ops_notes:           - string
resource_class:      - string
resource_id:         - int
resource_mode:       - string
resource_type:       - string
--- /resources/{int:pk}/experiments
description:         - string
experiment_creator:  - int
experiment_id:       - int
experiment_state:    - string
is_canonical:        - boolean
is_retired:          - boolean
name:                - string
--- /resources/{int:pk}/projects
description:         - string
is_public:           - boolean
name:                - string
project_creator:     - int
project_id:          - int
mjstealey added a commit that referenced this issue Jun 23, 2022
mjstealey added a commit that referenced this issue Jun 27, 2022
@mjstealey
Copy link
Member Author

ARFN vs ARPN

Screen Shot 2022-09-23 at 1 39 13 PM

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

No branches or pull requests

1 participant