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

Add prefix to api #14

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions API.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# Zephir API Documentation
[http://localhost/documentation](http://localhost/documentation)
[http://localhost/api/documentation](http://localhost/api/documentation)

### Purpose
The Zephir Item API provides an access point to the item-level metadata record for all
Expand All @@ -17,11 +17,11 @@ preferences can be made with the following methods.

* Explicit extension (.xml, .json) to the API call (debug option)

> Example: [http://localhost/ping.json](http://localhost/ping.json))
> Example: [http://localhost/api/ping.json](http://localhost/api/ping.json))

> {"status":200, "message":"Success"}

> Example [http://localhost/item/mdp.39015012078393.json](http://localhost/item/mdp.39015012078393.json)
> Example [http://localhost/api/item/mdp.39015012078393.json](http://localhost/api/item/mdp.39015012078393.json)

> {"leader":"00925nam a22003011 4500","fields":[{"001":"mdp.39015012078393"},...

Expand All @@ -30,7 +30,7 @@ preferences can be made with the following methods.
### System

__GET /ping__
[http://localhost/ping](http://localhost/ping)
[http://localhost/api/ping](http://localhost/api/ping)

<response>
<status>200</status>
Expand All @@ -55,7 +55,7 @@ Content: 'Failure' Message
### Item

__GET /item/{htid}__
[http://localhost/item/mdp.39015012078393](http://localhost/item/mdp.39015012078393)
[http://localhost/api/item/mdp.39015012078393](http://localhost/api/item/mdp.39015012078393)

<record xmlns="http://www.loc.gov/MARC21/slim">
<leader>00925nam a22003011 4500</leader>
Expand Down
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def create_app(config_class=Config):
db.init_app(app)

# Set up routes
app.register_blueprint(blueprint)
app.register_blueprint(blueprint, url_prefix='/api')

return app
Loading