progrez.cloud

API 1

16 Agustus 2020

~DAFTAR ISI


1.1 Registrasi

1.2 Login

1.3 Edit

................ 1.3.1 Meta

................ 1.3.2 Information

................ 1.3.3 Security

1.4 Get

1.5 Remove

1.6 Get wilayah

1.7 Image universitas



~DUCUMENTATION API

Documentasi api camps schadule.


1.1 Registrasi

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "kode_universitas=123456"

-F "universitas=khairun"

-F "id_wilayah=234567"

-F "[email protected]"

-F "password=1234qwerty"

-F "kontak=08123xxx"

http://localhost/api/v1/universitas.php?access=registrasi

curl -F "kode_universitas=123456" -F "universitas=khairun" -F "id_wilayah=234567" -F "email=coba@email.com" -F "password=1234qwerty" -F "kontak=08123xxx" http://localhost/api/v1/universitas.php?access=registrasi

reponds

{"error":false,"code":20101,"msg":"suceess","result":{"id":"123456","name":"khairun","active":0,"token":"ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOaUlzSW01aGJXVWlPaUpyYUdGcGNuVnVJbjA9LjgzYTQ4YmEwYjRjNzlmMjkyZTg0NzMxOTYzYjA0OWQwYjAxNjlhZGUwZWMxMTE5Y2QyNmY0ZDEzNDA1YjAyYWI="}}

...



1.2 Login

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "kode_universitas=123456"

-F "password=1234qwerty"

http://localhost/api/v1/universitas.php?getToken

curl -F "kode_universitas=123456" -F "password=1234qwerty" http://localhost/api/v1/universitas.php?getToken

responds

{"error":false,"code":21021,"msg":"suceess","result":{"id":"123456","name":"Unkhair","active":"0","token":"ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOaUlzSW01aGJXVWlPaUpWYm10b1lXbHlJbjA9LmY4MjFlYjQzZDQxMmI4YTUxOTk1MzNiZWVlN2M5ODU4YjE5OTQ2ZGE0NDA0MmU2YmZmZTJmYmViMDE5MjlmMTA="}}

...


1.3 Edit

Ada beberapa type edit

1.3.1 Meta

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "jenis=edit"

-F "edit=meta"

-F "new_kode_universitas=123456"

-F "universitas=Unkhair"

http://localhost/api/v1/universitas.php?profile=token

curl -F "jenis=edit" -F "edit=meta" -F "new_kode_universitas=123456" -F "universitas=Unkhair" http://localhost/api/v1/universitas.php?profile=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOaUlzSW01aGJXVWlPaUpyYUdGcGNuVnVJbjA9LjgzYTQ4YmEwYjRjNzlmMjkyZTg0NzMxOTYzYjA0OWQwYjAxNjlhZGUwZWMxMTE5Y2QyNmY0ZDEzNDA1YjAyYWI=

responds

{"error":false,"code":20103,"msg":"success","result":"new_token_here"}


1.3.2 Infromasi

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "jenis=edit"

-F "edit=informasion"

-F "kontak=0812xx"

-F "id_wilayah=112312"

http://localhost/api/v1/universitas.php?profile=token

curl -F "jenis=edit" -F "edit=informasion" -F "kontak=0812xx" -F "id_wilayah=112312" http://localhost/api/v1/universitas.php?profile=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOaUlzSW01aGJXVWlPaUpyYUdGcGNuVnVJbjA9LjgzYTQ4YmEwYjRjNzlmMjkyZTg0NzMxOTYzYjA0OWQwYjAxNjlhZGUwZWMxMTE5Y2QyNmY0ZDEzNDA1YjAyYWI=

responds

{"error":false,"code":20103,"msg":"success","result":"great"}


1.3.3 Security

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "jenis=edit"

-F "edit=security"

-F "[email protected]"

http://localhost/api/v1/universitas.php?profile=token

curl -F "jenis=edit" -F "edit=security" -F "email=asdasd@sdas.com" http://localhost/api/v1/universitas.php?profile=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOaUlzSW01aGJXVWlPaUpyYUdGcGNuVnVJbjA9LjgzYTQ4YmEwYjRjNzlmMjkyZTg0NzMxOTYzYjA0OWQwYjAxNjlhZGUwZWMxMTE5Y2QyNmY0ZDEzNDA1YjAyYWI=

responds

{"error":false,"code":20103,"msg":"success","result":"great"}

...


1.4 Get

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "jenis=gets"

http://localhost/api/v1/universitas.php?profile=token

curl -F "jenis=gets" http://localhost/api/v1/universitas.php?profile=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOaUlzSW01aGJXVWlPaUpyYUdGcGNuVnVJbjA9LjgzYTQ4YmEwYjRjNzlmMjkyZTg0NzMxOTYzYjA0OWQwYjAxNjlhZGUwZWMxMTE5Y2QyNmY0ZDEzNDA1YjAyYWI=

responds

{"error":false,"code":20107,"msg":"success get data universitas","result":{"id":"123456","name":"khairun","wilayah":"234567","email":"[email protected]","kontak":"08123xxx","deskripsi":null,"image":null}}

...


1.5 Remove

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "jenis=remove"

http://localhost/api/v1/universitas.php?profile=token

curl -F "jenis=remove" http://localhost/api/v1/universitas.php?profile=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOaUlzSW01aGJXVWlPaUpyYUdGcGNuVnVJbjA9LjgzYTQ4YmEwYjRjNzlmMjkyZTg0NzMxOTYzYjA0OWQwYjAxNjlhZGUwZWMxMTE5Y2QyNmY0ZDEzNDA1YjAyYWI=

reponds

{"error":false,"code":20105,"msg":"Di hapus","result":null}

...


1.6 Get Wilayah

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "type=provinces"

-F "id=123

http://localhost/api/v1/files.php?get=wilayah


type :

- provinces=8271 #maluku utara

- regencies=8271021 #kota ternate

- districts=8271021008 #marikurubu

else :

- all provinces in indonesia


## example

curl -F "type=provinces" -F "id=82" http://localhost/api/v1/files.php?get=wilayah
curl -F "type=villages" -F "id=8271013004" http://localhost/api/v1/files.php?get=wilayah

responds

{"error":false,"code":20004,"msg":"provinces","result":[{"id":"8201","name":"KABUPATEN HALMAHERA BARAT"},{"id":"8202","name":"KABUPATEN HALMAHERA TENGAH"},{"id":"8203","name":"KABUPATEN KEPULAUAN SULA"},{"id":"8204","name":"KABUPATEN HALMAHERA SELATAN"},{"id":"8205","name":"KABUPATEN HALMAHERA UTARA"},{"id":"8206","name":"KABUPATEN HALMAHERA TIMUR"},{"id":"8207","name":"KABUPATEN PULAU MOROTAI"},{"id":"8208","name":"KABUPATEN PULAU TALIABU"},{"id":"8271","name":"KOTA TERNATE"},{"id":"8272","name":"KOTA TIDORE KEPULAUAN"}]}

responds

{"error":false,"code":20004,"msg":"villages","result":{"id":"8271013004","name":"MADO"}}

...


1.7 Image universitas

curl -i -X POST -H "Content-Type: multipart/form-data"

-F "jenis=edit"

-F "edit=image"

-F "[email protected]"

http://localhost/api/v1/universitas.php?profile=token

curl -i -X POST -H "Content-Type: multipart/form-data" -F "jenis=edit" -F "edit=image" -F "image=@logo.jpg" http://localhost/api/v1/universitas.php?profile=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOaUlzSW01aGJXVWlPaUpyYUdGcGNuVnVJbjA9LjgzYTQ4YmEwYjRjNzlmMjkyZTg0NzMxOTYzYjA0OWQwYjAxNjlhZGUwZWMxMTE5Y2QyNmY0ZDEzNDA1YjAyYWI=

responds

{"error":false,"code":20103,"msg":"success","result":"great"}

...