AgileZen API Documentation

Pagination

When you make a request to a container resource, AgileZen will reply with a paginated response.

Default Responses

Roughly, a paginated response takes this form:

	{
		page: 1,
		pageSize: 10,
		totalPages: 2,
		totalItems: 15,
		items: [
			{
				// An entity
			},
			{
				// Another entity
			},
			
			// ...more entities...
		]
	}

For example, if you access your list of projects at:

https://agilezen.com/api/v1/projects

The response looks like this:

	{
		page: 1,
		pageSize: 10,
		totalPages: 2,
		totalItems: 15,
		items: [
			{
				id: 123,
				name: "World Peace",
				description: "Working to find world peace",
				owner: {
					id: 456,
					name: "John Doe",
					username: "jdoe"
				}
			}
		]
	}

Controlling Pagination

For container resources, you can supply paging options rather than requesting all of the data at once.

 ArgumentTypeDefaultRestrictions
Page indexpageinteger1>=0
Page sizepageSizeinteger100>=1, max=1,000

By default, you will receive the first page of 100 entities in the container. To request the next page, you can supply the page argument, like this:

https://agilezen.com/api/v1/projects?page=2

If you want to adjust the number of entities on each page, you can use the pageSize argument. For example:

https://agilezen.com/api/v1/projects?pageSize=25