-
Notifications
You must be signed in to change notification settings - Fork 0
/
url.txt
63 lines (55 loc) · 1.86 KB
/
url.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
stepzen import curl https://api.api-ninjas.com/v1/exercises?muscle=chest \
-H "X-API-KEY: WvezWzo+I1/Mgz/6bveDSw==t2NKqDHjYvHiOHWE"
stepzen import curl --request POST 'https://ap-south-1.aws.data.mongodb-api.com/app/data-fjeim/endpoint/data/v1/action/find' \
--header 'Content-Type: application/json' \
--header 'Access-Control-Request-Headers: *' \
--header 'api-key: z8M7rvxoQiltWrQ9gFoO9jhsQle1BRz3xj68z0MMU09RV8mpM2Z03sBQhd2F3E0Z' \
--data-raw '{
"collection":"sets",
"database":"workouts",
"dataSource":"Cluster0",
"filter": {
"exercise": "Bench Press"
}
}'
stepzen import curl --request POST 'https://ap-south-1.aws.data.mongodb-api.com/app/data-fjeim/endpoint/data/v1/action/insertOne' \
--header 'Content-Type: application/json' \
--header 'Access-Control-Request-Headers: *' \
--header 'Accpet: application/json' \
--header 'api-key: z8M7rvxoQiltWrQ9gFoO9jhsQle1BRz3xj68z0MMU09RV8mpM2Z03sBQhd2F3E0Z' \
--data-raw '{
"collection":"sets",
"database":"workouts",
"dataSource":"Cluster0",
"document": {
"exercise": "Bench Press",
"reps": 10,
"weight": 135
}
}'
var axios = require('axios');
var data = JSON.stringify({
"collection": "<COLLECTION_NAME>",
"database": "<DATABASE_NAME>",
"dataSource": "Cluster0",
"projection": {
"_id": 1
}
});
var config = {
method: 'post',
url: 'https://ap-south-1.aws.data.mongodb-api.com/app/data-fjeim/endpoint/data/v1/action/findOne',
headers: {
'Content-Type': 'application/json',
'Access-Control-Request-Headers': '*',
'api-key': 'z8M7rvxoQiltWrQ9gFoO9jhsQle1BRz3xj68z0MMU09RV8mpM2Z03sBQhd2F3E0Z',
},
data: data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});