Documentation for REST API

The Rest API documentation has what seems to be outdated links and examples.

I’ve been able to successfully get a token from the /auth/access_token endpoint, but have not been able to use it to access data.

My first point about lack of good API documentation:
https://developers.shotgridsoftware.com/rest-api/#setting-up-a-development-environment

this link has you download postman and alludes to it having some script built in so you can see and work with the full API endpoints

This does not work. Postman installs, but there’s nothing for it to import. It would seem that the two are out of sync.

Is there any documentation which lists all available endpoints?

My second point about it not really working… or being bad documentation…

https://developers.shotgridsoftware.com/rest-api/#making-requests

here, they say that you should be able to get a list of your projects (or at least that is what it seems like)

with something like:

curl -X POST https://yoursite.shotgunstudio.com/api/v1.1/entity/projects/1
-H 'Authorization: Bearer
-H ‘Accept: application/json’

but when I do that (in c#)

    public async Task<string> GetProjects(string token, string BaseAddress)
    {
        var endpoint = "entity/projects/1";

        Console.WriteLine($"Requesting projects from {BaseAddress + endpoint}");

        client.DefaultRequestHeaders.Accept.Clear();
        client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var response = await client.PostAsync(BaseAddress + endpoint, null);

        if (response.IsSuccessStatusCode)
        {
            Console.WriteLine("Request succeeded.");
            return await response.Content.ReadAsStringAsync();
        }
        else
        {
            Console.WriteLine("Request failed.");
            Console.WriteLine($"Response: {response.StatusCode}");
            var data = await response.Content.ReadAsStringAsync();
            Console.WriteLine($"Response: {data}");
            return string.Empty;
        }
    }

I get

Response: BadRequest
Response: {“errors”:[{“id”:“1e136154d45dd11f39a6a7ab3c8ce8b9”,“status”:400,“code”:103,“title”:“Request Parameters invalid.”,“source”:{“revive”:[“revive is missing”]},“detail”:null,“meta”:null}]}

Now, I know that my code is mostly ok because when I do the same thing for Assets, using a similar pattern shown in the sample, it works, to a degree

    public async Task<string> GetAssets(string token, string BaseAddress)
    {
        var endpoint = "entity/assets";

        Console.WriteLine($"Requesting assets from {BaseAddress + endpoint}");

        client.DefaultRequestHeaders.Accept.Clear();
        client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var response = await client.GetAsync(BaseAddress + endpoint);

        if (response.IsSuccessStatusCode)
        {
            Console.WriteLine("Request succeeded.");
            return await response.Content.ReadAsStringAsync();
        }
        else
        {
            Console.WriteLine("Request failed.");
            Console.WriteLine($"Response: {response.StatusCode}");
            var data = await response.Content.ReadAsStringAsync();
            Console.WriteLine($"Response: {data}");
            return string.Empty;
        }
    }

this returns data like:
“relationships”:{},“id”:1411,“links”:{“self”:“/api/v1.1/entity/assets/1411”}}],