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

Error: OpsLevel API Errors: One of id or alias must be supplied #63

Open
RvuvuzelaM opened this issue Oct 3, 2022 · 2 comments
Open
Labels
question Further information is requested

Comments

@RvuvuzelaM
Copy link

Here is an error that I received when I wanted to run this command: pslevel update service -f service.yaml

Error: OpsLevel API Errors:
        * One of id or alias must be supplied

When I wanted to apply changes for service.yaml I clicked on download the newest version of opslevel.yml
Screenshot 2022-10-03 at 11 09 54

And as far as I see, this CLI of update doesn't accept any flags like ID, and gives me an error when I feed-in not altered piece of data (which comes from opslevel directly).
Documentation for CLI also isn't helpful with that regards.

Thanks upfront for some help

@RvuvuzelaM
Copy link
Author

The same error is produced for

opslevel update service ID-OF-THE-SERVICE -f ./service.yaml

@rocktavious
Copy link
Collaborator

rocktavious commented Oct 4, 2022

Hey @RvuvuzelaM - unfortunately the opslevel update service command does not take in an opslevel.yml file. Its a different format that mirrors our GraphQL API mutations.

Could you explain more of your usecase in what you are trying to accomplish by using the CLI to update a service with an opslevel.yml? The purpose of opslevel.yml is that you place it in your Git repository and our App's Git integrations read and process it. The CLI was never meant to use opslevel.yml as a data source so I'm curious about your usecase.

Here is an example of using the opslevel update service command - while it looks close to opslevel.yml it is importantly not because opslevel.yml does not mirror our GraphQL API mutations and the CLI uses GraphQL to enact the changes.

cat << EOF | opslevel update service -f -
alias: "hello_world"
description: "Hello World Service Updated"
tier: "tier_3"
EOF

@rocktavious rocktavious added the question Further information is requested label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants