Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jandev/guid-api
Small project which returns new guids on request
https://github.com/jandev/guid-api
Last synced: 17 days ago
JSON representation
Small project which returns new guids on request
- Host: GitHub
- URL: https://github.com/jandev/guid-api
- Owner: Jandev
- Created: 2021-11-04T12:23:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-11T20:50:31.000Z (about 1 year ago)
- Last Synced: 2024-05-01T13:04:41.989Z (8 months ago)
- Language: HTML
- Size: 102 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# The new Guid API
Solution meant to provide new guids whenever requested.
Sure, this is also possible via the major search engines, by searching for `new guid` or something similar, but over there you need to select it in the UI before you can copy it.
This service only returns a new guid by invoking the site.
## Invoke the API
Invoke the API without an `Accept`-header.
```
GET https://api.guid.codes/Response content-type: text/plain
Response body:
49ccbb20-6602-49e4-a932-9b39ef6521b6
```Invoke the API with a JSON `Accept`-header.
```
GET https://api.guid.codes/
Accept: application/jsonResponse content-type: application/json
Response body:
{
"value": "d9b8750c-6742-42fb-9aa1-4510245139fb"
}
```## Deployment
This project consists of 2 small applications.
1. Static website
2. APIEither one is deployed whenever there is a change in their respecting folders of the `main` branch in this repository.
The static site will be deployed to an Azure Storage Account and uses the static site hosting feature.
The API is deployed to an Azure Function App.Both are, by default, deployed to multiple regions across the globe and an Azure Traffic Manager will make sure the site & API is used which has the best response times for the user.
For a succesful deployment, a secret needs to be added to the repository called `AZURE_DEV`. The contents of this secret should be the output of this command:
```azcli
az ad sp create-for-rbac --name "guidapi" --role owner --sdk-auth
```Or something similar of course. The contents are used in the workflows to log in to Azure and deploy the resources.