curl --request PUT \
--url https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataId": "anas",
"dataTypeId": "642d165e6a88ff136c692853",
"hubId": "63daffabc5a95d7d475eb7a6",
"address": "jakarta",
"golongan": "A"
}
'import requests
url = "https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}"
payload = {
"dataId": "anas",
"dataTypeId": "642d165e6a88ff136c692853",
"hubId": "63daffabc5a95d7d475eb7a6",
"address": "jakarta",
"golongan": "A"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataId: 'anas',
dataTypeId: '642d165e6a88ff136c692853',
hubId: '63daffabc5a95d7d475eb7a6',
address: 'jakarta',
golongan: 'A'
})
};
fetch('https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'dataId' => 'anas',
'dataTypeId' => '642d165e6a88ff136c692853',
'hubId' => '63daffabc5a95d7d475eb7a6',
'address' => 'jakarta',
'golongan' => 'A'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}"
payload := strings.NewReader("{\n \"dataId\": \"anas\",\n \"dataTypeId\": \"642d165e6a88ff136c692853\",\n \"hubId\": \"63daffabc5a95d7d475eb7a6\",\n \"address\": \"jakarta\",\n \"golongan\": \"A\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataId\": \"anas\",\n \"dataTypeId\": \"642d165e6a88ff136c692853\",\n \"hubId\": \"63daffabc5a95d7d475eb7a6\",\n \"address\": \"jakarta\",\n \"golongan\": \"A\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataId\": \"anas\",\n \"dataTypeId\": \"642d165e6a88ff136c692853\",\n \"hubId\": \"63daffabc5a95d7d475eb7a6\",\n \"address\": \"jakarta\",\n \"golongan\": \"A\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"_id": "6433acd3fc7786708b7567ad",
"dataTypeId": "642d165e6a88ff136c692853",
"hubId": "63daffabc5a95d7d475eb7a6",
"address": "Jakarta",
"golongan": "A",
"dataId": "anas",
"createdBy": "husni+1@paket.id",
"organizationId": "63daff70a483b40ae5586e02",
"updatedTime": "2023-04-10 06:24:21",
"createdTime": "2023-04-10 06:24:21",
"data_type": {
"_id": "642d165e6a88ff136c692853",
"name": "Pagawai"
}
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Update data source by hubId, dataTypeName, dataId
curl --request PUT \
--url https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataId": "anas",
"dataTypeId": "642d165e6a88ff136c692853",
"hubId": "63daffabc5a95d7d475eb7a6",
"address": "jakarta",
"golongan": "A"
}
'import requests
url = "https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}"
payload = {
"dataId": "anas",
"dataTypeId": "642d165e6a88ff136c692853",
"hubId": "63daffabc5a95d7d475eb7a6",
"address": "jakarta",
"golongan": "A"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataId: 'anas',
dataTypeId: '642d165e6a88ff136c692853',
hubId: '63daffabc5a95d7d475eb7a6',
address: 'jakarta',
golongan: 'A'
})
};
fetch('https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'dataId' => 'anas',
'dataTypeId' => '642d165e6a88ff136c692853',
'hubId' => '63daffabc5a95d7d475eb7a6',
'address' => 'jakarta',
'golongan' => 'A'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}"
payload := strings.NewReader("{\n \"dataId\": \"anas\",\n \"dataTypeId\": \"642d165e6a88ff136c692853\",\n \"hubId\": \"63daffabc5a95d7d475eb7a6\",\n \"address\": \"jakarta\",\n \"golongan\": \"A\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataId\": \"anas\",\n \"dataTypeId\": \"642d165e6a88ff136c692853\",\n \"hubId\": \"63daffabc5a95d7d475eb7a6\",\n \"address\": \"jakarta\",\n \"golongan\": \"A\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/data/hub/{hub_id}/type/{dataTypeName}/{dataId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataId\": \"anas\",\n \"dataTypeId\": \"642d165e6a88ff136c692853\",\n \"hubId\": \"63daffabc5a95d7d475eb7a6\",\n \"address\": \"jakarta\",\n \"golongan\": \"A\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"_id": "6433acd3fc7786708b7567ad",
"dataTypeId": "642d165e6a88ff136c692853",
"hubId": "63daffabc5a95d7d475eb7a6",
"address": "Jakarta",
"golongan": "A",
"dataId": "anas",
"createdBy": "husni+1@paket.id",
"organizationId": "63daff70a483b40ae5586e02",
"updatedTime": "2023-04-10 06:24:21",
"createdTime": "2023-04-10 06:24:21",
"data_type": {
"_id": "642d165e6a88ff136c692853",
"name": "Pagawai"
}
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Name of data type.
Use GET /data-types API to get the list of dataType Name.
Example: Pegawai
Primary key data of the data type.
Use GET /data API to get the list primary key data of dataType.
Example: anas
Body
The identifier of fields from data type.
Example: anas
The identifier of data type.
Use GET /data-types API to get the list of Data Type IDs.
Example: 642d165e6a88ff136c692853
Fundamental entity within an organization, serving as the central point for managing various operational components. Use GET /hubs endpoint to get the list of Hub IDs. Example: 634e98498ce07d29474a7e29
The dynamic field, address. Use GET /data-types API to get detail fields of data source.
Example: jakarta
The dynamic field, golongan. Use GET /data-types API to get detail fields of data source.
Example: A