Creating services using the rest api always fails with "service name required"

Open
#109 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Domain
api, documentation

Research direction

Review the service-creation REST API examples in the documentation, starting with the curl requests shown in this issue. Compare the documented URL and request fields with the API's required service name, then update the example so it no longer returns “service name required.” Re-run both shown requests to confirm the corrected examples.

Written by the indexing model from the issue text.

Description

Steps to reproduce.
Create a new sprite $SPRITE_NAME

Run the example from the docs:

curl -X PUT
-H "Authorization: Bearer $SPRITE_TOKEN"
-H "Content-Type: application/json"
-d '{"args":["-m","http.server","8000"],"cmd":"python","http_port":8000,"needs":["postgres"]}'
"https://api.sprites.dev/v1/sprites/$SPRITE_NAME/services/$SERVICE_NAME"

Returns "service name required".

Same with basic services

curl -X PUT
-H "Authorization: Bearer $SPRITE_TOKEN"
-H "Content-Type: application/json"
-d '{"name":"testservice","cmd":"/bin/sh","args":["-c","echo hello"],"needs":[]}'
"https://api.sprites.dev/v1/sprites/$SPRITE_NAME/services/$SERVICE_NAME"

Returns "service name required"

Dominant language
TypeScript
Stars
51
Forks
4
Avg merge
23h 57m
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from superfly/sprites-docs

All issues in superfly/sprites-docs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.