documentation/repos.md in mutx-0.1.69 vs documentation/repos.md in mutx-0.2.0
- old
+ new
@@ -1,32 +1,29 @@
-How do i use the repositories feature?
-=====================================
+# Repositories
- When we have some task or test that consume some information to run, we have the possibility on Mutx to save some info and use the API of repos to check it and use it.
+## Concept
+Repositories are units of information storage. With Repositories, you can save data to be queried later as you need.
-To create an info repository
-===========================
+## How to use repositories
+#### Creation
+First, a repository must be created by admin section to be used. Repo creation provide (only admin view) a unique token to be used.
+Repo token is a value to be used on putting data into a repo. Without a token, you won't be able to put data.
- We only need to go to the Admin bar and click on 'Repositories'. By default we can view the list of repos. If we want to create a repo, we need to click on 'New Repo', put a name of the new repo and save it, thats it.
+Go to Admin > Repositories to configure repos
-How to save info inside a repo
-=============================
-
- When we create a repo, we have to copy the token that the new repo has (with and invalid token or repo name Mutx will reject the request). To save info we have to make a PUT to an existing repo, for example:
-
- PATH/api/<repo_token>/<repo_name>/
-
- The value to save must be a JSON in the body of the request, for example:
-
+#### Putting data into a repo
+To put data into a repo, you have to perform a PUT request to the mutx api url
+
+ http://host:port/api/repos/<:token>/<:reponame>
+
+And data has to be passed as the body in JSON format
+
{
- "id": 3,
- "name": "Visa"
+ "fav_food":"Asado",
+ "fav_drink":"Beer"
}
-How to get the info of a repo
-============================
- Using the API we can make a GET request to view the info of a repository, for example:
-
- PATH/api/repos/<repo_name>
-
- The result will be a json with the info of the repo. The values that we previously save will be in the 'values' field.
+### Getting data from a repo
+To get repository data, you have to go to the following url like:
+
+ http://host:port/api/repos/<:reponame>
\ No newline at end of file