API Get Info

From zFairs Contest Management
Revision as of 11:58, 4 September 2020 by Trent (talk | contribs) (Created page with "== Get Info== Some of our api calls will require you to have additional information such as category ids or judging session ids. This api call will provide that information. T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Get Info

Some of our api calls will require you to have additional information such as category ids or judging session ids. This api call will provide that information. The results of this api call will grow as our api expands.

fetch('/api/data/info', {
    method:'POST',
    headers:{'Content-Type': 'application/json'},
    body: JSON.stringify({
            Username:'admin username',
            Password: 'password',
            Body: {}
        })
})
.then(response => response.json())
.then(data=>{console.log('Success: ',data);})
.catch((error)=>{console.log('Error: ', error);});