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

[Update] GET /account/events and GET /account/events/{eventId} #116

Merged
merged 4 commits into from Sep 6, 2019

Conversation

hzoppetti
Copy link
Contributor

Added secondary_entity object to Event schema object which appears in both
GET /account/events
and
GET /account/events/{eventId}

Additionally, while researching discovered that "filterable" should have been set on Event properties id and created - added that in second commit.

Documents:

@leslitagordita leslitagordita requested review from yoshizzle and Dorthu and removed request for yoshizzle September 3, 2019 19:09
description: |
Detailed information about the Event's secondary entity, which provides additional information
for `linode_boot`, `linode_create`, and `linode_clone` Event actions.
x-linode-cli-display: 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not going to display correctly; entity is listed as displaying in column 4, but in practice doesn't show up when you run linode-cli events list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We noticed this as well and assumed this is because it's not displaying entity because it is an object? We assume this will be skipped as well but put it here in the case that should it in the future be displayed, that it will appear next to entity.

openapi.yaml Outdated
readOnly: true
description: |
Detailed information about the Event's secondary entity, which provides additional information
for `linode_boot`, `linode_create`, and `linode_clone` Event actions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will be others in the future.

openapi.yaml Outdated
The unique ID for an Event's secondary entity.


Secondary Entities are assigned the ID of the Linode they correspond to.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't true; this is the ID of the object that is the secondary entity (i.e. if I deploy a Linode from the official Debain9 image, the secondary entity's ID will be linode/debain9 because that's the ID of that image). They may have nothing to do with a Linode.

openapi.yaml Outdated
x-linode-cli-display: 5
properties:
id:
type: integer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not always; images have slugs, for example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update to be a string.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably safer. This could also come back as an int, but it doesn't look like openapi3 supports this.

openapi.yaml Outdated
type: string
description: >
The current label of this object. The label may reflect changes
that occur with this Event.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually no; secondary entity labels won't change. Entity labels may stop being updated in the future, also.

openapi.yaml Outdated
enum:
- backup
- image
- linode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be any entity type. Right now secondary entity specifically will only come back with "linode", "image", "linode_config", or "backup", but there may be more in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool - I'll make this a regular string - Also - noticed that this was "backup" in this test but other places in the code this was was "backups"...

Copy link
Member

@Dorthu Dorthu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@leslitagordita leslitagordita merged commit 0424230 into linode:development Sep 6, 2019
LBGarber pushed a commit to LBGarber/linode-api-docs that referenced this pull request Jun 15, 2022
LBGarber pushed a commit to LBGarber/linode-api-docs that referenced this pull request Jun 15, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants